ESP active but webpages not reachable after some time
Moderators: grovkillen, Stuntteam, TD-er
ESP active but webpages not reachable after some time
Hello,
I am using ESP Easy since a few months now on 3 NodeMCU''s and I like it.
I only have a problem that the webpages cannot be reached after some time and the ESP is not in the IP-list of my router anymore.
All ESP's use DHCP and it looks like something is going wrong with renewing the IP-lease.
Strange enough the ESP's still report to Domoticz (on Raspberry) and they also react on commands from Domoticz.
Through the serial interface I can see that they are active as normal.
2 units is running on R120, the other on 2.0 dev 11 but all suffer from this problem.
Any ideas on what can cause this behavior?
I am using ESP Easy since a few months now on 3 NodeMCU''s and I like it.
I only have a problem that the webpages cannot be reached after some time and the ESP is not in the IP-list of my router anymore.
All ESP's use DHCP and it looks like something is going wrong with renewing the IP-lease.
Strange enough the ESP's still report to Domoticz (on Raspberry) and they also react on commands from Domoticz.
Through the serial interface I can see that they are active as normal.
2 units is running on R120, the other on 2.0 dev 11 but all suffer from this problem.
Any ideas on what can cause this behavior?
Re: ESP active but webpages not reachable after some time
Well, it seems I am the only one with this problem.
At least I have found a workaround, using the fact that the ESP still reponds to commands from Domoticz.
I added a rule that reconnects to wifi and can be triggered from Domoticz. After that I have access to the unit again.
Since I don't need the web-gui very often this is acceptable...
At least I have found a workaround, using the fact that the ESP still reponds to commands from Domoticz.
I added a rule that reconnects to wifi and can be triggered from Domoticz. After that I have access to the unit again.
Since I don't need the web-gui very often this is acceptable...
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: ESP active but webpages not reachable after some time
So it sounds like a router problem ..2 units is running on R120, the other on 2.0 dev 11 but all suffer from this problem.
but ...
Commands from Domoticz ... by name or IP address?and they also react on commands from Domoticz
Did you make a mix of DHCP and Static IP's?
Did you try only static IP's ?
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: ESP active but webpages not reachable after some time
Domosapiens,
yes, it may be a router problem but the ESP's are the first devices with this problem.
From Domoticz I send the commands using ESP-ip. Btw, curl or ping from the RPI also works. Using the web-browser fails.
Static IP may well solve the problem but I'd rather us the IP-reservations of my router.
I'll give one of the units a static IP and see what happens...
yes, it may be a router problem but the ESP's are the first devices with this problem.
From Domoticz I send the commands using ESP-ip. Btw, curl or ping from the RPI also works. Using the web-browser fails.
Static IP may well solve the problem but I'd rather us the IP-reservations of my router.
I'll give one of the units a static IP and see what happens...
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: ESP active but webpages not reachable after some time
Don't understand that ... DHCP can give different IP's to a node.From Domoticz I send the commands using ESP-ip
Do you have fixed IP's to MAC addresses within DHCP?
Static IP's are also reservations in the router, only outside the DHCP block.but I'd rather us the IP-reservations of my router
Another suggestion:
Are you above the capability of your router?
F.i. my D-Link DIR-655 has only 25 DHCP addresses.
I use DHCP for mobile things and Static for fixed things (like Desktop and ESP's)
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: ESP active but webpages not reachable after some time
Yes I have, but that is not a static IP.
I static IP is managed by the device not by the router, that is why it must be outside the DHCP-block and
why I'd rather use the router functionality to reserve a certain IP for a specific MAC.
Anyway, I've set one of the ESP's to a fixed IP (so in the ESP-config) and see if that helps.
Re: ESP active but webpages not reachable after some time
Hello all,
i use a similiar setup - i have a DNS/DHCP on an old Raspberry B and use a Ubiquiti AP for WiFi.
Due to my experience some home routers have a not really clean implementation of DHCP.
Using fixed IP's by assigning the mac to an IP adress with the router may fail if this
address is outside the DHCP range for example.
To decide if this is a ESP or router related problem a simple test should work:
If your ESPs are failing, do not touch them - reset the router instead.
If the ESPs come back then, it's more likely a router problem.
If only resetting ESP works it's more of an ESP failure i assume.
Regards
Shardan
i use a similiar setup - i have a DNS/DHCP on an old Raspberry B and use a Ubiquiti AP for WiFi.
Due to my experience some home routers have a not really clean implementation of DHCP.
Using fixed IP's by assigning the mac to an IP adress with the router may fail if this
address is outside the DHCP range for example.
To decide if this is a ESP or router related problem a simple test should work:
If your ESPs are failing, do not touch them - reset the router instead.
If the ESPs come back then, it's more likely a router problem.
If only resetting ESP works it's more of an ESP failure i assume.
Regards
Shardan
Regards
Shardan
Shardan
Re: ESP active but webpages not reachable after some time
Got the same issue here, solved it for now with rebooting the esp every two hours, notice that now, the webserver stays up, the connection solution above was not working because the ESP keeps the wifi connection.
Without 2 hours reboot, cannot ping it then anymore, webserver not working, use a fixed ip everywhere, and also see that its still connected to the accesspoint, when I walk in front of the PIR (input switch), the connection will come back and can connect with the webserver. (the following not sure, can test, but even refresh or ping multiple times, will not bring him to life)
Also noticed now when i reboot them every 2 hours, want to connect to the webserver, connection failed in browser, refresh and webserver is loading, (56min running) dont use any sleep option. Not sure but it looks like the ESP going in a sleepmode on his ip stack when no clients connected, webserver and ping not working, refresh the page 1-2-3 times, and webserver and ping is coming up. When I ping the ESP the whole time, the connection stays up and webserver is responsive. Stop the ping from a client and after 5min, the webserver and ping stops responding till you refresh (f5) in browser or use ping, as you can see below it takes 5 sec to become alive.
Pingen naar 192.168.50.231 met 32 bytes aan gegevens:
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.231: bytes=32 tijd=106 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=25 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=3 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=3 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=95 ms TTL=128
Board : NodeMCU v3 (got it with 3 different boards, 2x4mb, 1x16mb)
GIT version: v2.0.0-dev11
Uptime: 0 days 1 hours 20 minutes
Load: 16% (LC=25339)
Free Mem: 22184 (16480 - sendWebPageChunkedData)
Hope it helps
Without 2 hours reboot, cannot ping it then anymore, webserver not working, use a fixed ip everywhere, and also see that its still connected to the accesspoint, when I walk in front of the PIR (input switch), the connection will come back and can connect with the webserver. (the following not sure, can test, but even refresh or ping multiple times, will not bring him to life)
Also noticed now when i reboot them every 2 hours, want to connect to the webserver, connection failed in browser, refresh and webserver is loading, (56min running) dont use any sleep option. Not sure but it looks like the ESP going in a sleepmode on his ip stack when no clients connected, webserver and ping not working, refresh the page 1-2-3 times, and webserver and ping is coming up. When I ping the ESP the whole time, the connection stays up and webserver is responsive. Stop the ping from a client and after 5min, the webserver and ping stops responding till you refresh (f5) in browser or use ping, as you can see below it takes 5 sec to become alive.
Pingen naar 192.168.50.231 met 32 bytes aan gegevens:
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.231: bytes=32 tijd=106 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=25 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=3 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=3 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=95 ms TTL=128
Board : NodeMCU v3 (got it with 3 different boards, 2x4mb, 1x16mb)
GIT version: v2.0.0-dev11
Uptime: 0 days 1 hours 20 minutes
Load: 16% (LC=25339)
Free Mem: 22184 (16480 - sendWebPageChunkedData)
Hope it helps
Re: ESP active but webpages not reachable after some time
Looks similar indeed.
I also thought of doing a reboot regularly but since the ESP keeps wifi connection my rule now contains a WifiDisconnect followed by a WifiConnect.
That works and does not destroy logs and settings.
I also thought of doing a reboot regularly but since the ESP keeps wifi connection my rule now contains a WifiDisconnect followed by a WifiConnect.
That works and does not destroy logs and settings.
Re: ESP active but webpages not reachable after some time
Hehe, now trying youre solution on one ESP, guess this should also work fine.
On System#Boot do
TimerSet,1,7200
endon
On Rules#Timer=1 do
WifiDisconnect
WifiConnect
TimerSet,1,7200
endon
What timer settings value do you use ?
On System#Boot do
TimerSet,1,7200
endon
On Rules#Timer=1 do
WifiDisconnect
WifiConnect
TimerSet,1,7200
endon
What timer settings value do you use ?
Re: ESP active but webpages not reachable after some time
Ok, I tried using a fixed IP but the results are no different so I switched back to DHCP.
I do not use a timer to trigger my rule.
Whenever I need to access an ESP whose webgui has become unreachable I trigger the event from the RPI-commandline using
I do not use a timer to trigger my rule.
Whenever I need to access an ESP whose webgui has become unreachable I trigger the event from the RPI-commandline using
Code: Select all
curl http://ESP-ip/control?cmd=event,reconnect_wifi
Re: ESP active but webpages not reachable after some time
I have the same problem with ArduinoEasy with fixed ethernet, encj2860 ethernet shield , no wifi. Ping works, webserver no response...
Re: ESP active but webpages not reachable after some time
Did anyone try to restart the router instead of the ESP's?
Would be interesting if the website comes up after restarting the router.
Another interesting point:
As long as the website is reachable, watch the memory value, or send a System Info about memory to the controller.
This behaviour might be caused by a memory leak when using a specific plugin for example.
Would be interesting if the website comes up after restarting the router.
Another interesting point:
As long as the website is reachable, watch the memory value, or send a System Info about memory to the controller.
This behaviour might be caused by a memory leak when using a specific plugin for example.
Regards
Shardan
Shardan
Re: ESP active but webpages not reachable after some time
I do not restart the ESP but force it to reconnect to wifi; I think restarting the router will have the same effect.
One of my ESP's is just idling without any devices, I will let it report free memory and see if that gives a clue.
One of my ESP's is just idling without any devices, I will let it report free memory and see if that gives a clue.
Re: ESP active but webpages not reachable after some time
It is not completely the same effect.
An idling ESP without devices will show if one of the plugins you need has a memleak.... really sure?One of my ESP's is just idling without any devices, I will let it report free memory and see if that gives a clue.
Regards
Shardan
Shardan
Re: ESP active but webpages not reachable after some time
Local Time: 2017-08-08 18:09:07
Free Mem: 22592 (16168 - sendWebPageChunkedData)
Start the ping after 5min.
Pingen naar 192.168.50.231 met 32 bytes aan gegevens:
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.231: bytes=32 tijd=88 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=109 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=28 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=8 ms TTL=128
Local Time: 2017-08-08 18:14:36
Free Mem: 22592 (16168 - sendWebPageChunkedData)
So the mem did not change during the 5 min, hope it helps
Free Mem: 22592 (16168 - sendWebPageChunkedData)
Start the ping after 5min.
Pingen naar 192.168.50.231 met 32 bytes aan gegevens:
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.199: De doelhost is niet bereikbaar.
Antwoord van 192.168.50.231: bytes=32 tijd=88 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=109 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=28 ms TTL=128
Antwoord van 192.168.50.231: bytes=32 tijd=8 ms TTL=128
Local Time: 2017-08-08 18:14:36
Free Mem: 22592 (16168 - sendWebPageChunkedData)
So the mem did not change during the 5 min, hope it helps
Re: ESP active but webpages not reachable after some time
Same here: free mem stays at 27960 all the time (which is about 3 days now).
Re: ESP active but webpages not reachable after some time
I was having similar issues with a basic sonoff device when connected to mains. I soldered a 470uf cap to the power pins used for programming and zero issues since.
Just a possible point to check!
Just a possible point to check!
Re: ESP active but webpages not reachable after some time
Which pins exactly?
I'll check and might place a tipp in the wiki.
Regards
Shardan
Regards
Shardan
Shardan
Re: ESP active but webpages not reachable after some time
Re: ESP active but webpages not reachable after some time
I tried you're solution but no luck,...soldered a 1000UF capacitor between GND and VCC on the header but the issue is still there.
Re: ESP active but webpages not reachable after some time
Looks like (not sure) the 1000UF condensator is helping a bit, but the main issue is still there, found more ppl with the same problem.
More Info https://github.com/nodemcu/nodemcu-firmware/issues/578
So i guess the issue is only on Nodemcu ? If I ping the ESP the whole day,...the issue is gone, but for me that's no solution.
Now made a blocky event for the switch, so i can use it from domoticz with 5x the same URL, so i know for sure the switch will go on, downside, has some delay, and programming is not super clean, but now I can the ESP for this project.
2017-08-27 18:29:35.688 EventSystem: Event triggered: CarportTest_1
2017-08-27 18:29:35.688 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.690 (Dummy) Lighting 1 (Carport Test)
2017-08-27 18:29:38.971 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
2017-08-27 18:29:41.934 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
2017-08-27 18:29:44.933 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
More Info https://github.com/nodemcu/nodemcu-firmware/issues/578
So i guess the issue is only on Nodemcu ? If I ping the ESP the whole day,...the issue is gone, but for me that's no solution.
Now made a blocky event for the switch, so i can use it from domoticz with 5x the same URL, so i know for sure the switch will go on, downside, has some delay, and programming is not super clean, but now I can the ESP for this project.
2017-08-27 18:29:35.688 EventSystem: Event triggered: CarportTest_1
2017-08-27 18:29:35.688 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.689 EventSystem: Fetching url...
2017-08-27 18:29:35.690 (Dummy) Lighting 1 (Carport Test)
2017-08-27 18:29:38.971 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
2017-08-27 18:29:41.934 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
2017-08-27 18:29:44.933 Error: Error opening url: 192.168.50.231/control?cmd=event,testrelais
Who is online
Users browsing this forum: No registered users and 0 guests