Network UPS Tools Add-On and Integration

Hi,

I am working to get NUT working with my UPS and HomeAssistant but running into a hurdle I haven’t been able to get past.

Current Configuration:
HomeAssistant Supervised on RaspberryPi3

It looks like everything in the log file is starting properly but when I go to add the Integration I am constantly met with the message “Failed to Connect.” I have checked the username and password, tried host as localhost, 127.0.0.1, and the Pi IP address.

Any tips to get me past this hurdle?

Thanks

Log File:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: Network UPS Tools
Manage battery backup (UPS) devices

Add-on version: 0.11.0
You are running the latest version of this add-on.
System: Home Assistant OS 8.2 (armv7 / raspberrypi3)
Home Assistant Core: 2022.6.7
Home Assistant Supervisor: 2022.08.3

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/02-set-timezone.sh
[20:17:54] INFO: Configuring timezone
cont-init: info: /etc/cont-init.d/02-set-timezone.sh exited 0
cont-init: info: running /etc/cont-init.d/nut.sh
[20:17:54] INFO: Setting mode to netserver…
[20:17:55] INFO: Generating /etc/nut/upsd.users…
[20:17:56] INFO: Configuring user: nutty
[20:17:59] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[20:18:01] INFO: Configuring Device named rackups…
[20:18:04] INFO: Starting the UPS drivers…
Using subdriver: APC HID 0.96
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Network UPS Tools - UPS driver controller 2.7.4
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
[20:18:06] INFO: Starting the UPS information server…
0.000000 fopen /run/nut/upsd.pid: No such file or directory
0.001958 listening on 0.0.0.0 port 3493
0.003259 Connected to UPS [rackups]: usbhid-ups-rackups
[20:18:06] INFO: Starting the UPS monitor and shutdown controller…
0.000000 fopen /run/nut/upsmon.pid: No such file or directory
0.002005 Using power down flag file /etc/killpower
0.002899 UPS: rackups@localhost (master) (power value 1)
0.003246 debug level is ‘1’
0.003303 Warning: running as one big root process by request (upsmon -p)
0.004464 Init SSL without certificate database
0.012416 Trying to connect to UPS [rackups@localhost]
0.073237 User [email protected] logged into UPS [rackups]
0.016860 Logged into UPS rackups@localhost

Hi!

As you are running the nut addon, HA should find it automatically I think. Did you try restarting HA?
My integration is setup like this:

  • host: a0d7b954-nut (docker container id)
  • port: 3493

That’s what I thought would occur but it isn’t popping up for me. I have gone through a few system restarts with no change. Good to know about the host, I might have to sort out which docker container ID is running my NUT install.

I think it’s the same ID as it is the one written in the addon documentation

It took me a minute to find the host name on the Add-on page but once I did everything came together to work. Thank you for the help.

1 Like