So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Tosho Yankov
#88026 Hello ,
i have several devices in my home based on ESP8266 (NodeMCU, ESP-01) and all of them have same problem.
They just hand time to time and have to be power off - power on to start again. This happen on every 2-3 days, which is not okay, because I not sure is my sensors work or not. Can you help me how to troubleshoot and solve this problem.
User avatar
By pangolin
#88029 It is very difficult to make an ESP8266 actually "hang", they usually reboot when there is a serious problem, so whatever is doing it should be easy to spot, especially as it is a regular thing.

Obviosuly we would need to see the entire code of tke sketch they are running to offer any futher help, otherwise all you wil get is guesswork.
User avatar
By Tosho Yankov
#88033 There is several of them:
1. It is simple ESP-01 with DHT22 sensor

https://codeshare.io/5ojM6Y

And other one is NodeMCU+BME280sensor:

https://codeshare.io/21jQB7

Both of them work for 2-3 days and hang. There is ping to them , but no data exchange or send.
User avatar
By pangolin
#88059 You need to explain what you mean by "hang". If you can ping them, they are not "hanging". Some error message output or wireshark trace would help.

One possible problem is that you only ever connect and start the server once in setup. If the wifi connection breaks, or you switch off your router then the server will time out and no longer be able to reply until you reboot the chip and go through the server.begin() again.