NUT failing to connect to USB UPS

I have a CyberPower UPS (OR1500PFCRT2U) I’m trying to connect with NUT to hopefully get power outage alerts and electricity usage data. I have HAOS on a Rpi and I plugged in the UPS with USB. I installed the add-on and set the username and password. I then tried to set up the integration but get

Connection error: Multiple exceptions: [Errno 111] Connect call failed ('::1', 3493, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 3493)

What am I doing wrong here? None of the command line options mentioned in the docs work for me, I just get told they aren’t installed and I don’t want to mess around in the OS without knowing what I’m doing.


-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.3  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.5.4
 Home Assistant Supervisor: 2024.05.1
-----------------------------------------------------------
 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
[17:03:58] INFO: Configuring timezone (America/Chicago)...
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
[17:04:00] INFO: Setting mode to netserver...
[17:04:00] INFO: Generating /etc/nut/upsd.users...
[17:04:01] INFO: Configuring user: ian
[17:04:02] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[17:04:04] INFO: Configuring Device named myups...
[17:04:04] INFO: Starting the UPS drivers...
Using subdriver: CyberPower HID 0.6
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
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
[17:04:06] INFO: Starting the UPS information server...
   0.000000	fopen /run/nut/upsd.pid: No such file or directory
   0.000068	Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!

   0.000730	[D1] debug level is '1'
   0.001088	listening on 0.0.0.0 port 3493
   0.001842	Connected to UPS [myups]: usbhid-ups-myups
   0.005456	Running as foreground process, not saving a PID file
[17:04:06] INFO: Starting the UPS monitor and shutdown controller...
   0.000000	fopen /run/nut/upsmon.pid: No such file or directory
   0.000072	Could not find PID file to see if previous upsmon instance is already running!

   0.000704	Using power down flag file /etc/killpower
   0.000938	UPS: myups@localhost (primary) (power value 1)
   0.000993	[D1] debug level is '1'
   0.001131	[D1] debug level is '1'
   0.001149	Warning: running as one big root process by request (upsmon -p)
   0.001416	[D1] Saving PID 458 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.074698	[D1] Trying to connect to UPS [myups@localhost]
   0.549135	User [email protected] logged into UPS [myups]
   0.078968	[D1] Logged into UPS myups@localhost
1 Like

I missed that I had to use a0d7b954-nut as the hostname to connect. It looks like I don’t get energy usage this way, though.

3 Likes

But why?
Is “a0d7b954-nut” the name of your server? You are not in localhost?