I got Sonoff Switch https://www.itead.cc/sonoff-wifi-wireless-switch.html and uploaded EspEasy firmware to it.
Also I added logic to the Rules to make button on device available to switch the relay.
Here it is:
Code: Select all
on relay#switch do
if [relay#switch]=1
gpio,13,0
else
gpio,13,1
endif
endon
on button#switch=0 do
if [relay#switch]=0
gpio,12,1
else
gpio,12,0
endif
endon
BUT... it has some delay between pressing button!
I mean, it's not possible to press button, for example, 2 times in 1 second.
Maybe it's possible to add to settings some Device that will connect button and relay directly?
Or I must edit some setting?