-
-
Notifications
You must be signed in to change notification settings - Fork 116
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 level reporting may be wrong #391
Comments
It seems that there are different batches out there where battery measurement works different. But it's impossible to detect this. |
Thanks for the reply. Is there any chance to fix this 0-100% peak upon boot? Maybe an initialization problem? |
I was thinking about implementing a little helper for the battery level calibration. If we collect the min/max values of batt_raw over time (maybe better with some filtering/averaging), we could report this interval via mqtt and this would in turn allow us to set the min/max values in the dev.json file accordingly. |
I was wondering how 8646eb4 is related to battery level? |
looking at that changeset probably nothing at all :D |
hi, so, how to get the min easily? today mine died when battery was at 40% or similar, after 14 hours with automatic luminosity... now i recharged it, i get this, how can i retrieve the bat_raw of when it dies? To reconnect i have to power it again, so read will be affected a bit and reading not accurate... when i connected it, after it settled a bit, after 1 minute or so i saw battery at about 80% on display, which of course could not be...
i don't see the bat_raw reported via mqtt, so do i need to check the /api/stats every now and then? |
You can use mqtt explorer or the home assistant integration to monitor the battery raw value over time. Then you will know which raw values correspond to 0% and 100% and add (values close to) these to your json config file. |
thanks, didn't note that mqtt exposed that value, sorry, but now i'm already monitoring with a crontab with this line:
as soon as it dies, i'll have my values :) |
done, it lasted about 13 hours with automatic brightness, do you think it's good? this is when i disconnected the cable after fully charged:
and this is the last file written by the cronjob polling stats every minute:
isn't the original 57% a bit "too much" off? Or these retrieved values are normal? so this is my dev.json file... should be ok, no? Thanks!
|
13 hours are very good and I can confirm your min/max values. |
thanks, very good job! |
Bug report
Describe the bug
Maybe a bug, maybe a question...
My Ulanzi Clock is powered by an USB hub while my PC is running. At night I turn off the clock's matrix via home assistant so it runs off the battery.
In the morning the clock is sometimes still running and the matrix can be turned on via home assistant. But most of the time it has shut itself down over the night. The attached screenshot shows the typical uptime vs. battery level of the Ulanzi recorded by home assistant over the course of a week.
You can see that the clock shuts itself down, when the reported battery level drops somewhere around 55%-60%. In the morning when I turn it on again, after some initial confusion (0%-100% transition) it starts with a reported battery level of 70%-80%.
Now my question: If the battery cannot keep the clock running anymore, shouldn't the reported battery level be close to 0% instead of 60%? To me this looks like the computation of the level is wrong.
Additional information
To Reproduce
Turn the matrix off and record the uptime and battery level.
Expected behavior
The battery level should oscillate between 0% and 100%. The reported battery level should be near 0% when the shutdown occurs.
Additional context
The zero to max transition of the battery level upon boot may be the same issue as #354
The text was updated successfully, but these errors were encountered: