rospogrigio / airbnk_mqtt

MQTT control of Airbnk locks.
GNU General Public License v3.0
27 stars 6 forks source link

Wrong battery status #30

Open giltabibian opened 1 year ago

giltabibian commented 1 year ago

This morning I got surprised when wasn't able to open the door from the outside. Apperently over night the battery drop down from 80% to 0%. Is that a normal scenario? Also, why is the flag of low battery is still false?

rospogrigio commented 1 year ago

Well, batteries sometimes have this "sudden death" behavior. I seem to recall that when I had to replace my batteries the flag was false too, so probably it's not working correctly (don't look at me, it's a value coming from the cloud). Bye!

giltabibian commented 1 year ago

What do you mean by value from the cloud? This integration is locally based. I'm guessing you are reading the registers itself right?

giltabibian commented 1 year ago

What do you mean by value from the cloud? This integration is locally based. I'm guessing you are reading the registers itself right?

rospogrigio commented 1 year ago

Sorry, I meant that it's extracted from the advert data that is coming from the lock, and its position is determined in the same way as the Airbnk/Wehere app, when we analyzed the source code. Maybe they did something wrong, and the info is actually in another bit? Maybe you can check it by comparing the advert values using the new and the old batteries... I'll check it when my batteries go low too, bye!

giltabibian commented 1 year ago

Do you use a rechargeable batteries or not?

This is what a friend how investigated the issue wrote me:

"keep in mind that the battery gauge also with me tends to have the same curve, where it's 3 bars (via the wehere app), and then at some point immediately drops to 1 green bar (or sometimes a red bar indicating very low). The reason I think is that there battery gauge is calibrated for non-rechargeable CR123A cells, which when fully charged may be only 3.3V max, and when fully empty are like 2.0V. However the rechargeable ones are lithium-ion cells which when fully charged are 4.2V, and fully drained about 3.0V, so the scales are very different. So it makes sense that if the gauge is calibrated for 3.3V as full, then with the rechargeable CR123 3.3V is actually empty, so unfortunately the gauge will likely be inaccurate. just to give you a reference. Usually when Wehere app shows 1 bar left, and I remove the batteries and check their voltage, it is typically around 3.75V which is typically associated with about 30% capacity remaining for a Li-ion cell, so in some ways this seems to be accurate, but it's also possible that one of the 3 cells is weaker than the others, and in fact the lock only reads the voltage of all 3 in series, so if for example, one of the 3 cells is weaker than the others (which happens) it may be at 3.0V, and the other two could be at 3.8V, so the total voltage can be 3.0 + 3.8 + 3.8 = 10.6V, which on average is 3.5V/cell, so this can also through off the voltage reading, because the weak cell will always limit the operation of the lock (it becomes high resistance and won't allow current to be drawn by the lock). "

rospogrigio commented 1 year ago

Interesting. The first batteries I used were non-rechargeable, but now I moved to recheargeable ones so I believe I'll experience what your friend is saying.

formatBCE commented 1 year ago

Oh, you guys have CR123.I got 4x AA batteries, and they died just about a week ago, after 1.5 year of work (!). And yes, they died while still showing 100% too. Which is bummer, for sure. Especially due to that fact, that when lock tried to operate dead bolt and died in process, it's pretty hard to open lock even manually (like, gears inside are resisting). Didn't want to bother @rospogrigio with it - this integration took too much our time already :)