Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develco/Frient smoke detector - false (?) battery values? #8457

Closed
rindlerblabla opened this issue Aug 20, 2021 · 15 comments
Closed

Develco/Frient smoke detector - false (?) battery values? #8457

rindlerblabla opened this issue Aug 20, 2021 · 15 comments
Labels
problem Something isn't working

Comments

@rindlerblabla
Copy link

What happened

I've got 6 pretty new (like two months old) Frient smoke detectors. Three of them now says "Battery 42%" (not 41, 38 or something else, the rest 100%. It also differs through the day, between 42% and 100%. Seems like there's some issue with the battery reporting?

battery

Debug info

zigbee2mqtt_version 1.21.0-dev commit: f9451ff
coordinator_type zStack3x0 (zzh)
coordinator_revision 20210120

(@TheStigh)

@rindlerblabla rindlerblabla added the problem Something isn't working label Aug 20, 2021
@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 20, 2021

I have a few of these and this is ‘normal’ behavior, they don’t support reporting batteryPercentageRemaining, so the battery % is based on voltage.

Which isn’t as accurate, voltage also fluctuates for me based on temperature so battery hops around a lot, usually twice when going between day and night time.

@TheStigh
Copy link

@rindlerblabla This is not a Z2M issue, it would be what the device reports.

Are you using a Develco or Frient product, and what is the firmware version? Why do you refer to Develco/Frient?

@rindlerblabla
Copy link
Author

Okey! Then maybe it is better to "listen" to the binary battery_low or is that also based on a calculation on the voltage?

Those devices are SMSZB-120, branded Frient, but that's only the name on the box, it's the same company/products. Don't know what firmware, only the build date (20210531 01:34) is shown in the setting list.

@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 21, 2021

I only added support for the develop air quality sensor, but for that one the technical document mentions the voltage cutoff or use for setting battery_low. Not sure for the other devices but I assume they are similar as all of them only support reporting of batteryVoltage

https://github.com/Koenkk/zigbee-herdsman-converters/blob/ba43a6efd4ef24d35df59d2d8803c7b6b27dd30a/converters/fromZigbee.js#L1563

@rindlerblabla
Copy link
Author

rindlerblabla commented Aug 21, 2021

To me it looks like it's part of the IAS cluster and that the device report battery_low itself when the battery is below 2.8 VDC (according to the manual, and https://github.com/Koenkk/zigbee-herdsman-converters/blob/ba43a6efd4ef24d35df59d2d8803c7b6b27dd30a/converters/fromZigbee.js#L1520).

Anyhow, all my devices report batteryVoltage":29 or batteryVoltage":30. 29 is calculated to 42% and 30 to 100%.

debug 2021-08-21 21:43:59: Received Zigbee message from 'Brandvarnare trapphuset', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryAlarmState":0,"batteryVoltage":29}' from endpoint 35 with groupID 0

@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 21, 2021 via email

@rindlerblabla
Copy link
Author

rindlerblabla commented Aug 21, 2021

According to the manual, https://www.develcoproducts.com/media/1742/smszb-120-technical-manual-smoke-alarm.pdf

Note: The attribute “BatteryVoltage” is measuring the battery voltage, in units of 100mV.

So 29 = 2900 mV ( 97% battery, not 42% ). They use 3V batteries.

Edit: Obviously the calculation is more advanced than how I calculated since <2100 equals to 0 percentage, https://github.com/Koenkk/zigbee-herdsman-converters/blob/ba43a6efd4ef24d35df59d2d8803c7b6b27dd30a/lib/utils.js#L132, however I still think there's an error in the calculation caused by that the values are reported in units of 100mV.

@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 21, 2021

@Koenkk i wonder if I used the wrong battery template then?

@TheStigh
Copy link

TheStigh commented Aug 22, 2021

Okey! Then maybe it is better to "listen" to the binary battery_low or is that also based on a calculation on the voltage?

Those devices are SMSZB-120, branded Frient, but that's only the name on the box, it's the same company/products. Don't know what firmware, only the build date (20210531 01:34) is shown in the setting list.

Yes, I updated the SMSZB-120 to support iasZone and iasWd. Battery_low are reported in iasZone.

image

@rindlerblabla
Copy link
Author

I am on firmware 4.0.2 as well.

@Koenkk
Copy link
Owner

Koenkk commented Aug 22, 2021

@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 23, 2021

That definitely seems to give a reading for my Air Quality sensors, they now show closer to what I would expect given the battery age, I also swapped in a near deplete set and it showed < 20% and battery_low=true. I didn't have the correct batteries in a near depleted state to check the smoke and heat detectors.

@rindlerblabla
Copy link
Author

@sjorge Are your heat and smoke detectors showing 100% or less? Saw that you didn't have any near depleted batteries bug have you tried with 3V_2500 for the batteries you already have in place?

@sjorge
Copy link
Sponsor Contributor

sjorge commented Aug 24, 2021 via email

@rindlerblabla
Copy link
Author

Okey, I tried adding a custom converter for those devices, but z2m just crashes and restarts in a loop, even when I just copied the unchanged settings, so I guess I didn't get it right. Hehe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants