Page 1 of 1

Sonoff switch rules help

Posted: 26 Jun 2017, 20:58
by shenery
I have my rules set up with a sonoff switch like this.
on lightSwitch#Switch do
if [lightState#Switch]=0
gpio,12,1
else
gpio,12,0
endif
endon

My problem is, is that the switch doesn't seem to be connected to the WiFi all the time so when I click the push button on the sonoff it takes a couple of seconds for the green led to come on before the switch actually works. Does anyone have a solution for this? I'd like the push button to switch the relay instantly instead of waiting on WiFi connectivity.

Kind regards
Steven