Network UPS Tools (NUT) add multiple devices

Hello everyone,
I have two UPSs and would like to monitor them both with the NUT server installed on Home Assistant. I managed to configure the server with a device but I can’t but I don’t know the syntax of how to insert a new device into the configuration.

my configuration is as follows:

users:
  - username: xxxx
    password: xxxxxx
    instcmds:
      - all
    actions: []
devices:
  - name: smartups1
    driver: snmp-ups
    port: xxx.xxx.xxx.xxx
    config:
      - snmp_version = v3
      - secLevel = noAuthNoPriv
      - secName = xxxxxx
      - 'desc = "Example SNMP v3 device, with the highest security level"'
mode: netserver
shutdown_host: 'false'

how do i add another device?

Thanks

Piero

1 Like

Hi Piero, I am having exactly the same situation.
Any help will be great!
Thks

Did you try what’s in the documentation?

Hi @makai
Yes, I try it but maybe I do it wrong
Here are my conf with one and two UPSs and the log for each configuration

here is my NUT conf with one UPS and working

and here is when I add a new UPS to the conf and have the error

You currently have 2 UPS which are strictly identical right?
From the documentation, you need to distinguish UPSs using the config sub-option. Maybe by using the serial?

devices:
  - name: forza
    driver: usbhid-ups
    port: auto
    config:
      - serial = XXX
  - name: forza2
    driver: usbhid-ups
    port: auto
    config:
      - serial = XXX

thanks @makai I will try that
Question: can I add my custom serial or I need to add the real serial number?
If the second option, how I get the serial number?

Thanks

I think that you need real data that will be used to distinguish between UPSs.
To get data, you may add one UPS and check what you have in HA for serial for example

mmm, Yes.
Any ide how to get the serial in a hassio instalation?

I do not know how your server is built, mine is running HA supervised. I can go into my docker container console and issue the following command and get the following results. You should be able to as well.

root@a0d7b954-nut:/# upsc DR_UPS

ups.serial: 000000000000

Proper output from another ups:

ups.serial: BG3FT2000058

As you can see the maker does not populate the number. I would assume at this point one could have issues trying to choose a ups based on serial number.

lsusb -v was not useful either, same all zero serial number.

Wish I could help more, but try the commands and see if your units are encoded with real serial numbers. with lsupb, you will not need to have nut loaded yet.

image

I have Hassio installed.
I dont know how to do that of the docker container console. any help there?

If you are running docker, I use the Portainer add-on and within it you can access the various running containers and open a console to a given container. Commands specific to a particular add-on, such as nut, are run from within the container. Others can explain the concepts much better than I can… I am sure.

Thanks @mattlward
I think that my installation is different