Scenario, In my utility room i have a power socket with a built in circuit breaker. Connected to this is a HVAC condensate pump which I just so happened to have issues with and it tripping my socket (meaning it was no longer available to pump).
I want to ideally connect a smartthings power outlet into this socket and the pump into the smartthings power outlet. I think want to basically monitor the last time ST heard from the socket and if it was say greater than 5 minutes send a notification.
Sounds simple but doesn’t seem so easy.
My thoughts were as follows, modify the STs outlet device handler to self ping itself and store the ‘last updated time’ in a state variable.
I can then create a custom smartapp to monitor this last updated time state and pop a notification if greater than a given time.
I would be interested in peoples thoughts? Is there an easier way?
I had tried adding runEvery5Minutes(handler) into the device handler but it seems this function is only available in the SmartApps.
I am just exploring zigbee.configureReporting() as a possibility right now.
Zigbee devices don’t ping themselves or any other device except the coordinator. So that approach isn’t going to work.
But there are several “wellness check” smart apps that would probably give you what you want. Most of them just look for the most recent event in the logs, which reduces traffic on the network and is usually sufficient.
First, I think you’ll find zigbee devices report a little more often than you think. There’s typically a check in process with the Coordinator.
Another option would be to get a power socket which reports on energy usage. You can set how often those report, and so you could easily create an event that way that could be tracked in the log.
In general, if you force reporting often enough to be useful for what you’re envisioning, you’re going to flood your network with polling messages. That could result in problems all over the mesh. The usual rule of thumb is to limit polling to 5% of total traffic.
An entirely different approach, of course, would be to use a WeMo pocket socket or another Wi-Fi device. Those have constant connection and device monitoring is much simpler.
I’ve never worked with a Zigbee device that I wasn’t able to make it report on a regular interval. Although if you turn off a Cree Connect Bulb and then turn it back on, it won’t start reporting again on its own.
There doesn’t appear to be a way to do this with Z-Wave devices unless they support the wakeup command class.
The example below will make the Zigbee device report the switch state every 10 minutes.
In ZigBee, there are three different types of devices: end device, router, and coordinator. The key difference between these is that an end device can not route traffic, routers can route traffic, and the coordinator, in addition to routing traffic, is responsible for forming the network in the first place. Every network must have one and only one coordinator. These differences dictate the different features of each type of device.
I was just trying to answer the question precisely, sorry if it came across wrong. Since it is a multiprotocol platform, Smartthings makes up its own terminology. (it makes me crazy that they say zwave has “clusters” since it doesn’t, that’s A zigbee term, but so it goes.).
“Coordinator” is the standard zigbee term, but SmartThings doesn’t usually use it, they just say “hub” for everything.
And if the end device is down, it doesn’t report. It’s reporting to the coordinator inside of the SmartThings hub.
As far as exactly how SmartThings implements all of this in its abstraction layer, maybe some of the smartthings/zigbee experts like @johnr or @sticks18 can do a better job of explaining with ST examples. Since I can no longer read code (I depend on text-to-speech), I can’t really help with those.
I have an initial solution all be it a horrible one but it works.
I took the template device handler from the Smartthings socket and modified it to have a ‘estimatedTimeToArrival’ capability (it takes a date) and then I send an event that is the time of the last update. This is the only way I could see to communicate between the two.
Then I have a custom SmartApp which sends a ‘switch.on’ every 5 minutes to the device, the socket is on and I always want it on anyway! So this just forces the device handler to send a date back to the app, at which point I store this as the last update time.
Then obviously in the app I can compare the last update time vs the current time on a timer and push a notification if it is larger than I would like.
Assuming that the device supports reporting, if you turned the reporting on, you should be able to use a SmartApp like the Simple Device Viewer to send you notifications.
The Simple Device Viewer checks the device for last event, like most of the other monitoring SmartApps, but it also checks all the attributes for the last state change so it will detect the activity even if the events not displayed.
The simple device viewer can also poll the device at a regular interval.