This page last changed on Nov 16, 2015 by freddyc.

Hi, I have been working on Openremote for months and got Logitech Harmony Hub working without much trouble including panels for several android and Ipads. I also have had TCP/IP, HTTP and Telnet working to ESP8266 but as I have to rely on sensor polling the feedback to many devices will be unsatisfactory. I also have UDP working to control devices but I cannot get UDP listener to work. I think this may be due to using Java 8 but I have tried to find JDK 6 without any success. I do not appear to receive any input on my UDPlistener port so there may be 2 problems. I have read everything I can find on setup and in the forums but there does not seem to be a definitive explanation of setting up UDPlistener - just explanations like 'I have a UDP sensor tied to a custom port with a virtual state command etc' or 'you will have to associate your virtual state command with your switch". I have tried hundreds of switch and virtual switch/commands over the last month, 4-5 hours a day. I did investigate many other opensource smart home controllers but if I could get them to work there was always something missing.
If you have read this far, thankyou, If you can help I thankyou greatly. Otherwise at least I now feel better.
I do appreciate the effort required to get this project as far as it is.

UDPListener does work fine for me. I assume you have seen my system's description

Are you sure the UDP packets do arrive at the machine where you installed The OpenRemote Controller. I did use TCPDUMP for checking the traffic on both sides.

Posted by pz1 at Nov 16, 2015 11:21

Thanks, I have read your system description as well as seen it in the forums. I have been using wireshark to monitor the UDP packages and it looks OK, but I am beginning to think there may be some error in format or something causing UDPlistener not to recognise it. I will look at tcpdump and see if that helps me.

Posted by freddyc at Nov 16, 2015 21:52

Haven't tried tcpdump yet. I have been changing my setup to be similar to yours. I am including some output from the logs with what I think could be problems. The first 2 lines are at the beginning of the controller deployment and from other forum topics seem to suggest I need java 6.
The other lines are from the end of deployment and to me, show the drools rule engine is running?
I have a UDP-status command and a UDP-status sensor. The LCLvb command should run from the rules to store the result.
{2015-11-17 14:59:27,752 INFO main: Registered sensor : Sensor (Name = 'UDP-1-Status', ID = '107672251', State Mappings: {})
2015-11-17 14:59:27,753 INFO main: Registered sensor : Sensor (Name = 'LCLsensor', ID = '107671778', State Mappings: {})
2015-11-17 14:59:27,754 INFO Polling Sensor Thread ID = 107671778, Name ='LCLsensor': Started polling thread for sensor (ID = 107,671,778, name = LCLsensor).
2015-11-17 14:59:27,754 INFO main: Registered sensor : Sensor (Name = 'LCLvb', ID = '107672256', State Mappings: {})
2015-11-17 14:59:27,755 INFO Polling Sensor Thread ID = 107672256, Name ='LCLvb': Started polling thread for sensor (ID = 107,672,256, name = LCLvb).
2015-11-17 14:59:27,755 TRACE Polling Sensor Thread ID = 107672256, Name ='LCLvb': Processed '', received ''}

Posted by freddyc at Nov 17, 2015 04:26

suggest I need java 6

This level I have to leave to the "java boys".
(My installation runs with Java 7 on a Synology 214+ NAS.)

Haven't tried tcpdump yet

If you have looked at communication with wireshark, I think there is no need to use tcpdump. I did use that because it seemed simpler to me at the time.

Posted by pz1 at Nov 17, 2015 07:55


I see mention of rules. If this is the case then indeed JRE 6 is a must.

You don't need the full JDK just the runtime environment: -

As for UDP Listener, the protocol works ok it just depends what you are doing with the commands. I always try connecting commands to custom sensors and then to a label for debugging purposes.


Posted by kurrazyman at Nov 18, 2015 10:30


I see mention of rules. If this is the case then indeed JRE 6 is a must

Not necessarily! I am running this rule that parses the data received by UDPListener for definitely a year or so with JRE7 on different versions of the Pro controller.
I must admit it is the only rule I have, and I have given it a name of it's own, so designer can not spoil it.

Posted by pz1 at Nov 18, 2015 10:45

There is no reason to be using JRE7+ with OpenRemote so if anyone asks for help the first thing is to get to a known good/supported configuration then we can help.

There are posts in the forums suggesting install the latest JRE as latest is obviously the best but that's when things don't work for users (when using rules).


Posted by kurrazyman at Nov 18, 2015 10:49

I have seen many warning messages that express security concerns about these older Java versions...

Posted by pz1 at Nov 18, 2015 12:10

Haven't had much time today but I have java 6 jre and java 8 jre & jdk & the only way I can get Openremote to run is with JAVA_HOME set to jdk8 in user variables. This produces the following error,




2015-11-18 11:19:52,347 ERROR Controller Definition File Watcher for Default Deployer: Error in rule definition 'modeler_rules.drl' : wrong class format
java.lang.RuntimeException: wrong class format

Try again tomorrow!

Posted by freddyc at Nov 19, 2015 06:52

Considered giving up. Eventually installed jdk1.6 and still received rules error when starting controller. However, when I tried it today the error was gone.
My UDP string is "LCL,on". IT could be any 3 uppercase characters followed by a comma followed by a number(temp) in the range -9.9 to 99.9 or "on" or "off".
my regex expression is (A\-Z

Unknown macro: {3}
),(\-1\-9?0\-9?\.0\-9|on|off). This works fine in 'online regex tester' (after several hours).
In OR this produces this message;

java.lang.IllegalStateException: No match found
at org.openremote.controller.protocol.socket.UDPListenerCommand$

which disables the UDP port.
Any help greatly appreciated.

When you read this replace "unknown macro" in regex with ]. I have not been able to get it to display correctly. OK in edit mode.

Posted by freddyc at Nov 24, 2015 06:08

One little advise: Include your code/output fragments in {code}..{code} tags. Makes things better readible.
Sorry can't give you more help

Posted by pz1 at Nov 24, 2015 09:29
Document generated by Confluence on Jun 05, 2016 09:33