Script fails when device does not respond

Lots of good Zigbee advice here: