[SOLVED] Switch command using http binding not working

Hi I am using below syntax, but it is not working, normal url through browser or curl is working and I am able to change the state of ESP01 relay state.

Switch nexa "esp01" { http=">[RELAYON:POST:] >[RELAYOFF:POST:]" }

I don’t believe “RELAYON” and “RELAYOFF” are valid values for the command portion.

my URLs for switch off and on are below, which is to be integrated with openhab2. &

item file:
Switch nexa "nexa" { http=">[RELAYON:]>[RELAYOFF:]" }
Switch nexa "nexa" { http=">[ON:],>[OFF:]" }

Thanks Vincent, I had modified the code to look for /ON & /OFF in URL :slight_smile :slight_smile: and it is working now, but i will check this to clear my doubt. &

Switch nexa "nexa" { http=">[ON:],>[OFF:]" }
1 Like

Glad you got it sorted, please mark the thread as solved, thanks