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

Incorrect readings with NUT integration for UPS Riello IDG 600 #79703

Closed
Gyosa3 opened this issue Oct 6, 2022 · 10 comments
Closed

Incorrect readings with NUT integration for UPS Riello IDG 600 #79703

Gyosa3 opened this issue Oct 6, 2022 · 10 comments
Assignees

Comments

@Gyosa3
Copy link

Gyosa3 commented Oct 6, 2022

The problem

Hi I bought an UPS for my Home Assistant setup. Model is Riello IDG (iDialog) 600 and is referenced as compatible with NUT using the "riello_usb" driver. I followed the documentation to setup the NUT add-on and integration and connect to the UPS via USB cable. All is working well, status and sensors are well updated and within reasonable time.

The issue I have is that some sensors that I find important are showing incorrect values and I miss them to fine-tune my automated notifications. I cannot say if these values are wrong because they are incorrectly reported by the UPS itself or if NUT is not translating them properly for HA.

data with issues are:

  • battery charge: it always shows "255%", whether the UPS is charging or discharging or in full charge
  • battery runtime shows "3 932 100 s" but I'd expect how many minutes are left when running on battery, to trigger HA clean shutdown. I tested this UPS with the actual load and it cal last around 20 minutes so it should display around "1 200 s".
  • UPS temperature also shows "255°C" permanently.

One key feature when connecting the UPS to HA is to get alerts when the UPS is running on the battery (this part works) and when the battery is getting discharged at a level when the HA system should start a clean shutdown before battery power breaks. This part does not work due to incorrect values of "battery charge" and "battery runtine".

I would like to ask for assistance with fixing this issue if the UPS hardware supports it.

What version of Home Assistant Core has the issue?

2022.9.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

NUT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nut

Diagnostics information

config_entry-nut-b26ede626639c81c2d92884558d9ccb2.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

There are no specific entries in logs, all works well only the values are not correct

Additional information

No response

@homeassistant
Copy link
Contributor

Hey there @bdraco, @ollo69, mind taking a look at this issue as it has been labeled with an integration (nut) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


nut documentation
nut source
(message by IssueLinks)

@ollo69
Copy link
Contributor

ollo69 commented Oct 6, 2022

I suppose that the issue is related to the value returned by the driver and not to the integration. Did you try to query NUT by command line to see value returned?

@github-actions github-actions bot added the stale label Nov 5, 2022
@Gyosa3
Copy link
Author

Gyosa3 commented Nov 10, 2022

sorry, missed your reply.

Yes, the values I mention are returned by the integration, (see example below for battery charge sensor). I have no clue how to access NUT in command line, can you help please?

I run NUT as an add-on in HA on a raspberry pi, I'm just capable to recopy the addon host name in the config screen of the integration, and that's about all I know about connecting to an addon.

I can connect in ssh via the terminal addon, but I believe it does not give me access to NUT from there.

image

@github-actions github-actions bot removed the stale label Nov 10, 2022
@PeteRager
Copy link
Contributor

Here’s what I’d try at this point.

unplug the UPS from power and see if that value changes.

My guess is that 255 = 100%. 1 byte of memory can hold a value from 0-255.

If that is true you can scale the value using a template.

{{ ((states(“sensor.ups_battery”) | float(0)) / 255.0) * 100.0 }}

Do you have another way to read the UPS battery level that you could use when you unplug it, to correlate with this equation?

@Gyosa3
Copy link
Author

Gyosa3 commented Nov 11, 2022

I've tried to unplug the UPS so that it runs on battery and the value do not decrease, then the UPS dies after 20 minutes...

Other values that are obviously incorrect also do not change during the online, charge and discharge situations.

So I can see the good functioning of the UPS when "online" but I cannot script anything when I loose grid power, because I do not have any indication of the discharging status of the battery among other things.

I also believe that the "shutdown host" function that is part of the add-on/integration is not triggered either because it do not get the right status value when the battery starts to discharge.

If there's any way one can tell me how to interrogate the add-on via another way than the integration, please tell me so I can test it.

@PeteRager
Copy link
Contributor

Ok. I’d put that in the completely broken category for sure..

If you can ssh into the HASS instance you may be able to run these command line tools described in this document.

https://networkupstools.org/docs/user-manual.pdf#page18

@PeteRager
Copy link
Contributor

I see evidence that others have the similar problem

networkupstools/nut#530

This documentation highlights what works and what doesn’t work with your UPS, it looks consistent with what you describe?

https://networkupstools.org/ddl/Riello/IPG_600.html

It’s starting to look like that model has compatibility issues with NUT.

I have 3 of these “APC UPS Battery Backup Surge Protector, BE650G1 Surge Protector with Battery Backup, Dataline Protection, Backup Battery Power Supply” and they work fine with NUT.

@Gyosa3
Copy link
Author

Gyosa3 commented Nov 11, 2022

Thanks, yes without surprise I have the exact same values for the inconsistent/unimplemented features. What I see in Home Assistant is exactly what comes out of the driver. That said, it doesn't say if that's a problem from the driver, or an unimplemented feature of the UPS itself. As it is a basic model, it may well be a downgrade version of an other model that runs well and was tested with the driver.

That's unfortunate because I picked up this UPS after the compatibility table was showing "max compatibility" driver, at least that's what I thought had to be understood.

As I run the add-on from the official repo of Home Assistant, this means NUT runs in a container, and the only ssh available to me is within the HA core container if I'm correct, so I cannot jump from HA to NUT in SSH, to run NUT commands. That is, unless someone explains me how to do such thing, but for me container isolation do prevent such attempt.

So I feel I'm stuck with this until someone fixes this and issue a new release for HA... Is it worth creating a new issue in the Git project of NUT?

@PeteRager
Copy link
Contributor

Since that NUT issue is from 2018 and it hasn’t been corrected, I’m suspecting the root cause is on the vendors side. You could try contacting their tech support. According to NUT there tools are part of most Linux distro and are hence are probably in HASS OS, so I’d just try ssh in and see if those commands work.

As far as this issue goes, it does not seem to be on the HASS side and no real action to take at this point.

@Gyosa3 Gyosa3 closed this as completed Nov 14, 2022
@Gyosa3
Copy link
Author

Gyosa3 commented Nov 14, 2022

Thank you for your help!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants