This page last changed on Oct 13, 2013 by hennemarc.

Hello all,

I am using OR Server 2.1.0 beta on a RaspberryPi and I don't know why, but I am not able to send out a Telnet or TCP command via OR at all. I verify this with WireShark and it tells me that not one byte is sent at all to the OR server.

What I am trying to do is to send out a HEX-String via Telnet over a MOXA Serial-2-IP converter (IP: 192.168.1.55, Port: 4001) to the home ventilation system (ZEHNDER ComfoAir 350). The HEX command "0x07 0xF0 0x00 0x99 0x01 0x04 0x4B 0x07 0x0F" turns on the ventilation to Level 3. To say this upfront, by using a terminal program (RealTerm) the command is properly sent and in WireShark I see exactly the data I have sent out.

But I see absolutely nothing when I do this with OpenRemote.

For this I just created a simple command for turning on the ventilation:

After the command has been created I assigned that command to a Button. But by touching that button nothing happens at all.

For better evaluation I copied below the log files output for this command. From there you can see that no telnet could be performed. But why?
I have also tried to modify the command to "null|0x07 0xF0 0x00 0x99 0x01 0x04 0x4B 0x07 0x0F|" or "null|07 F0 00 99 01 04 4B 07 0F|" but with the same negative result. What I find very strange is that no telnet is performed, although maybe the command string might be formatted differently. But at least I would expect a telnet session to the device.

Can anybody give me a hint why I have this behavior?

The telnet.log files tells me the following:

INFO 2013-10-13 10:40:54,531 (Telnet): WaitForString read before running into timeout: ^GóGð@<
^Ã^V^ÃOm^F^@@@à³^G^O^GóGð@<
^Ã^V^ÃOm^F^@@@à³^G^O^GóGð@ª^H^@@@@@@@^@_^G^O^GóGð@Ã^N^O#2^O#2##^B^AFF^@^@&^G^O^GóGð@<
^Ã^V^ÃOm^F^@@@à³^G^O^GóGð@à R?WXB^O(((^Ã^G^O
ERROR 2013-10-13 10:40:54,532 (Telnet): could not perform telnetEvent
java.lang.Exception: waitForString response timed-out waiting for "0x07 0xF0 0x00 0x99 0x01 0x04 0x4B 0x07 0x0F"
at org.openremote.controller.protocol.telnet.TelnetCommand.waitForString(TelnetCommand.java:207)
at org.openremote.controller.protocol.telnet.TelnetCommand.send(TelnetCommand.java:153)
at org.openremote.controller.protocol.telnet.TelnetCommand.send(TelnetCommand.java:131)
at org.openremote.controller.service.impl.ControlCommandServiceImpl.trigger(ControlCommandServiceImpl.java:95)
at org.openremote.controller.rest.ControlCommandRESTServlet.handleRequest(ControlCommandRESTServlet.java:77)
at org.openremote.controller.rest.RESTAPI.doPost(RESTAPI.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openremote.controller.rest.support.json.JSONCallbackFilter.doFilter(JSONCallbackFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

And the telnet-debug.log says:

DEBUG 2013-10-13 10:40:53,287 (Telnet): Building Telnet command
DEBUG 2013-10-13 10:40:53,300 (Telnet): Telnet Command: port= 4001
DEBUG 2013-10-13 10:40:53,300 (Telnet): Telnet Command: command = 0x07 0xF0 0x00 0x99 0x01 0x04 0x4B 0x07 0x0F
DEBUG 2013-10-13 10:40:53,301 (Telnet): Telnet Command: timeout = 1
DEBUG 2013-10-13 10:40:53,302 (Telnet): Telnet Command: ipAddress = 192.168.1.55
DEBUG 2013-10-13 10:40:53,303 (Telnet): Telnet Command created successfully
INFO 2013-10-13 10:40:54,531 (Telnet): WaitForString read before running into timeout: ^GóGð@<
^Ã^V^ÃOm^F^@@@à ³^G^O^GóGð@<
^Ã^V^ÃOm^F^@@@à ³^G^O^GóGð@ª^H^@@@@@@@^@_^G^O^GóGð@Ã^N^O#2^O#2##^B^AFF^@^@&^G^O^GóGð@<
^Ã^V^ÃOm^F^@@@à ³^G^O^GóGð@à R?WXB^O(((^Ã^G^O
ERROR 2013-10-13 10:40:54,532 (Telnet): could not perform telnetEvent
java.lang.Exception: waitForString response timed-out waiting for "0x07 0xF0 0x00 0x99 0x01 0x04 0x4B 0x07 0x0F"
at org.openremote.controller.protocol.telnet.TelnetCommand.waitForString(TelnetCommand.java:207)
at org.openremote.controller.protocol.telnet.TelnetCommand.send(TelnetCommand.java:153)
at org.openremote.controller.protocol.telnet.TelnetCommand.send(TelnetCommand.java:131)
at org.openremote.controller.service.impl.ControlCommandServiceImpl.trigger(ControlCommandServiceImpl.java:95)
at org.openremote.controller.rest.ControlCommandRESTServlet.handleRequest(ControlCommandRESTServlet.java:77)
at org.openremote.controller.rest.RESTAPI.doPost(RESTAPI.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openremote.controller.rest.support.json.JSONCallbackFilter.doFilter(JSONCallbackFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)


Telnet_Command.jpg (image/jpeg)
Wireshark_log_telnet.jpg (image/jpeg)
Wireshark_log_telnet.jpg (image/jpeg)
TCP_Command.jpg (image/jpeg)
TCP_Command.jpg (image/jpeg)

The log does indicate that a Telnet session is initiated. However, OR expects response to the initiation (telnet prompt) - which it doesn't receive. Hence, no further commands are sent.

Posted by atamariya at Oct 15, 2013 04:26

Thanks for the investigation, meanwhile I have found a solution for this. I changed the command type from Telnet to TCP/IP to the following and it is working fine.

Posted by hennemarc at Oct 19, 2013 10:18
Document generated by Confluence on Jun 05, 2016 09:30