How to configure NUT?

Thank you for you input. First time I’m reading one needs to manually open that port - since the add on tells you it is the default port.

Anyway - did that and it did not change anything. Still the same Error message, still the same log.

This all really seems way too complicated for a device that is physically plugged into the host machine…

Is your add-on running ?

Well - it is running until it stops again.

It tries about three times to start up producing a log ending in:

s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped`

…and then it stops itself again.

Edit:

  • Tried deinstalling and reinstalling the addon. No change, same thing.

  • Tried “leave front door open” and removing username an PW, but then the add-on wont let me save the config because the user and pw is missing (even though that is the purpose of “leave front door open” as explained in the add-on docs).

As long as you don’t get the add-on to work, the HA integration will not work.

Well yes, obviously - that is why I’m here asking for help.

I really don’t get why HA can’t just greet me with a “New UPS device detected. Add now?” message the moment I plugged it in. It seems to be able to do that with so many LAN/WiFi/Bluetooth devices, but when it comes to a simple USB device physically plugged into the Pi one has to jump through a thousand hoops backwards.

Is the USB device found ?
Settings → System → hardware. Plug it out check devices, plug it back in, check devices, see if there is a new device found.

1 Like

So I checked under “Settings → System → hardware → All Hardware” and there is a whole bunch of things, but not really anything hinting at the UPS. When i search for “UPS” or “Power” nothing comes up. The USB devices available just seem to be the USB controllers themselfes.

Unfortunately I’m about 600km away from the set-up (holiday house). I just plugged it in thinking I’ll set it up remotely. Guess I’ll have to wait for any further trubleshooting until I’m back there in a few weeks…

Maybe the USB ports on the RPI have to get fully reinitialized after you did plugin that USB cable coming from the UPS. Have you tried a full system reboot (not only a HA restart)? Worth a try.

Did that just now (didn’t even know that option was there tbh). USB devices still don’t show anything realted to the UPS, however I’m seeing something called “uhid” - kinda similar to the driver name “usb-hid”? Not sure if that was there before the restart.

Still the same log and stopping sequence when trying to fire the add-on up.

I am now back on site and have unplugged / replugged and switched between USB port, as well as rebooteed the whole system repeatedly - yet no change whatsoever.

The UPS add-on still stops with the same errors in the log.

I still don’t see any device hinting at a UPS in the hardware list - but maybe I’m looking in the wrong place or for the wrong thing?

Since this is a remote location I really need some way of checking on the UPS remotely and get alerts sent to my phone if power goes out, so I can monitor the situation and if needed send someone to check.

Does anyone have any Idea what else I could do?

Here is the full log again:

-----------------------------------------------------------

Add-on: Network UPS Tools

Manage battery backup (UPS) devices

-----------------------------------------------------------

Add-on version: 0.14.1

You are running the latest version of this add-on.

System: Home Assistant OS 16.0 (aarch64 / raspberrypi4-64)

Home Assistant Core: 2025.7.4

Home Assistant Supervisor: 2025.07.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

[19:25:11] INFO: Configuring timezone (Europe/Zurich)...

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

[19:25:13] INFO: Setting mode to netserver...

[19:25:13] INFO: Connected USB devices:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[19:25:13] INFO: Generating /etc/nut/upsd.users...

[19:25:14] INFO: Configuring user: nutella

[19:25:17] INFO: Configuring Device named Powerwalker...

[19:25:17] INFO: Starting the UPS drivers...

Network UPS Tools - Generic HID driver 0.47 (2.8.0)

USB communication driver (libusb 1.0) 0.43

libusb1: Could not open any HID devices: insufficient permissions on everything

No matching HID UPS found

Driver failed to start (exit status=1)

Network UPS Tools - UPS driver controller 2.8.0

cont-init: info: /etc/cont-init.d/nut.sh exited 1

cont-init: info: running /etc/cont-init.d/nutclient.sh

cont-init: info: /etc/cont-init.d/nutclient.sh exited 0

cont-init: warning: some scripts exited nonzero

s6-rc: warning: unable to start service legacy-cont-init: command exited 1

/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.

/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

s6-rc: info: service fix-attrs: stopping

s6-rc: info: service base-addon-timezone: stopping

s6-rc: info: service base-addon-log-level: stopping

s6-rc: info: service fix-attrs successfully stopped

s6-rc: info: service base-addon-timezone successfully stopped

s6-rc: info: service base-addon-log-level successfully stopped

s6-rc: info: service base-addon-banner: stopping

s6-rc: info: service base-addon-banner successfully stopped

s6-rc: info: service s6rc-oneshot-runner: stopping

s6-rc: info: service s6rc-oneshot-runner successfully stopped

I’m not an expert, but this is clearly your issue:

libusb1: Could not open any HID devices: insufficient permissions on everything

No matching HID UPS found

Driver failed to start (exit status=1)

I wonder whether there is a default login/pass that you are supposed to use with the device, as opposed to making up your own (nutella).

Thanks for your reply.

As this is the log of the Add-On it seems the UPS is not being discovered / can’t be talked to, since th elist of available USB devices does not include anything that looks like the UPS:

[19:25:13] INFO: Connected USB devices:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

From all I know, connecting to the UPS via USB does not require a Usrname or PW. There is also no way of specifying one in the Add-On.

I’m not sure you are aware: The absurd thing about NUT in HA is, that the “device” the NUT Integration is trying to talk to is actually the NUT Add-ON running in HA as well.

So for whatever reason it was deemed clever to split this into two parts:

  • First an Add-On that virtualizes a NUT server. There you have to define a Username and PW for said server, it won’t let you leave that empty. This Add-On should talk to the UPS via USB.

  • Second, a NUT integration that should integrate the data provided by the NUT server into HA. To let the integration talk to the server you need to provide it with the Username and PW you defined in the server set-up.

So the Username/PW is not relevant for the UPS, but is only there to secure the communication between two pieces of software (the add-on and the integration) both running inside of HA!

Why all this cannot be just done one simple integration / add-on will forever remain a mystery to me. When my neighbour buys a new printer, HA auto-discovers it wirelessly and asks me if I wanna add it with some nice UI guided steps - yet if I physically plug in a simple USB device like a UPS, absolutely nothing happens and one has to jump through a thousand hoops to make it work (or not, as in my case…)

From the CLI typing:

apt install libusb-1.0-0-dev

might help.

Thanks for the suggestion. I assume by “CLI” you mean a command line interface like Terminal?

I tried typing the suggested command in Terminal, but it tells me

bash: apt: command not found

Am I doing something wrong?

CLI = Command Line Interface

What install method did you use for your HA instance, how is HA installed?

It is installed like this, running on a Raspberry Pi 4. I installed it more than a year ago, but regularely updated whenever an update was available:

I have the Terminal installed. Here showing the listed USB devices as well as the Error produced after typing your suggestion:

I would try dmesg > some_file_name, then look at some_file_name and see if you see anything related to your UPS.

FYI, apt is a software “package” manager for various kinds of linux distributions, but HAOS doesn’t support apt.

Sorry for my noob-ness, but where would I do this and what exactly would I do?

As I am now on site for a few days, I have now tested unplugging the USB cable, doing a full reboot of the Raspi and the replugging the USB cable into one of the USB 2 port (read somewhere that this is more reliable for UPS’s?). I ran “lsusb” in terminal before and after unplugging/rebooting and afterwards - unfortunately it still read the same in both cases:

image

So it seems the UPS is just not being recognized by the USB port at all, or am I wrong?

I will try to source a new USB cable asap to rule out that this is the problem.

What else could I do?

You either do this at the console of your Raspi, or if you have ssh AddOn, it may be possible to do it there.
You can use the text reader less. First you can unplug then replug the UPS USB into your Raspi then type dmesg | less which inhales the output of dmesg, then type G which will take you to the end of the dmesg output and there you should see the events where the USB was unplugged and replugged.

Thank you for your explanantion.

image

image

This is the stuff that seems to relate to anything concerning USB.

Not quite sure what to make of it tho…