I'm planning a project that involves a number of ESP8266 controllers that talk back to a central Uno which manages them all through another 8266 and finally serves a remote control facility. The only thing is that the connectivity and each controller needs to be robust and reliable. I have little margin for them to go offline and need human intervention.
I coded a proof of concept and noticed the one ESP8266 with a simple webserver seems to a bit unstable. Before you ask, the code logic is not the issue. It seems likely that even though it's still wifi connected, it doesn't receive the request or doesn't process it for a while.
Here are some of the issues:
Inconsistently takes up to 15-20 seconds to respond. Sometimes right away.
One request gets no response, but a second (different client) GET request kicks it off and it responds back to both requests.
It just doesn't respond till it times out, connection closed, etc. but the very next request works.
Worst case, at some point it just stops responding all together and only a hard reset gets it back online. Meantime I can still see it's IP and ping it
Are there a list of best practice or tips and tricks you can suggest that generally improve it's and other controller's stability? Are there commands that are known to be flaky? etc.?
Power supply for the device is important - google that , I think a capacitor across the Vcc/gnd helps .
I use one of these to control an outside light - it did drop out , but cured by restarting it if the connection was not available . Haven’t the code for that at hand , but found by googling problems with this chip
Thanks all. I've taken some pointers to implement.
Most of all I've decided to simplify the 8266 code to the absolute bare minimum with the highest efficiency. So just making very simple HTTP requests with JSON response. Minimal code, minimal libraries, etc. and any hard work other to be done by a secondary server. That makes the architecture more complicated but each device is a lot simpler.