This page last changed on Nov 20, 2011 by coffeeguy57.

Is there any progress an the this. It seems I may be the only one in the need, I have multiple components that communicate with either hex or a combo of HEX ASCII. I have been using the Russound protocol and adding commands to the config file and broadcasting over the network. There seems to be a change and I will no longer be able to use this method in the future.

New versions of TCP, UDP and Telnet will be implemented where you can give HEX and HEX-ASCII as part of the command description and which also allow regex or other means of converting results back for the status. It's on the list but I cannot say any release date in the moment.

Posted by mredeker at Nov 21, 2011 07:50

Hi Marcus:

Is there a update when this functionality would be released? I would be willing to help develop this content if needed...

Posted by bcrosby at Dec 01, 2012 13:17

The 2.1 developer snapshot already allow hex for tcp and udp. Just add 0x infront of the data

Posted by mredeker at Dec 01, 2012 14:01

Wonderful! Thank you again!

Posted by bcrosby at Dec 01, 2012 14:45

Marcus:

I am attempting to send the following:

0x49|0x53|0x43|0x50|0x00|0x00|0x00|0x10|0x00|0x00|0x00|0x18|0x01|0x00|0x00|0x00|0x21|0x31|0x41|0x4d|0x54|0x30|0x30|0x0d

However, I get a indexOutOfBounds Exception. Looking at the code I do not see a hard set limit on the size of the input field. Thoughts?

2012-12-01 10:27:16,473 ERROR HTTP\-Thread\-22: Socket event could not execute
java.lang.StringIndexOutOfBoundsException: String index out of range: 117
at java.lang.String.charAt(String.java:694)
at org.openremote.controller.protocol.socket.TCPSocketCommand.hexStringToByteArray(TCPSocketCommand.java:194)
at org.openremote.controller.protocol.socket.TCPSocketCommand.requestSocket(TCPSocketCommand.java:153)
at org.openremote.controller.protocol.socket.TCPSocketCommand.send(TCPSocketCommand.java:138)
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:125)
at org.openremote.controller.rest.RESTAPI.doGet(RESTAPI.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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:58)
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:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

Posted by bcrosby at Dec 01, 2012 15:40

You don't need the | for the hex command.
Just define the command as: 0x495343500000001000000018010000002131414d5430300d

Posted by mredeker at Dec 01, 2012 21:12

Hello Markus,

is there now a way available via regex or other means to put a sensor on a hex-reply from the device and map this back to ASCII? If yes, can you give me a hint how to do or send me an example?

Marc

Posted by hennemarc at Nov 05, 2013 20:46

No, you cannot do anything with a hex-reply.
It will be put into a string (with a custom sensor). Maybe if no error occurs on the way that custom sensor can be put into a rule to transform this somehow, but that is a wild guess.

Posted by mredeker at Nov 05, 2013 20:58
Document generated by Confluence on Jun 05, 2016 09:30