I have a server-side application that needs to know within about a minute when a Cellular Particle (B523) is no longer “online”.
I understand so far that the cellular devices work with UDP and this use case is probably not optimal. Nevertheless, I would like to verify the possibilities.
I probably can’t work with the “spark/status” event, since this doesn’t trigger “offline” with the Gen 3 devices.
An idea would be to use the particle.keepAlive() and query the “last_heard” status. At the moment I only managed this via API and not via WebHook, so I would have to constantly poll the status of every device.
Another idea would be to use a custom event and forward it to my application via WebHook. Within the application, the “offline” event is triggered after a certain time window if no WebHook was received.
My “dream” would be to recognize within the particle cloud when a device is not online and only then to send a WebHook to my application.
Ideally, the whole thing should consume as little data as possible.
Does anyone have a good idea how my project can be managed most sensibly?
I would like to allow myself to link @rickkas7 because I know that he has experience with such things. Hope that’s all right.