if Wifi disconnected then reboot

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
krystian-l
New user
Posts: 9
Joined: 21 Aug 2018, 12:20

if Wifi disconnected then reboot

#1 Post by krystian-l » 23 Sep 2018, 00:23

Hello,
I have sonoff basic with espeasy (mega-20180826)
every 1-2 weeks, sonoff stops responding (You can not see it over ip) :(

I have connected to GPIO-0 wall switch to turn on the light in the room.
When sonoff stops responding it also stops working wall switch (I can't turn light in the room) :/

Then I have to disconnect the voltage from sonoff.
I do not know what's going on :(

Maybe this rule would help?
If wifi disconnected then reboot espeasy

but is it possible to make this rule?

Thanks

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: if Wifi disconnected then reboot

#2 Post by enesbcs » 23 Sep 2018, 15:18

krystian-l wrote: 23 Sep 2018, 00:23 every 1-2 weeks, sonoff stops responding (You can not see it over ip) :(
Perhaps wifi is very weak at that spot or some kind of collision appear... Or if you have _more than one AP with the same SSID_, than the ESP may connected to the weaker of them, ESP is not able to connect to the strongest signal, it connects randomly(?) - the first AP it's sees - as i experienced.
krystian-l wrote: 23 Sep 2018, 00:23 Maybe this rule would help?
If wifi disconnected then reboot espeasy
but is it possible to make this rule?
Yes. But instant reboot will cause easily an endless loop of reboots, i think.
I am using the below rule all of my ESPEasy installations:

Code: Select all

on System#WifiState=0 do
  timerSet,1,180
endon

On Rules#Timer=1 do 
 If [wifiman#Connected] = 0
  reboot
 endif
endon
It means:
"if wifi disconnected, than check again in 180 sec, if still no connection, than reboot"
But first you need to activate the P166 WifiMan plugin:
https://github.com/enesbcs/ESPEasyPlugi ... iFiMan.ino

Forum topic:
viewtopic.php?t=2846

krystian-l
New user
Posts: 9
Joined: 21 Aug 2018, 12:20

Re: if Wifi disconnected then reboot

#3 Post by krystian-l » 24 Sep 2018, 07:29

Thank you for your help.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 33 guests