for a project of mine i wanted to add a esp8266 to a "bullshit" button which should trigger an event (http) on every reset. The Button connects RST to GND. Then, for like 30 seconds the the LED should blink.
This is what i came up with with the espeasy rules engine:
Code: Select all
# dummy device "dummy" with "counter"(1) and "end"(2)
# led on gpio5
On WiFi#Connected do
TaskValueSet,2,2,0
timerSet,1,1
# or notify 1
SendToHTTP 192.168.8.2,80,/cgi-bin/suspend
endon
On Rules#Timer=1 do
if [dummy#counter]=0
TaskValueSet,2,1,1
else
TaskValueSet,2,1,0
endif
gpio,5,[dummy#counter]
TaskValueSet,2,2,[dummy#end]+1
if [dummy#end]!=60
timerSet,1,1
else
deepSleep,0
endif
endon
When i set
Code: Select all
deepSleep,5
Anybody had similar issues or found a workaround?