Purpose: I have a basement ejector pump that likes to sometimes get stuck. I have a shock sensor attached to a pipe that triggers when the pump engages. I’d like to poll the device and know if it hasn’t triggered for a particular period and create an alert so that I know the float switch might be stuck.
As far as I’m concerned, getting the last activity value for a device from the API would be the easiest way for me to apply this solution. However, I don’t see anything in the documentation that will display a device’s Last Activity (like in the IDE).
While Device Monitor appears it will do the trick in some fashion, I was still hoping I could use the API to view the last update timestamp. The reason being is that I would like to tie the alerts into a real notification system like PagerDuty.
I don’t want the lastUpdate value to change. I just need to be able to read something that tells me what the lastUpdate timestamp was for the device.
One would expect this information to be contained in the /devices//status output of the REST API, but I only see the current device state… not lastUpdate or lastActivity…