core: [NUT] Duplicate device

The problem

Since I purchased UPS BX2200, after few days it duplicates itself losing all the automations.

What version of Home Assistant Core has the issue?

2023.6.2

What was the last working version of Home Assistant Core?

never worked

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

I don’t know how to perform checks beyond the logs.

first device added:

image

first device added after duplication (became unavailable)

image

new device created by itself:

image

both devices:

image

Example YAML snippet

no response

Anything in the logs that might be useful for us?

Logs 

Network UPS Tools
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.3  (amd64 / qemux86-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
[03:00:22] INFO: Configuring timezone (Europe/Madrid)...
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
[03:00:23] INFO: Setting mode to netserver...
[03:00:23] INFO: Generating /etc/nut/upsd.users...
[03:00:23] INFO: Configuring user: superka
[03:00:23] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[03:00:23] INFO: Configuring Device named Cuartito_UPS_APC...
[03:00:23] INFO: Starting the UPS drivers...
HIDParse: LogMax is less than LogMin. Vendor HID report descriptor may be incorrect; interpreting LogMax -1 as 255 in ReportID: 0x0c
HIDParse: LogMax is less than LogMin. Vendor HID report descriptor may be incorrect; interpreting LogMax -1 as 255 in ReportID: 0x22
HIDParse: LogMax is less than LogMin. Vendor HID report descriptor may be incorrect; interpreting LogMax -1 as 255 in ReportID: 0x40
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Using subdriver: APC HID 0.98
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)
[03:00:24] INFO: Starting the UPS information server...
   0.000000	fopen /run/nut/upsd.pid: No such file or directory
   0.000050	Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!
   0.000424	[D1] debug level is '1'
   0.000488	listening on 0.0.0.0 port 3493
   0.000600	Connected to UPS [Cuartito_UPS_APC]: usbhid-ups-Cuartito_UPS_APC
   0.001243	Running as foreground process, not saving a PID file
s6-rc: info: service legacy-services successfully started
addchar: discarding invalid character (0x0a)!
addchar: discarding invalid character (0x0a)!
[03:00:24] INFO: Starting the UPS monitor and shutdown controller...
   0.000000	fopen /run/nut/upsmon.pid: No such file or directory
   0.000067	Could not find PID file to see if previous upsmon instance is already running!
   0.000180	Using power down flag file /etc/killpower
   0.000229	UPS: Cuartito_UPS_APC@localhost (primary) (power value 1)
   0.000242	[D1] debug level is '1'
   0.000256	[D1] debug level is '1'
   0.000260	Warning: running as one big root process by request (upsmon -p)
   0.000296	[D1] Saving PID 459 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.009966	[D1] Trying to connect to UPS [Cuartito_UPS_APC@localhost]
   0.506730	User upsmonmaster@127.0.0.1 logged into UPS [Cuartito_UPS_APC]
   0.010769	[D1] Logged into UPS Cuartito_UPS_APC@localhost

Additional information

no response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

I have been experiencing this issue for a long time. Most often caused when nut or home assistant updates but not 100% reproducible.

Just happend again, with 2023.9 upgrade , its just anoying. now i have 3 devices and 10 automations without working.

image

Well, without grounds there’s reportedly much more chance for EMI noise to inject random bytes, beyond USB/Serial native CRC capability to fix.

Disabling the report fix is just that - accept byte sequences that look wrong and don’t care (like we did with NUT v2.7.4). But again, GIGO principle applies, and then we don’t try to make reasonable sense of those bytes.