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

logbook is full of warnings #8

Open
tuffig opened this issue Dec 11, 2022 · 3 comments
Open

logbook is full of warnings #8

tuffig opened this issue Dec 11, 2022 · 3 comments

Comments

@tuffig
Copy link

tuffig commented Dec 11, 2022

Hello,

I use the "Home Assistant Operating System" installation. I did the integration manually and before that I turned on I2C on the RASPI.
The ups is recognized and I can see online status and charge status. But after some time many entries appear in the logbook:

waveshare_ups_has_online detected
09:00:01 - 1 hour ago
waveshare_ups_hat_online reset (no(s) detected)
08:59:31 - 1 hour ago
waveshare_ups_has_online detected
08:40:31 - 1 hour ago
waveshare_ups_has_online reset (none(s) detected)
08:40:01 - 1 hour ago
waveshare_ups_has_online detected
08:36:01 - 1 hour ago
waveshare_ups_has_online reset (none(s) detected)
08:35:31 - 1 hour ago
waveshare_ups_has_online detected
08:31:01 - 1 hour ago
waveshare_ups_has_online reset (none(s) detected)
08:30:01 - 1 hour ago
...

Also, the battery only charges to 90%

I have no more idea that I can do

@mykhailog
Copy link
Owner

mykhailog commented Jan 19, 2023

Also, the battery only charges to 90%

A current battery capacity algorithm is based on bus voltage which uses this formula:

 percent = (bus_voltage - 6) / 2.4 * 100

so 6V - 0% and 8.4V - 100%

I've used this code from the official SDK.

I have the same issue with the batteries after two years of usage. Maybe it's battery degradation that causes a decrease in voltage as the battery loses capacity over time.

I've added max_percent property to do such calibration.

@tuffig
Copy link
Author

tuffig commented Jan 21, 2023

Thanks for the feedback,
the batteries are brand new, but the charge indicator is not a problem for me. More important for me is why the many entries occur in the LOG

@mykhailog
Copy link
Owner

mykhailog commented Jan 21, 2023

More important for me is why the many entries occur in the LOG

In the last update, I made the online status more stable by reducing sensitivity.

charge indicator is not a problem for me

You can now set max percent in the configuration:

sensor:
  - platform: waveshare_ups_hat
    max_soc: 91   

So if 91 is max percent UPS will show 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants