AcmeUK wrote:You do not say if you are using the Arduino IDE or the ESP8266 SDK.
Eli Lurie wrote:(Arduino framework)
BTW. An IDE is only the development environment (the thing you type your code in; you could also use Notepad if you'd wish).
As AcmeUK says, it sounds like deep sleep is not working correctly every time.
Because it's a problem that occasionally occurs, you'll have to put some more (and creative) effort to find the culprit.
I think your best (and quickest) bet to tackle the problem is to:
- Get hold of the entire hardware-portion (PCB) from a client that gives the most problems (just swap it out)
- Flash it with exactly the same code, except for the deep sleep time-out: instead of waking up every hour, let it wake up every five (or less) minutes
- Connect GPIO1 or GPIO2 (both are outputting the same at boot) to a monitoring PC set to 74880 Baud and let it monitor (and log) all boot messages
- Wait 'till it fails and analyze the error (and/or paste the entire boot message here)
Please note that the ESP has very strict (absolute minimum and maximum) power requirements: it must be very stable and filtered (by using a small capacitor very close between the VCC and GND pins) at 3.3V (NOT 5V) and at least able to deliver at least 300mA, but preferably more (say 500mA).