I am having a solar / battery driven Electron which is put into deep sleep for four minutes, wakes up, is awake for one minute to collect sensor data and goes back to deep sleep.
Code is set to work in semiautomatic mode with turning on cellular and connecting to particle after waking up from deep sleep.
The whole things works for just about a day +/- a few hours but then suddenly the console stops receiving events but Electron just works as normal - wakes up - goes back to sleep, etc. It also acquires cellular network as fast as usual.
One thing I notice is that in the mobile particle.io app there is a "last heared" field which accurately matches the time the Electron was awake and send off a publish.
However when console (and every subscribe) stops to receive messages the "least heared" drops to a value of "6 hours" and increases with the time no messages are sent.
The Electron however continues to wake up and go back to deep sleep - When it's awak I can even use the "Signal for 10 sec"-Function and the Electron instantly begins to signal via LED.
Here's my code:
To fix this I have to completely remove the Electron from power supply or battery. A reset via Push-Button won't fix the issue.
Could this be a problem with deep sleep and session re-use so that the session is expired but the Electron is still trying to make a re-use!? That would explain why this issues always appears after the same amount of time ...
EDIT:
I have activated system logging and here's the dump from console when device wakes up but the publish never arrives in console or api client:
As you can see, the cloud connection has successfully been made and also the publish is being send. But then some strange things happen which I cannot identify.
In contrast to this here's dump from a wake up when everything works normally:
@RWB - @ScruffR - Any advices here!?
EDIT: 22nd of May:
I just can confirm that the issue appeared this morning on another Electron running same software. It ran for three days without any issue at all. See detailed info in an answer below: