This page last changed on Jan 11, 2013 by doctor64.

Hello!

I have simple arduino based sensor. Sensor perfectly report in telnet using TCP-com proxy, but i can't get sensor working in OpenRemote.
Controller complaining about:
"ERROR Polling Sensor Thread ID = 61, Name ='DHT\_temp': Implementation error in
protocol handler org.openremote.controller.protocol.telnet.TelnetCommand@18b142
0 : For input string: "19
"
java.lang.NumberFormatException: For input string: "19
"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.openremote.controller.protocol.telnet.TelnetCommand.read(TelnetCo
mmand.java:399)
at org.openremote.controller.model.sensor.Sensor$DeviceReader.read(Senso
r.java:682)
at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor
.java:608)
at java.lang.Thread.run(Unknown Source)

Arduino simply send number to controller, sensor in Open remote defined without regexp's

What i do wrong?

Sorry, my own fault.
regexp (?s)^[^0-9]+(0\-9+).*$ (Note (?s) for make dot also match do cr/lf chars) works like charm

Posted by doctor64 at Jan 12, 2013 18:56

Hmm? still problems like
"2013-01-12 23:20:10,681 INFO Polling Sensor Thread ID = 1344273, Name ='Aqua\_Temp': received: Temp: DHT:22 BMP:22.10 Aqua:28.56
2013-01-12 23:20:10,681 ERROR Polling Sensor Thread ID = 1344273, Name ='Aqua\_Temp': Implementation error in protocol handler org.openremote.controller.protocol.telnet.TelnetCommand@1aeec48 : For input string: "28.56"
java.lang.NumberFormatException: For input string: "28.56"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.openremote.controller.protocol.telnet.TelnetCommand.read(TelnetCommand.java:399)
at org.openremote.controller.model.sensor.Sensor$DeviceReader.read(Sensor.java:682)
at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:608)
at java.lang.Thread.run(Unknown Source)

Sensor values in OpenRemote should be only integers?
How i can create temperature sensor?

Posted by doctor64 at Jan 12, 2013 21:23

Hi

I'm very new on OR (on syno). My Arduino sensor (Current sensor) is connected to OR with using a telnet protocol.

When OR is sending *, arduino is responding with IMAX=21A. The regex filter gives 21 and the webconsole is printing 21.
All is allright !

BUT ! BUT !

The OR continues to request the arduino by sending * at 1 character per second whatever the polling interval.

Unfortunately, nothing is in the log file.

Do you have any idea ?

Posted by vince68 at Feb 11, 2013 14:06

The level and range sensors currently only support integer values.
You have to use the custom sensor to display "28.56"

Posted by mredeker at Feb 12, 2013 09:15
Document generated by Confluence on Jun 05, 2016 09:31