-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Battery value problem #108
Comments
What is the voltage of your battery? (it should report that together with the battery %) |
3015 which is correctly calculated to 100%, but that can't be. I will pair this device with my gateway and see what battery % does it report. |
Using the gateway with exact same device I get battery level 43 |
so it seems that the gateway calculates the percentage with a different algorithm. We have to check at what voltage a new battery starts and at which points it stops working. |
Is there no way to get inspiration from the smartthings setup? How did @kirovilya extract battery %? |
it seems
|
It uses a different range so that explains it. We have to do some test what the value is when we put in a new battery. |
Agree. But for transition would be nice to have it consistent. Our range is wrong anyway because we have 3000 as 100% and I already have on a used battery 3015. I recommend we adopt the xiaomi_aqara component approach and do more math when getting a new battery. |
Hello. Earlier, I considered the percentage here according to this formula: |
I've created Koenkk/zigbee-herdsman-converters#13 to improve a bit, but we can readjust once we have more samples and details. |
I see the battery value is calculated based on fixed values. My buttons show 100% and I'm sure that is not true. While this is a possible approach, I've checked smartthings and it seems they somehow get battery directly from zigbee messages?
https://github.com/a4refillpad/Xiaomi/blob/master/devicetypes/a4refillpad/xiaomi-zigbee-button.src/xiaomi-zigbee-button.groovy
The text was updated successfully, but these errors were encountered: