Hello,
I have a sonoff switch with easy esp installed.
I have set psucontrol with
curl http://192.168.0.20/control?cmd=GPIO,12,1
to start psu, same with 0 to stop.
My problem is with reading the state of the sonoff relay.
curl -s 'http://192.168.0.20/control?cmd=status,GPIO,12'|grep state|awk '{ print $2 }'
works when sonoff is on, but if i turn it off the lightning is always on, it never turns off.
(The command gives me 0)
Thank you for your responses.