hassio-addons / addon-nut

Network UPS Tools - Home Assistant Community Add-ons
https://addons.community
MIT License
188 stars 36 forks source link

Various regression with latest updates #305

Closed sblantipodi closed 9 months ago

sblantipodi commented 1 year ago

Problem/Motivation

hello... I'm using the NUT addon since years now. it works super awesome on my CyberPower PR1500ELCD using USB connected to my Pi4 running Home Assistant OS

Since latest udpates onw entity stopped working. Most entities works ok but sensor.myups_output_voltage is fixed at 265V.

it worked before, now it shows 265V no matter what the real output voltage is.

this is the config of my addon:

image

Expected behavior

Entites should updates like in previous version of the addon.

Actual behavior

Since latest update some crucial entities does not update anymore.

Steps to reproduce

Use a CyberPower UPS via USB.

sblantipodi commented 1 year ago

this are the logs addon:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.12.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.6.2
 Home Assistant Supervisor: 2023.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[22:27:34] INFO: Configuring timezone (Europe/Rome)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[22:27:36] INFO: Setting mode to netserver...
[22:27:36] INFO: Generating /etc/nut/upsd.users...
[22:27:37] INFO: Configuring user: admin
[22:27:38] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[22:27:41] INFO: Configuring Device named Cyberpower_PR1500ELCD...
[22:27:41] INFO: Starting the UPS drivers...
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
HIDParse: LogMax is less than LogMin. Vendor HID report descriptor may be incorrect; interpreting LogMax 253 as 253 in ReportID: 0x10
Using subdriver: CyberPower HID 0.6
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 0
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun upsd (no readiness notification)
services-up: info: copying legacy longrun upsmon (no readiness notification)
s6-rc: info: service legacy-services successfully started
[22:27:44] INFO: Starting the UPS information server...
   0.000000 fopen /run/nut/upsd.pid: No such file or directory
   0.000579 Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!
   0.003147 [D1] debug level is '1'
   0.004142 listening on 0.0.0.0 port 3493
   0.005320 Connected to UPS [Cyberpower_PR1500ELCD]: usbhid-ups-Cyberpower_PR1500ELCD
   0.008955 Running as foreground process, not saving a PID file
[22:27:44] INFO: Starting the UPS monitor and shutdown controller...
   0.000000 fopen /run/nut/upsmon.pid: No such file or directory
   0.000366 Could not find PID file to see if previous upsmon instance is already running!
   0.001291 Using power down flag file /etc/killpower
   0.002108 UPS: Cyberpower_PR1500ELCD@localhost (primary) (power value 1)
   0.002201 [D1] debug level is '1'
   0.002591 [D1] debug level is '1'
   0.002615 Warning: running as one big root process by request (upsmon -p)
   0.003012 [D1] Saving PID 459 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.027043 [D1] Trying to connect to UPS [Cyberpower_PR1500ELCD@localhost]
   0.565656 User upsmonmaster@127.0.0.1 logged into UPS [Cyberpower_PR1500ELCD]
   0.038623 [D1] Logged into UPS Cyberpower_PR1500ELCD@localhost
sblantipodi commented 1 year ago

it seems an old issue: https://community.home-assistant.io/t/network-ups-tools-nut-output-voltage-wrong/291941

danmrossi commented 1 year ago

Might need to stop the addon, delete it, reboot home assistant and re-install/reconfigure the addon. Im running a cyberpower UPS that had the same voltage reading issue and this latest version (same as you have) fixed it and have no issues.

sblantipodi commented 1 year ago

@danmrossi I have done it various times and it doesn't fix the problem here. probably they fixed it for some models but introduced a regression for some others.

I have a PR1500ELCD, what's yours?

danmrossi commented 1 year ago

CP1500EPFCLCD

Sent from my iPhone

On 23 Jun 2023, at 4:55 am, Davide Perini @.***> wrote:



@danmrossihttps://github.com/danmrossi I have done it various times and it doesn't fix the problem here. probably they fixed it for some models but introduced a regression for some others.

I have a PR1500ELCD, what's yours?

— Reply to this email directly, view it on GitHubhttps://github.com/hassio-addons/addon-nut/issues/305#issuecomment-1603302801, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMCDRZMMNARW6RJYTOYBCETXMSWMJANCNFSM6AAAAAAZJX3R2Q. You are receiving this because you were mentioned.Message ID: @.***>

sblantipodi commented 1 year ago

this should be the reason of the regression on my unit and not on yours

jonandel commented 1 year ago

seems related to my issue...... funny my output voltage went from correct (240+V) to 15-20 as in the previous 'remedy'...

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

jonandel commented 1 year ago

latest version is the one that breaks it ! Any updates ?

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

sblantipodi commented 1 year ago

this issue is not stale, there is no fix since a lot of time.

hellcry37 commented 1 year ago

up

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

sblantipodi commented 1 year ago

this issue is not stale, it is simply not yet fixed.

hellcry37 commented 1 year ago

by the looks of it, not sure will ever be ...

sblantipodi commented 12 months ago

ok, I built the latest main branch form the https://github.com/networkupstools/nut official repo.

it works well natively on my PC.

I also created a docker image and it obviously work well there too...

Official addons from HA are old and based on version 2.8, 2.8 contains the issue, latest branch fixed the issue.

I solved my problem by simply building latest sources and by creating a custom container...

I think that HA OS users should wait for an update on this addon.

hellcry37 commented 12 months ago

I am interested in this docker image to test it on a Synology where I have this issue, but not the ha addon docker. Any links would be appreciated

aquette commented 11 months ago

this update chain should start from the Debian package update... And I'm now just an Emeritus DD, so I'll have to check how to move on. @sinclairpaul is there any way to update locally a package (nut for the addon), without waiting for the Debian update (that would require upload to Sid and bookworm-backport to possibly reach HA)?

aquette commented 10 months ago

@sblantipodi and @hellcry37 just to confirm, and say more explicitly, that it's not a NUT Add-on, but a NUT upstream one. As confirmed by @sblantipodi, it has been fixed in NUT 2.8.1 (ref https://github.com/networkupstools/nut/blob/master/NEWS.adoc?plain=1#L253). However, NUT add-on uses 2.8.0, which is the latest version packaged in Debian. So, the fix has to wait for a Debian update. Another (heavy) option is a docker that pulls NUT tar.gz and compile it. Which I'm considering as a possible transient option for SmartNUT development.

if possible, I would encourage you to test the new SmartNUT Add-on that I'm writing ;) https://github.com/aquette/addon-smartnut/blob/main/smartnut/DOCS.md

That won't solve your current issue obviously ;)

hellcry37 commented 10 months ago

Hello,

I do not user HASOS I only use pure docker containers with docker compose

That is why I was asking for a docker container that I can use.

sblantipodi commented 10 months ago

Hello,

I do not user HASOS I only use pure docker containers with docker compose

  • home assistant as a docker container
  • instantlinux/nut-upsd:2.8.0-r4 as a docker container etc.

That is why I was asking for a docker container that I can use.

My container simply builds the NUT sources and is not ready for public release, it's not stripped, I have hard coded some password in it, UPS port is hardcoded, ecc...

I think that someone should just ping instalinux to tell him to update the nut sources.

adynis commented 10 months ago

Hi, I have the same issue: CyberPower 750 (PR750ELCD) : image

:(

github-actions[bot] commented 9 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!