Zooz ZSE40: Battery Level is not exposed as an entity despite multiple resets and re-inclusions

I had another thread about battery levels in Lovelace, but during that process I saw that a subset of Zooz ZSE40 multisensors were not exposing entities for battery levels.

For example, this is a problem multisensor I’ve excluded, factory reset and re-included at least 6 times with no change. Other entities are exposed (eg. temp, humidity and burglar) but not battery level:

At first I thought this was a limitation of the Zooz Multisensor, but I noticed other ZSE40 sensors I have DO expose the battery level. Here’s one from our bedroom:

Given the fixes for this stuff is usually an exclude + reset + inclusion loop, and this didnt’ fix it, I’m out of ideas.

I would watch the OZW_Log.txt file during inclusion, or during a “refresh node info”. That will tell if you the battery command class is detected or not. The zwcfg*.xml file also contains the command classes that were found.

What is the query stage of the device? The zwave sensor says initializing, did it ever make it past the “Complete” stage? Some sensors go to sleep before the device interview completes, and it would need to wake up again to compete it.

I did a Refresh node while outputting the tail of the OZW_Log.txt file, matching lines with the node # (in this case Node 53). This was output:

2020-11-02 14:55:05.677 Detail, Node053, Refreshed Value: old value=0, new value=255, type=byte
2020-11-02 14:55:05.677 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:05.677 Detail, Node053, Refreshed Value: old value=0, new value=0, type=byte
2020-11-02 14:55:05.677 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:05.677 Detail, Node053, Refreshed Value: old value=0, new value=8, type=byte
2020-11-02 14:55:05.677 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:05.677 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:05.679 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:05.680 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:05.681 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:17.430 Detail, Node053,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x35, 0x03, 0x20, 0x01, 0x00, 0xe5
2020-11-02 14:55:17.430 Info, Node053, Received Basic set from node 53: level=0.  Sending event notification.
2020-11-02 14:55:17.430 Detail, Node053, Notification: NodeEvent
2020-11-02 14:55:17.520 Detail, Node053,   Received: 0x01, 0x11, 0x00, 0x04, 0x00, 0x35, 0x0b, 0x71, 0x05, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x01, 0x08, 0x00, 0x56
2020-11-02 14:55:17.520 Info, Node053, Received Alarm report: type=7, level=0, sensorSrcID=0, type:Burglar event:0, status=255
2020-11-02 14:55:17.520 Detail, Node053, Refreshed Value: old value=7, new value=7, type=byte
2020-11-02 14:55:17.520 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:17.520 Detail, Node053, Refreshed Value: old value=255, new value=0, type=byte
2020-11-02 14:55:17.520 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:17.520 Detail, Node053, Refreshed Value: old value=0, new value=0, type=byte
2020-11-02 14:55:17.520 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:17.520 Detail, Node053, Refreshed Value: old value=8, new value=0, type=byte
2020-11-02 14:55:17.520 Detail, Node053, Changes to this value are not verified
2020-11-02 14:55:17.520 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:17.522 Detail, Node053, Notification: ValueChanged
2020-11-02 14:55:17.523 Detail, Node053, Notification: ValueChanged

Oddly, in my zwcfg*.xml file, I don’t see any section for Node 53. I see a bunch of other entries for my 3 other Zooz ZSE40 multisensors, but not Node 53 (Node 53 is what is shown in the HA UI as well in the OZW config).

I then tried to exclude it, reset it, and then re-include it while watching the OZW_Log.txt file like you suggested. This was the log entries for the new Node 54. I see COMMAND_CLASS_BATTERY discovered:

2020-11-02 15:01:20.849 Info, contrlr, FUNC_ID_ZW_ADD_NODE_TO_NETWORK:
2020-11-02 15:01:20.849 Info, contrlr, ADD_NODE_STATUS_DONE
2020-11-02 15:01:20.849 Info, Node054,   Basic device class    (0x04) - Routing Slave
2020-11-02 15:01:20.849 Info, Node054,   Generic device Class  (0x07) - Notification Sensor
2020-11-02 15:01:20.849 Info, Node054,   Specific device class (0x01) - Notification Sensor
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_BASIC is not mapped
2020-11-02 15:01:20.850 Info, Node054,   Mandatory Command Classes for Node 54:
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_BASIC
2020-11-02 15:01:20.850 Info, Node054,   Mandatory Command Classes controlled by Node 54:
2020-11-02 15:01:20.850 Info, Node054,     None
2020-11-02 15:01:20.850 Info, Node054,   Optional command classes for node 54:
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_ZWAVEPLUS_INFO
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_VERSION
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_MANUFACTURER_SPECIFIC
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_DEVICE_RESET_LOCALLY
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_ASSOCIATION
2020-11-02 15:01:20.850 Info, Node054,   CommandClass 0x59 - NOT REQUIRED
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_POWERLEVEL
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_BATTERY
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_ALARM
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_SENSOR_MULTILEVEL
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_CONFIGURATION
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_WAKE_UP
2020-11-02 15:01:20.850 Info, Node054,   CommandClass 0x7a - NOT REQUIRED
2020-11-02 15:01:20.850 Info, Node054,     COMMAND_CLASS_SECURITY
2020-11-02 15:01:20.850 Detail, Node054, AdvanceQueries queryPending=0 queryRetries=0 queryStage=None live=1
2020-11-02 15:01:20.850 Detail, Node054, QueryStage_ProtocolInfo
2020-11-02 15:01:20.850 Detail, Node054, Queuing (Query) Get Node Protocol Info (Node=54): 0x01, 0x04, 0x00, 0x41, 0x36, 0x8c
2020-11-02 15:01:20.850 Detail, Node054, Queuing (Query) Query Stage Complete (ProtocolInfo)
2020-11-02 15:01:20.850 Info, Node054, Initializing Node. New Node: true (true)

You need to save the configuration (in the control panel), or else shutdown HA. It’s only kept in memory until that point.

Is that a complete set of logs? It doesn’t seem to be, or else it hasn’t completed the interview yet. OZW got the list of command classes the device has supported, but it has not queried those classes yet.

I waited longer and got more in the logs. Here’s the grep’d output from OZW_Log.txt when searching for the new node ID (55):

Not sure if this means anything but I do see lines like this which indicates it’s getting battery info. However, I already knew some battery info was coming because I coudl see it in the attribute of the Zwave device. The issue was no entity created:

2020-11-02 17:28:32.870 Info, Node055, Received Battery report from node 55: level=100

Sensor/entity list for the device is still missing battery level as you can see:

After re-adding the device, I then restarted so the zwcfg*.xml was updated like you mentioned. The Node 55 appeared, which I copied here: <Node id="55" name="" location="" basic="4" generic="7" specific="1" roletype="6 - Pastebin.com

In the command class set it shows battery:

<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
	<Instance index="1" />
	<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
</CommandClass>

I took a different node in the zwcfg*.xml for another ZSE40 where the battery sensor is showing up and here’s a diff:

Okay I have no idea what happened, but I restarted HA working on something else, and looked at the device and suddenly, battery level is now appearing.

What the heck?! Is this just a massive delay thing that is inherent to ZWave?