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:10.0.2.236:5001:‘on_cmd’], >[OFF:10.0.2.236:5001:‘off_cmd’]"}
Switch Light_Ceiling “Ceiling” (gGF,Lights) {tcp=">[ON:10.0.2.236:5001:‘MAP(switch_lights.map)’], >[OFF:10.0.2.236:5001:‘MAP(switch_lights.map)’]"}

Any help on this ?

Many thanks,

Cristiano

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:10.0.2.236:5001:‘on_cmd’] >[OFF:10.0.2.236:5001:‘off_cmd’]"}

Now work correctly.

Criss