This is an interesting doubt! Thinger.io Server creates an internal event when any device status is modified. This event can be triggered with Node-RED plugin creating a simple flow as shown in the image below:
This implementation only can made if you are working with a private instance, as you need to deploy the Node-RED plugin, and there is not any tool on the main platform that allows triggering this event to call an endpoint yet.
And here there is a post about how to read data from buckets:
You may apply the same method to read the ESP’s api, what you need is to determinate in the array of devices, how to identify which one is online and which is offline, and trigger the endpoint with the alert from the “watchdog device”, and of course you need to warranty that the watchdog is always online (that have power supply and internet access), and code to execute the consult to online devices every timelapse you consider appropriate.
using node-RED is quite simple, you don’t have to program anything, just place the two nodes and configure it in order to detect the device you wan’t to monitor (or every devices if you don’t select an specific one in the server_event node) and then, placing the second node with the endpoint call you can send the notification to an email address or telegram.
Place a “Server_event” node, and select the event “type”:Device_state_change, then in the “device” section you can place the ID of the device you want to monitor (or leave it empty if you want to monitor the whole network). Finally, select the “state” you want to monitor Connections, Disctonnections or Any depending on your requirements.
Placing a second node with Endpoint call function, it is possible to send this JSON to an endpoint, allowing to alert us via telegram or email working with the device data. As you can see in the image below, I’m going to name my new endpoint with the ID: “alert”