HELP! I´m getting frustrated, just started using OpenHab but I can´t send a simple UDP message

Dear all,

Sorry for my frustration.
Started with OpenHab that seems the best software for me to control my house, but I cannot understand wha is wrong with my simple code using UDP bindings.
Attached is my small test code.
When I turn the switch on, it send an ON by UDP, instead of a start string (also with a lot of exceptions on the debug), and does nothing when I turn the switch to off.
Can you help me? Im out of ideas

Salm.items

Switch Mykey “Mykey” (Lab) { udp=">[ON:127.0.0.1:8899:‘MAP(my.map)’], >[OFF:127.0.0.1:8899:‘MAP(my.map)’]" }

Salm.sitemap

sitemap demo label=“Demo House”
{
Frame {
Switch item=Mykey
}
}

my.map

ON=start;
OFF=stop;

I have put the TCP,UDP binding in the addons.

Thanks

Try:

Switch Mykey "Mykey" (Lab) { udp=">[ON:127.0.0.1:8899:'MAP(my.map)')], >[OFF:127.0.0.1:8899:'MAP(my.map)']" }

Edit: according to the wiki you are missing a parenthesis:
tcp=">[ON:192.168.0.1:3000:‘MAP(my.device.map)’)], >[OFF:192.168.0.1:3000:‘MAP(my.device.map)’]"

No changes, still the same error.:disappointed:

There was a bug in openHAB 1.8.0 (latest release) related to this binding, that will be fixed in 1.8.1. It may be that this hot fix JAR will solve the problem.

Hello all.

Problem fixed.
I had already downloaded the fix but left in the addons directory the old tcp/udp binding file.
Now I deleted it and commands started to work.
Thanks to all.

1 Like

Hey bro…

Need your help,

Do we need to write any rule for simply switching the light on and off using TCP or UDP as you did??