Add-on request: Network UPS Tool (NUT)

Tags: #<Tag:0x00007f780457f138>

Apologies in advance if this belongs in the “Feature Request” section. Wasn’t sure if I should post it there or here in Hass.io.

I recently purchased a CyberPower UPS to plugin all of my networking and Raspberry Pi devices, one of which runs Hass.io. There’s a piece of software called Network UPS Tool (NUT) that can monitor the status of most UPS systems. I currently have it running on a separate Raspberry Pi with the Home Assistant NUT component so I can view my UPS status. I’d like to eventually further expand this such that if my home loses power and the battery gets to a certain state, to gracefully shutdown my Raspberry Pi’s.

Anyways, I think it would be awesome to be able to have this as a Hass.io add-on for folks to easily add the NUT services required to utilize the NUT component in Home Assistant.

Interestingly, there is this.

1 Like

Can’t believe I missed that… thanks!

I noticed it doesn’t show up in the Hass.io Add-on Store but it’s in the official community add-on repo.

I think you’d have to add the experimental repo to have it show up for install:

Just keep in mind that there may be issues with it or other add-ons due to enabling it.

1 Like

!!! Problem Solved !!!
The addon is working again after i did a power cycle of the UPS.

Am still having issues with this NUT Addon. Any ideas?

Also tried these addons without any luck.



[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 20-config.sh: executing…
[11:28:53] INFO: Copying user config files
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 30-users.sh: executing…
[11:28:53] INFO: Generating /etc/nut/upsd.users…
[11:28:54] INFO: Configuring user: nut
[11:28:55] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 30-users.sh: exited 0.
[cont-init.d] 90-upsdrvctl.sh: executing…
[11:28:56] INFO: Starting the UPS drivers
Network UPS Tools - UPS driver controller 3.8.0-3396-gcdc7c4b5b1
Network UPS Tools - Generic HID driver 0.41 (3.8.0-3396-gcdc7c4b5b1)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)
[cont-init.d] 90-upsdrvctl.sh: exited 1.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

!!! Problem Solved !!!
The addon is working again after i did a power cycle of the UPS.

Is there any information available on getting this running on a NUC running Ubuntu/Docker/Hassio

Hi @GaryK try this bad boy

https://hub.docker.com/r/instantlinux/nut-upsd/

Thanks, but a bit over my head :grimacing:

Have you got a running container for this image?

If so, could you post up a good docker-compose.yaml and configuration files?

I’ve been banging my head against a wall trying to get this running. I’m was making progress and it’s been frustratingly slow but I think I’ve hit a wall. Google hasn’t offered any additional solutions, either.

Any help would be appreciated.

wont run for me, complained abount secrets, so i figured that out, and now complaining about not being able to create a ups.conf file

Is there a repository which contains this add on? The repository linked in that page does not have it anymore

edit: I found it! It’s in the experimental repository https://github.com/hassio-addons/repository-edge

sorry for briging an old thread.
I’m not sure I understand how it works, do I own a https://www.cyberpowersystems.com/product/ups/intelligent-lcd/brg1500avrlcd/
the network input output doesn’t seem to be for communication, only the serial and usb, I need to connect the usb directly in my raspberry pie?

You need to connect the UPS via USB to whatever is running your NUT server. I was never able to get the HA add-on to work, so I setup the NUT server on a separate raspberry pi that I have running PiHole. From there, I just run the NUT integration from HA (not to be confused with the NUT add-on which is the server) which acts as a client and connects to the NUT server.

Hello @menekis @shred,

i have some trouble too and i am on Hassio / HassOS,

i solved the problem by just expose the port 3493 in HAssio AddOn :

port 3493

Here is my config YAML:

  - platform: nut
    name: CP1500
    host: 192.168.1.xx
    port: 3493
    alias: CP1500
    username: xxxxxxxxxxxx
    password: xxxxxxxxxxxxxxxxxx
    resources:
      - ups.status.display
      - ups.load
      - ups.realpower.nominal
      - input.voltage
      - battery.charge
      - battery.runtime    

Here is my config of the AddOn :

users:
  - username: xxxxxxxxxxxxxxx
    password: xxxxxxxxxxxxxxxxxxxxx
    instcmds:
      - all
    actions: []
devices:
  - name: CP1500
    driver: usbhid-ups
    port: auto
    config: []
mode: netserver
shutdown_host: 'false'
list_usb_devices: 'true'

Hope it can help others!

:wink: