esp lost connection

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

esp lost connection

#1 Post by megamarco83 » 04 Sep 2019, 15:01

hi, i have a nodemcu with espeasy build 20190226
every two or three days i lost connection of nodecmu and not respond anymore also http is not responding.
the only solution is power off manually and power on again, in this case become working again.
it's stressful because happened one a week minimum.
i try to change nodemcu, or flash again, or change version but noting change.
i use as device: pulse plugin (refresh every 30sec) ; DS1820sensor (refresh avery 40sec) ; and PCF to control 8ch relay
domoticz controll with http and mqtt enabled.

how i can solve?
wifi signal is good.
i also see that sometimes (once a day minimum) the esp reboot by itself.

if it's usefull i can post a log, if someone tell me how i have to export a usefull log.

if someone has suggestion please let me know.
thanks

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: esp lost connection

#2 Post by ThomasB » 04 Sep 2019, 18:17

Thanks to TD-er, the releases after mega-20190827 might fix the WiFi hangs. So try flashing the latest Mega version.
https://github.com/letscontrolit/ESPEasy/releases

- Thomas

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: esp lost connection

#3 Post by megamarco83 » 04 Sep 2019, 18:31

hi and thanks for reply.
i'll update to this version.

just a question: i need to select somethin of this option in advance menu?
Immagine11.jpg
Immagine11.jpg (43.87 KiB) Viewed 23435 times
eg: "restart wifi lost connection" what should do?
force wifi no sleep? could help?
periodical send gratuitos ARP could help?

thanks

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: esp lost connection

#4 Post by TD-er » 04 Sep 2019, 18:39

See here for an explanation of the options: https://espeasy.readthedocs.io/en/lates ... p#advanced

Gratuitous ARP is one you may want to check if you sometimes experience the node does not react anymore, or only after 10 - 60 seconds retrying.

Force WiFi B/G if you currently have a low RSSI value (< -70 dB)
Connection Failure Threshold will trigger a reboot if there have been a lot of failed connect attempts. So for example if you experience what you did experience (should not happen anymore ;) )
Best to leave it at 0, unless needed otherwise.

ssd
Normal user
Posts: 53
Joined: 19 Aug 2020, 12:04

Re: esp lost connection

#5 Post by ssd » 12 Nov 2020, 06:48

Hello everyone,

I am using ESP32 NODEMCU and working on reset on connection lost. But ESP32 is not resetting when there is no connection between the ESP32 & the wifi. Need some help. I am using ESPeasy(ESP32), Domoticz, and a local host wifi router.
Connection lost query.png
Connection lost query.png (18.36 KiB) Viewed 15444 times

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: esp lost connection

#6 Post by TD-er » 12 Nov 2020, 10:03

This setting you refer to is about counting the number of failed connect attempts.
However if it isn't connected to WiFi at all, there will be no connect attempt.

What you can do is keep track of the events in the rules and issue a reboot if it fails to connect or reconnect.

Just some example of how to do it (not tested, see https://espeasy.readthedocs.io/en/lates ... vents.html for more ideas)

Code: Select all

on System#Boot do
  timerSet,1,60  // Set timer 1
endon

on WiFi#Disconnected do
  timerSet,1,60  // Set timer 1
endon

on WiFi#Connected do
  timerSet,1,0  // Clear timer 1
endon

On Rules#Timer=1 do
  Reboot
endOn

ssd
Normal user
Posts: 53
Joined: 19 Aug 2020, 12:04

Re: esp lost connection

#7 Post by ssd » 12 Nov 2020, 12:08

TD-er wrote: 12 Nov 2020, 10:03 This setting you refer to is about counting the number of failed connect attempts.
However if it isn't connected to WiFi at all, there will be no connect attempt.

What you can do is keep track of the events in the rules and issue a reboot if it fails to connect or reconnect.

Just some example of how to do it (not tested, see https://espeasy.readthedocs.io/en/lates ... vents.html for more ideas)

Code: Select all

on System#Boot do
  timerSet,1,60  // Set timer 1
endon

on WiFi#Disconnected do
  timerSet,1,60  // Set timer 1
endon

on WiFi#Connected do
  timerSet,1,0  // Clear timer 1
endon

On Rules#Timer=1 do
  Reboot
endOn
Okay. Will check. Thank You :D

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: esp lost connection

#8 Post by ThomasB » 12 Nov 2020, 17:12

I don't advise using the Connection Failure Threshold feature. Otherwise plan on experiencing random reboots that will occur from it during normal use. Instead, use rules as suggested by TD-er.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests