I have a simple switch that needs to perform a webcall. The switch is a traditional wall switch, meaning it is ether on or off, only on a state change it should send the http call 1 time (the web call toggles the light state).
I have the internal pullup enabled and I use rules to manage the action.
Now, the problem is that when the ESP reboots this works fine, but after a while, the command call keeps being executed every second or so. Big issue since I have this installed in my 6-year old's bedroom and last night his light started going on and off all night

Does anyone know what the problem could be and how to solve it ? I already implemented rules because when using the web page provider I had the same issue ...
Thanks to anyone willing to help me out here !!!
my rules:
Code: Select all
On System#Boot do //on boot
timerSet,1,300
endon
On Rules#Timer=1 do
Event reconnect
timerSet,1,300
endon
On reconnect do
WifiDisconnect
WifiConnect
endon
On switch1#Switch do
SendToHTTP 192.168.77.94,80,/o_toggle.php?id=60
endon