I am trying to ensure I have a reliable mechanism to determine whether devices are online or offline to a Web Console App. There are a couple of approaches I could use:
Particle List Cloud API command
Monitor spark/status event messages
Have devices all send a regular update event and if no event received within >2 cycle time then assume device offline
I note there are threads that say 1. and 2. are not 100% reliable and that has been my personal observation.
Does the community have any advice about which method to use?
I can second that observation. Currently, the console and command line say that my Electron is online, but I can clearly see it unpowered on my desk right now.
or
4. Polling, whenever you actively want to know (per device via e.g Particle.variable() or for a fleet via an event all devices subscribe to and answer via Particle.publish())