Here is a fix for the Bosch Zigbee motion detector battery level, how to apply it?

Bosch Zigbee ISW-ZDL1-WP11G and ISW-ZPR1-WP13 motion detectors always report 100% battery. This has been reported in several threads. I investigated this, found the problem and proposed a fix last year on the following thread and quoted below.

I was hoping this could get applied to an upcoming release, but if not, is there a way I can get the source code for the driver and make my own version?

Blockquote

I have several of these Bosch detectors and am happy with their performance except when the batteries die with no notice from device watchdog because they are always reporting 100% battery level. I measured the voltage on my batteries, turned on debug logging for the devices and dug into the battery reports. lastBattery is the epoch timestamp of the last battery report, not the measured level.

These detectors are measuring only part of their battery pack. The Hubitat driver is reading the correct value but not interpreting it right, Here are my results:

ISW-ZDL1-WP11G with batteries that measure 1.22v
descMap: [raw:73920500010820002030, dni:7392, endpoint:05, cluster:0001, size:08, attrId:0020, encoding:20, command:0A, value:30, clusterInt:1, attrInt:32]

30 hex is 48 decimal, which is 4.8v (four batteries at 1.22v)

ISW-ZPR1-WP13 with batteries that measure 1.43v
descMap: [raw:CA65050001082000201D, dni:CA65, endpoint:05, cluster:0001, size:08, attrId:0020, encoding:20, command:0A, value:1D, clusterInt:1, attrInt:32]

1D hex is 29 decimal which is 2.9v (two batteries at 1.43v)

I made a percentage range based on observed performance of my detectors. The detectors work but range starts to be reduced at 1.2v per cell, I am calling 1.1v zero percent bottom of the range. Using 1.6v per cell for new cells. These numbers fall in line with this reference and give nice percentages.

The ISW-ZDL1-WP11G has 6 batteries and sends the voltage for 4, use min=44, max=64

The ISW-ZPR1-WP13 has 4 batteries and sends the voltage for 2, use min=22, max=32

Percent capacity = (value-min)/(max-min)*100

This is what I get for percentages using this formula for the cases I listed above:

Model: ISW-ZDL1-WP11G
Value: 48
Max: 44
Min: 64
Capacity: 20%

Model: ISW-ZPR1-WP13
Value: 29
Max: 22
Min: 32
Capacity: 70%

Can someone at Hubitat please correct the math on the battery reading?

Blockquote

3 Likes

Tagging @mike.maxwell from Hubitat.

We'll get this updated in the next release, thanks for the data, makes the update real easy!

7 Likes

Thanks Mike, looking forward to the update!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.