Cannot store z-wave thermostat battery level in variable

I’m using openHAB successfully to control my heating with an HRT4-ZW (SRT321) z-wave thermostat. However I’m struggling with returning the battery level:

In HABpanel I can create a widget to display battery level successfully, if I associate it directly with the zwave item ( zwave_device_3de03b5f_node6_battery_level ).

However when I try to create an item (I am using Notepad++ to edit the items file directly) then it always has a NULL value in HABpanel.

Here are the item definitions for the thermostat’s battery level (not working) and setpoint (working fine) and reported temperature (working fine):

Number Main_Thermostat_Target "Target Temperature [%.1f °C]" <temperature> ["TargetTemperature"] { channel="zwave:device:3de03b5f:node6:thermostat_setpoint_heating" }
Number Main_Thermostat_Actual "Actual Temperature [%.1f °C]" <temperature> ["TargetTemperature"] { channel="zwave:device:3de03b5f:node6:sensor_temperature" }
Number Main_Thermostat_Battery "Thermostat Battery" ["ThermostatBattery"] { channel="zwave:device:3de03b5f:node6:battery_level" }

Please can you help me work out what is going wrong?

Thanks,

Philip

https://www.openhab.org/addons/bindings/zwave/thing.html?thingTypeUID=horstmann_hrt4zw_00_000

The channel is called battery-level, not battery_level.

Thanks for replying so quickly! I hadn’t spotted that.

I’ve corrected it but I’m still getting NULL as the value in the widget.

I can see the thermostat setpoint going up and down in HABpanel as I adjust it, so I guess there must be something else I’m getting wrong?

It will take some time - it’s not updated that often (minimum of once per hour - unless the device is sending it unsolicited at a faster rate which isn’t common).

1 Like

Thanks. I assumed the device would sent the battery level every time it updated the temperature. Wrong assumption!

In fact, the panel is now updated and showing the correct battery level.

Thanks again for your help. Really appreciated :smile: