My Photon is running in Manual System Mode because I do not want to be cloud connected al of the time.
The application connects autonomously once every hour to the cloud and then remains connected for about 40 seconds.
Apart from that I can make a manual connecting to the cloud when needed.
For connecting to the cloud (either manually or from whitin the application) I use a rather simple mechanism: I generate a System.reset () and then the first thing in the loop() is connect to the cloud. The connection is shut down simply by WiFi.off(), either as a part of the automatic procedure or of the manual procedure.
The part of my application that doesnot need the cloudconnection runs fine always. The part that requires cloud connection however shows occasionally a strange behaviour, not permanently, but a few times per day:
the status LED is first breathing cyan most of the time (which is good), but two strange things may also accur after some time:
- the LED is turns into solid Cyan and the system does not respond to any attempt to interact over the cloud through Particle console: the system is blocked.
- while breathing cyan, the LED all of a sudden starts blinking cyan very fast (as if it is losing connection) and then starts breathing cyan again and the system is acting normal again.
I have a feeling that both faulty situations might have to do with the same underlying problem, although they never occur simultaneously (as you could conclude from the description above).
In an attempt to analyse what is wrong I have been switching off parts of the application successively, I have been limiting the number of Particle functions and variables, I have been liiting the number of retained variables , etc, but all with no clear indication of where things might go wrong.
Does anybody has a good idea of how to tackle this issue in a more structured way, because my trial and error does not seem to bring me any further?