hassio-addons / addon-nut

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

Data stale #14

Closed federicopuntoni closed 4 years ago

federicopuntoni commented 4 years ago

Using richcomm_usb driver with my TRUST OXXTROON UPS result in continuosly data stale problem:

Poll UPS [myups@localhost] failed - Data stale 82.534048 UPS [myups] data is no longer stale

I can read that a possible solution is to update upsd.conf with a new MAXAGE value (ex. 25).

[https://www.ixsystems.com/community/threads/data-for-ups-is-stale.20898/](Data for UPS is stale)

addons-assistant[bot] commented 4 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

federicopuntoni commented 4 years ago

I share my configuration:

Add-on version: b7293c2 You are running the latest version of this add-on. System: Raspbian GNU/Linux 10 (buster) (armv7 / raspberrypi3) Home Assistant version: 0.103.2 Supervisor version: 193

and the full log report:

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] nut.sh: executing... [15:28:01] INFO: Setting mode to netserver... [15:28:02] INFO: Generating /etc/nut/upsd.users... [15:28:04] INFO: Configuring user: nutty [15:28:05] INFO: Password is NOT in the Have I Been Pwned database! Nice! [15:28:07] INFO: Configuring Device named trustups... [15:28:08] INFO: Starting the UPS drivers... Network UPS Tools - UPS driver controller 3.8.0-3396-gcdc7c4b5b1 Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (3.8.0-3396-gcdc7c4b5b1) [cont-init.d] nut.sh: exited 0. [cont-init.d] nutclient.sh: executing... [cont-init.d] nutclient.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [15:28:18] INFO: Starting the UPS information server... Network UPS Tools upsd 3.8.0-3396-gcdc7c4b5b1 Network UPS Tools upsmon 3.8.0-3396-gcdc7c4b5b1 0.000000 fopen /var/run/nut/upsd.pid: No such file or directory 0.001424 listening on 0.0.0.0 port 3493 [15:28:22] INFO: Starting the UPS monitor and shutdown controller... 0.000000 fopen /var/run/upsmon.pid: No such file or directory 2.197166 Connected to UPS [trustups]: richcomm_usb-trustups 0.032607 Using power down flag file /etc/killpower 0.033469 UPS: trustups@localhost (master) (power value 1) 0.033652 debug level is '1' 0.052003 Trying to connect to UPS [trustups@localhost] 2.225227 User upsmonmaster@127.0.0.1 logged into UPS [trustups] 0.060635 Logged into UPS trustups@localhost 37.475385 Data for UPS [trustups] is stale - check driver 38.498160 UPS [trustups] data is no longer stale 81.503803 Data for UPS [trustups] is stale - check driver 80.074888 Poll UPS [trustups@localhost] failed - Data stale 82.534048 UPS [trustups] data is no longer stale 167.560042 Data for UPS [trustups] is stale - check driver 168.585812 UPS [trustups] data is no longer stale 211.590312 Data for UPS [trustups] is stale - check driver 210.092910 Poll UPS [trustups@localhost] failed - Data stale 212.616772 UPS [trustups] data is no longer stale 297.647095 Data for UPS [trustups] is stale - check driver 298.678332 UPS [trustups] data is no longer stale

sinclairpaul commented 4 years ago

I've just pushed a change which allows the MAXAGE config line to be optionally configured, as it seems to make sense to do so. Once you update the addon, you should be able to add "upsd_maxage": "xx" to your config, with xx being an Integer.

This may or may not help with your issue.

addons-assistant[bot] commented 4 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.