After a recent router failure i experienced that ESPEasy would not reconnect to WiFi on its own. A device reboot was required.
All my devices run a stable version of ESPEasy Mega-......
I could not find a script to monitor WiFi without use of plugins not available in the basic stable version, and i try to stay off the {b}leeding edge...
So i cobbled this together, i tested this on many versions and it worked for all Mega....
Code: Select all
on System#Boot do
Let,1,0 // set user variable to initial state of 0
EndOn
on Wifi#Disconnected do // if no wifi, wait 3 minutes
if [VAR#1]=0
timerSet,1,180
Let,1,1 // set user variable 1 to 1 to prevent re-set of var1 on each event.
endif
endon
on Wifi#Connected do // if wifi returns, cancel reboot
timerSet,1,0 // cancel timer
Let,1,0 // set user variable 1 to 0
endon
On Rules#Timer=1 do // if still no Wifi, reboot
reboot
endon
If you have improvements or a beter idea, share please
Regards,
Rob