TCP Binding, Switch work only ON command

Dear all,
I’m new to OpenHab, I have setup a switch that send two strings over a TCP port, ON command work correctly but the OFF one is completely ignored.

I did both way, with and without a map file with same result.

Switch Light_Salon “Salon” (gGF,Lights) {tcp=">[ON:‘on_cmd’], >[OFF:‘off_cmd’]"}
Switch Light_Ceiling “Ceiling” (gGF,Lights) {tcp=">[ON:‘MAP(’], >[OFF:‘MAP(’]"}

Any help on this ?

Many thanks,


1 Like

I have resolved, I had to remove the “,” between ON and OFF command, like this:

Switch Light_Salon “Salon” (gGF,Lights) {tcp=">[ON:‘on_cmd’] >[OFF:‘off_cmd’]"}

Now work correctly.