Handling Zigbee errors

(Jonathan) #1

Does anyone know how to detect that a zigbee command has not been received by the device? I have the following call:

zigbee.smartShield(text: msg).format()

And it happily carries on even if my Arduino is powered off. I’d really like to get a push alert in this case…

Cheers, Jonathan

(Florian Z) #2

You could have the shield issue some sort of keep-alive message every N minutes, and parse said message in your device handler. You’d update the a timestamp in the device state dictionary whenever you receive the keep-alive message from the shield. Then, in your poll() method you’d want to issue some sort of event (or send a push notification), if the last timestamp is older than some threshold. Would that work for you?