Battery get levels for devices

I have a few devices that are battery powered and I wanted to get battery level updates.
For example, I have a Aeotec Door/Window Sensor 6. When I was On Smartthings, the battery level would update continuously (or at least on wake). Now that I have migrated it over to Home Assistant, the battery level does not change. I sent a message to Aeotec and this is the response they sent…

There are 2 ways of getting battery reports in DWS6:

  1. Set
    Parameter 101 [1 byte] = 1 //enable interval for battery checks
    Parameter 111 [4 byte] = 3600 //set low battery check every hour
    Set the low battery value to 50% by setting:
    Parameter 39 [1 byte] = 50

This will allow the sensor to send a low battery report when battery level is at 50% (anything under 50% is a clear indication of low battery in most units as it indicates the voltage of the battery is low).

  1. Upon wakeup of Door Window Sensor 6, have your controller send a BATTERY GET to request a battery report from DWS6 before sending a NOMOTEINFORMATION frame to put it back to sleep (or just let it sleep automatically after a second). I suspect this is what SmartThings device handler does with this unit.

I think that perhaps SmartThings has some battery check upon wakeup is my suspision, i need to take a look at the code depending on the device type that is used with it to see if that is the case.

I understand method 1 and can set that up, but that doesn’t tell me the battery level - just alert when it goes below a certain level. So I am wondering how to set up option 2. Is this even an option on Home Assistant using the standard zwave integration?

Create an automation that runs once a day, or week, etc. and call the zwave.refresh_entity service call with the battery entity.

These devices are asleep until they are activated. so the door sensor only contacts Home Assistant when the door opens. Will this service continue to seek the update until it connects?

The refresh request will be queued and the Battery Get will be sent when it wakes up. You can tail OZW_Log.txt to see.

The device doesn’t wake up when it sends a notification. It only wakes up on a scheduled interval (wake up interval) or if you physically press the “action button”. You can change the wake up interval in the Z-Wave Control panel, and it will be applied on the next wake up (again, it is queued).

So I have to set the wake-up interval to get it to work?
I tried using the refresh_entity service - I see it cued in the logs, but nothing happens the next time the sensor is activated. I would have assumed that it would be able to get the information the next time the sensor activates on the door being opened or closed, but that doesn’t work.

Nope, it doesn’t work that way. You’ll have to wait for it to wake up or manually wake it.

That is a pain. I wonder why it would automatically update on smartthings.

Because the device handler for SmartThings is written to refresh the value during a wake up, for example. HA or OZW 1.4 does not implement this itself, so you are doing the equivalent with an automation. OZW 1.6 has a device config option to refresh values on wakeups, which is the same as SmartThings.