Long term stability using NodeMCU
Posted: Sun Oct 09, 2016 4:13 pm
I'm having long term stability issues using a NodeMCU directly powered by a mobile phone charger connected to its micro USB port. The device is posting data to a server on the internet once per minute, and it never worked more than one week, sometimes works only a few minutes or hours, but most of the times it works for several days but no more than one week. It then gets blocked and it is necessary to power it off and on to recover. I'm using the latest framework - 2.3.0. From your experience, the NodeMCU hardware can be used in a device that should work 24/7? Any idea of what could be the issue? Any tip to try to diagnose the issue?
After facing this problem I added some debug but it seems it got even worse, I started logging errors (communication errors with the server) to a file (so I added SPIFFS) and also added the webserver to retrieve the log file, but after some days working without failures it is now failing very fast after each power/down/up cycle. When I introduced this log file I also introduced an automatic reset after n consecutive communication failures with the server (and added a post of millis to the internet server, so I can identify when the node resets), but even that way it blocks after some days. I also added the post of the heap size available every minute to the internet server to try to identify any memory leak, but it is constant until the node blocks (about 33k available).
Any alternative way to avoid the node blocking will be much appreciated!
Best regards
Fernando
After facing this problem I added some debug but it seems it got even worse, I started logging errors (communication errors with the server) to a file (so I added SPIFFS) and also added the webserver to retrieve the log file, but after some days working without failures it is now failing very fast after each power/down/up cycle. When I introduced this log file I also introduced an automatic reset after n consecutive communication failures with the server (and added a post of millis to the internet server, so I can identify when the node resets), but even that way it blocks after some days. I also added the post of the heap size available every minute to the internet server to try to identify any memory leak, but it is constant until the node blocks (about 33k available).
Any alternative way to avoid the node blocking will be much appreciated!
Best regards
Fernando