TL:DR
My UPS system is no longer seen by Home Assistant. It only displays “Unavailable”.
Core 2021.2.2
Supervisor 2021.02.5
Home Assistant OS 5.11
RPi 4, 8GB RAM
This Integration was working fine up til 2021.2.1. I was able to see my UPS, and it was driving message alerts to my phone (via NodeRED) when there were power issues.
I see a ‘breaking’ note in the 2021.2.1 update notes, stating NUT no longer configured via YAML. I had already removed this and was using the Integration method instead. After updating last night, my UPS system shows as “Unavailable”. I understand the NUT is entirely managed through the Integrations section. I already had the Integration installed, but when I clicked Options on the NUT box inside Integrations, a box popped up saying “installing”. But nothing installed.
So I removed the integration, rebooted, and tried to add the integration again. Now I cannot connect using any of my details. No name or password works, no matter what I try it keeps saying “Failed to connect”.
Is there a default name and password for NUT that I’m not aware of? The old one from my previous YAML is not working, nor are any defaults I can find.
From the notes on 2021.2.1 I thought NUT was now entirely through Configuration>Integrations>Add Integration? Hasn’t fixed my issue… I’ve just upgraded and rebooted and my previous device is still not showing.
This is what has broken for me. When it asks me for name and password, I’m filling in all the correct details, and it says “failed to connect”. This is through Configuration>Ingegrations
I can’t get into GibHub at the moment. When I click on “Forget Password” it says it’s sent me a code to my email. And I never get the email. I’ve been trying for 2 days to get in and add info to the GitHub. So there’s that too…
I’m guessing the GitHub README is out of date, because it says “Be sure to add a NUT Sensor to your configuration.yaml after starting the add-on”.
I’m very confused how the heck this is now working. I add an Add-On AND then add an Integration?!
Many people run the NUT server as an addon to HassOS, then it is usable in HA through an integration. I am using the NUT server directly on the operating system, not as an addon or container, as are many other people.
Only the integration is managed there, the actual NUT server is managed separately, through a configuration file that is part of the addon container or in the operating system.
I understand now, and have fixed my problem. Change Host field from “localhost” to “a0d7b954-nut”. Part of the issue for me was not understanding that an Integration and an Add-on are two different things. I had it in my head that adding the NUT Integration meant I didn’t need an Add-on. It turns out you need the Add-on AND the Integration. I was looking at it like installing a plug-in, which would only require one thing to be installed and not two. I understand now.
It seems the Add-on broke (which was known and was worked on and subsequently updated to 0.6.0, thanks!), and in my haste to see if it was something at my end I made things worse by removing the Integration to re-add it again. I then couldn’t add an Integration back in and kept getting “Failed to connect”.
The solution was, as is written on the documentation page for the Add-On, that the Host field when adding the Integration should be “a0d7b954-nut”, however it defaults (as in the images I posted) to “localhost”.
Changing it from “host” to “a0d7b954-nut” and then using my Name and Password allowed the Integration to be added, and now my device is visible again (along with more sensors than I had before).
My only suggestion to make this clearer is to remove details of configuration YAML instructions from the GitHub page, as that caused confusion over a previous NUT Sensor I had added to my config. These were previously commented out as historical, and the GitHub confused me over needing to add them back in again. Conflict between the 2021.2.1 Breaking Changes notes and the GitHub README.
Thank you very much for the insight. I too by mistake had an issue with Add-On and Integration, but now the whole problem was solved for me as well and I question myself why, I didn’t thought of it sooner.
Thanks again, your post was very helpful @SiriusGen
obviously you missed to read the solution provided by @SiriusGen in full. Please read it carefully and follow it to the point that an Add-on AND the integration is needed, resp. the host name you should use.
The solution works!
I only see the user / pass fields in /config/integrations (not the host or port) :
Then, when I hit “Submit”, I get this:
Add-on is installed (v0.11.0) and it looks it is working fine as per the logs:
-----------------------------------------------------------
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 (amd64 / generic-x86-64)
Home Assistant Core: 2022.7.3
Home Assistant Supervisor: 2022.07.0
-----------------------------------------------------------
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
Log level is set to INFO
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
[09:43:33] 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
[09:43:33] INFO: Setting mode to netserver...
[09:43:33] INFO: Connected USB devices:
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[09:43:33] INFO: Generating /etc/nut/upsd.users...
[09:43:33] INFO: Configuring user: lyonnups
[09:43:33] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[09:43:34] INFO: Configuring Device named lyonnups...
[09:43:34] INFO: Starting the UPS drivers...
Supported UPS detected with mustek protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf
Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)
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
[09:43:36] INFO: Starting the UPS information server...
0.000000 fopen /run/nut/upsd.pid: No such file or directory
0.000222 listening on 0.0.0.0 port 3493
0.000379 Connected to UPS [lyonnups]: blazer_usb-lyonnups
[09:43:36] INFO: Starting the UPS monitor and shutdown controller...
0.000000 fopen /run/nut/upsmon.pid: No such file or directory
0.000179 Using power down flag file /etc/killpower
0.000325 UPS: lyonnups@localhost (master) (power value 1)
0.000366 debug level is '1'
0.000371 Warning: running as one big root process by request (upsmon -p)
0.000516 Init SSL without certificate database
0.001605 Trying to connect to UPS [lyonnups@localhost]
0.507247 User [email protected] logged into UPS [lyonnups]
0.002299 Logged into UPS lyonnups@localhost