Before I get started on cobbling something craptastic together, I just thought it would be worthwhile to see if anyone has come up with a library or a way to detect and notify if any of the devices in their Particle Cohort go offline for, say, longer than a couple of minutes?
Any news @kyleG? Thanks for the help
With Photons, the offline indication isn’t particularly reliable. In particular, if you just unplug the power the device may show online for quite some time. It could be hours. The best way to do this is to periodically send events from the devices and make sure you receive them.
You may want to investigate using the Server Sent Events data stream to receive these events. This allows your server to make an outbound connection to the Particle cloud servers and keep the connection open. Then events from the subscribed devices are sent in real time through this connection. This also allows the server to be behind a firewall, not have a static IP address, and still use TLS/SSL encryption while not having its own SSL server certificate.
There are examples of using SSE here: