Trying to get NUT installed on my HassOS VM and can’t seem to get past the integration setup screen.
I’ve installed the add-on from the add-on store, and now I’m in Configuration>Integrations>+ADD Integration > NUT
Pop up screen asks for HOST, PORT, USER, PWD
Host: a0d7b954-nut
Port: 3493 (this is the default that pops up)
User: ???
Pass: ???
I have tried my HA username and password, as well as the usual “root” blank combos. No success.
What am I missing?
Where is your UPS connected to? What is a0d7b954-nut?
Based on my (limited) experience with this integration, you should configure it as:
Host: IP of host running NUT server with UPS connected to (for example I use IP of my Synology NAS, so I can monitor its UPS using NUT integration)
Port: default should be fine, unless you changed this on target machine
User: user ID of account on target machine that can access data regarding UPS (admin equivalent account of Synology NAS, in my case)
Pass: as above.
Additionally NUT on target machine should be enabled and properly configured. In some cases (again Synology) it requires to specify IP address(es) of machines that are allowed to read NUT data.
Also in your particular case log suggests that you are not able to connect to NUT server. This could be because HA is not able to resolve name you gave (a0d7b954-nut) to IP of target NUT server or that given server is not runing NUT, so nothing to connect to…
Physically communications for my UPS is connected via ethernet to the network switch (direct connection to monitoring card on APC UPS). It’s also connected via Serial to my unRAID OS which has a plugin that’s also running (but I’d like to move to the IP based solution so I can use the serial port for other tasks). The HA VM and main unRAID operating system reside on the same physical hardware (Supermicro X9 based Xeon platform)
I have installed the NUT Add-On from the HA Add-On Store, and it doesn’t offer any kind of configuration during install. It’s just a “install” button, and then i clicked “start” once it was installed. the documentation for NUT package stipulates that the Host should be “a0d7b954-nut” when configuring the integration. It does not say anything after that other than “follow the on screen prompts” (or something to that effect).
So I am not sure of the actual NUT IP address (although maybe for fun I’ll go try the VM’s IP) and I have tried the HA Login Credentials that I have setup for my main (and currently only) account. I even changed the password just to make sure I was getting it entered correctly.
The Integration setup screen has the spinning icon for about 10 seconds, the window twitches in size (making me think there’s some code execution happening) and then it fails.
I haven’t used the NUT platform before, but it appears there has been some changes recently to the structure of the code & subsequently the method of connecting. So the instructions/forum posts i can find online are all a bit fractured with now obsoleted information.
EDIT: It appears I may just be new to the add-on store. I have found a configuration tab that I didn’t see before and so I am attempting to configure the NUT server now. Still can’t connect but i’m pretty confident I’m on the right track. Will try to figure it out and post up what i’ve done if I get it going
UPS Configuration
The very first step is going to be making sure that SNMP is turned on in my UPS card (turns out it wasn’t), and that you have user/pass credentials setup or disabled (you’ll need to know which one).
My UPS uses either SNMP v1 or v3. I enabled v3 and setup access to allow my server’s IP to access the data. Every UPS is probably a bit different, so you will have to get that part setup however yours needs to be. Some of this may not be the best, or even necessary, but Here’s how I did mine.
Login to your UPS Management WebGUI and turn on SNMP Access. By default it was off on mine.
Now setup your SNMP user profile. (In my case i didn’t bother with authentication since it’s on a closed vlan and I just wanted to get it running before over complicating things)
Lastly go to the “Access Control” page and ENABLE access for the user name you just setup.
Add the IP of the NUT machine so it will be authorized to access the monitoring data.
First I installed the NUT add-on from the HA Add-On Store.
From the HA SUPERVISOR page, click on NUT (in add-ons section)
At the top of the screen is INFO DOCUMENTATION CONFIGURATION LOG - Click to go to Configuration
The YAML for the config file will be displayed. Edit to show the correct connection details. (username and password are the ones you want to use for the HA integration to connect with the NUT Server NOT your HA login credentials)
users:
- username: NUTuser
password: NUTpass
instcmds:
- all
actions: []
devices:
- name: myups <--- This is the alias you want to give to your UPS that NUT will monitor
driver: snmp-ups <--- This is the driver type (found on the hardware compatibility link. (ie snmp-ups, usbhid-ups, apcsmart, etc)
port: 192.168.0.4 <--- IP (or hostname?) of the UPS to monitor
config: []
mode: netserver
shutdown_host: 'false'
I’m not currently sure what “shutdown_host” or “mode: netserver” really do so i just left them as is.
Press SAVE and restart the add-on
Next go to Home Assistant CONFIGURATION > INTEGRATIONS and click the “+ ADD INTEGRATION” button in the bottom right. search for “NUT” and install the integration.
It will pop up a window asking for your username, password, etc.
Enter the username and password you created in the yaml file above, as well as “a0d7b954-nut” for the hostname. Leave the default port as 3493 unless you have a reason to change it.
When you click “SUBMIT” it should quickly connect and popup a list of resources for you to monitor. select whichever ones you wish to monitor, and then “SUBMIT”
Go check out some of the entities in the Developer’s Tools page to see them working! (Note the “myups” alias I assigned the NUT yaml configuration is presented as part of the name of the sensors now)
I was able to set NUT with Synology NAS without the add-on. As host I entered IP of my NAS, I left the port 3493 and username and password are my admin credentials to the NAS.
One day, this stopped working and I was able to resolve it by disabling the UPS support in the NAS and enabling it again (in the synology settings).
Have you tried going to CONFIGURATION > INTEGRATIONS and then clicking “CONFIGURE” on the integration? You should get a popup that shows all the related options that can be tracked. Maybe you just missed it while checking all the boxes during setup.
I did click configuration, but there is no option for input voltage, there are many other things like accu voltage and percentage, but no input or output voltage.
you could try emailing APC customer support and asking what values are available via USB. Not sure if they’ll know, but it’s possible the unit doesn’t report those details. From memory I don’t think it’s a very fancy UPS so it may not have the analog monitoring to keep track of the actual voltage. it may just operate on an internal switch that is either good input or bad input.
How to configure Network UPS Tools if the UPS is connected to Synology?
I share information, maybe someone wants to connect the UPS via USB to Synology, but is not going to throw the USB from the UPS into the Home Assistant for the reason that it is necessary that Synology is turned off correctly if the UPS gives a command. After all, it’s either Synology or Home Assistant. I chose Synology. But what if you want it to be both in Synology and in Home Assistant? - There is a solution.
If UPS is connected to Synology, then it is necessary to turn on the network UPS server in Synology and specify the IP address of the connected client, in our case, the client is Home Assistant (192.168.1.51)
There is no need to install the Network UPS Tools addon in the Home Assistant. Adding Network UPS integration via GUI. In the Home Assistant, through the GUI, we find Network UPS Tools and specify there
IP Synology
port 3493 we leave it as it is
login: monuser (do not change the login, specify as is)
password: secret (do not change the password, specify as is)
Как настроить Network UPS Tools, если ИПБ подключен к Synology?
Делюсь инфой, может кто-то захочет подключить ИБП по USB к Synology, но не собирается прокидывать USB от ИБП в Home Assistant по той причине, что необходимо, чтобы Synology корректно выключался, если ИБП подаст команду. Ведь тут или Synology или Home Assistant. Я выбрал Synology. Но а что делать, если хочется, чтобы было и в Synology и в Home Assistant? - Решение есть.
Если UPS подключен к Synology, то необходимо в Synology включить сервер сетевого ИБП и указываем IP адрес подключаемого клиента, в нашем случае, клиент это Home Assistant (192.168.1.51)
В Home Assistant аддон Network UPS Tools ставить не нужно. Добавляем интеграцию Network UPS через GUI. В Home Assistant через GUI находим Network UPS Tools и указываем там
IP адрес Synology
порт 3493 оставляем как есть
логин: monuser (логин не менять, указываем как есть)
пароль: secret (пароль не менять, указываем как есть)
Hey, I have eaton 5E 850i connected directly to HA (Rpi4) via usb. Installed addon and configuration. It did connect at first but since then I had this error: Retrying setup: Error fetching UPS state
I deleted the integration and now only I am getting is Failed to connect. Tried 3 more cables, even via usb hub. No luck
I had the same issue and had to delete both the integration AND the add-on.
Then restarted HAOS. Installed the Add-on. Added the integration and it started working.
anyone else here run into the issue with the addon just losing connection to itself and not being able to read the UPS? I have a cyberpower ups connected via USB to HASS host. NUT detects fine, but it will periodically just lose connection and i have to restart the add-on.
The only thing i can thing to do is to see if i can write a script to periodically restart the addon, because if NUT can’t reliably monitor the UPS, then it is pretty much useless to use in order to pass the data to HASS to for instance shutdown other devices gracefully when the UPS is getting low.
anyone have any ideas? is there a way to tell the addon to restart itself if it losses connection to the ups? too bad the addon doesn’t report that state it spits out in the logs as an error so the watchdog could just do it’s job and restart the addon. (restarting the addon works 100% of the time for it to reconnect to the ups)
I wish home assistant could just monitor a directly attached UPS vs relying on an addon considering hass is supposed to be the ‘brain’ of our house.
I also experience random disconnects and issues with things not being ready when hass first load. I have 2 automatations, First is to start nut add-on after a delay of 1 minute (auto start disabled from add-on). second one (and more relevant to you) is an automation that looks at one of my UPS entity status’ and when it changes to unavailable for 1 minute it triggers the restart addon.