I’m writing a device handler for a device that normally runs on a battery, but can be mains powered.
Its behaviour is different in each mode, which is dependant on the power state when it is joined to the network (i.e. Listening vs sleepy). I can see that if it’s joined to the network when powered, it’s raw description will contain “zw:L …” whereas if it is in battery mode it will be “zw:S …”.
What is the recommended (supported) way to determine if the device is in Listening or Sleep mode, from device handler code? (as ideally I want a single DTH to work in both modes). Is this this information contained in the device properties somewhere?
Alternatively, I believe the information should be available from a Z-wave NodeInfo command, but I’m not sure how to request one.