NUT Server + @ UPS

Hello
Not sure if this is the correct category to post my question. I have two CyberPower UPS and I want to add them to my NUT Server. Both have identical vendor ID’s but different serial numbers. They are being “seen” by HA. If someone has successfully added multiple UPS to a NUT server within HA, could you kindly post the “Devices” section of the .yaml file so I can see what I’m doing incorrectly?

This is what I have. Thanks in advance for any help that can be provided.

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: P1FNQ2xxxx20
  - name: Modem_Router
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: CXXPQ2xxxx95
mode: netserver
shutdown_host: false
remote_ups_name: CyberPower_1500_RT2U

Have you tried setting two different remote_ups_names? like adding_1, _2
I would have built two separate but identical using the 2 different names

Not sure I can help as I have only been playing with this recently, but I actually don’t understand what the problem is. If I understand correctly, you have 2 UPSs connected to your HA System and that the NUT Server Add-On is configured for these 2 UPSs, and the HA NUT Integration does indeed see these 2 UPSs as 2 NUT Devices.

BTW, according to the Documentation, remote_ups_name only applies if the mode: netclient

Hello
Thanks for the help. Are you suggesting something like this:

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: P1FNQ2xxxx20
mode: netserver
shutdown_host: false
remote_ups_name: CyberPower_1500_RT2U_UPS1

  - name: Modem_Router
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: CXXPQ2xxxx95
mode: netserver
shutdown_host: false
remote_ups_name: CyberPower_1500_RT2U_UPS2

Or…

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: P1FNQ2xxxx20
#mode: netserver
shutdown_host: false
remote_ups_name: CyberPower_1500_RT2U_UPS1

  - name: Modem_Router
    driver: usbhid-ups
    port: auto
    config:
      - idVendor: 0x0764
        idProduct: 0x0601
        serial: CXXPQ2xxxx95
#mode: netserver
shutdown_host: false
remote_ups_name: CyberPower_1500_RT2U_UPS2

I’m still unsure what problem you are trying to overcome?

Thanks for the help.

I’m trying to add two UPS’s to a single NUT server. The .yaml within the NUT server doesn’t like the code I’ve imputed, so if someone has successfully added two UPS’s to a NUT server then I’m hoping they would post the “device” portion of the .yaml file (from the NUT Server) so I can compare mine to theirs. Thanks.

I’m looking at the documentation NUT Server AddOn here, and usbhid-ups here. A couple of things I see:

  • vendorid instead of idVendor
  • product instead of idProduct.
  • serial seems OK.

These 3 items may need to have their values placed in quotes.

  • remove remote_ups_name as it only applies when mode is netclient, but you are running in mode netserver.

Have you looked at this?: Multiple UPS on the same NUT-Server • Aaron Weiss

1 Like

I tried this but it didn’t work. Sorry I’m not very good at coding, so I’m really flying blind. Thanks for the help. I have changed the way the product and vendor ID’s are imputed. I’m not sure where the quotes would go for Vendorid / Productid / Seial. I have to post the whole code so you can see the error message. I’ve intentionally removed the username and password. Thanks

users:
  - username: 
    password: 
    instcmds:
      - all
    actions: []
devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: auto
    config:
      - Vendorid: 0x0764
        Productid: 0x0601
        serial: P1FNQ2xxxx20
  - name: Modem_Router
    driver: usbhid-ups
    port: auto
    config:
      - Vendorid: 0x0764
        Productid: 0x0601
        serial: CXXPQ2xxxx95
#mode: netserver
shutdown_host: false
#remote_ups_name: CyberPower_1500_RT2U

Error message is: Failed to save add-on configuration, not a valid value. Got {‘users’: [{‘username’: , ‘password’: , ‘instcmds’: [‘all’], ‘actions’: }], ‘devices’: [{‘name’: ‘Data_Rack’, ‘driver’: ‘usbhid-ups’, ‘port’: ‘auto’, ‘config’: [{‘Vendorid’: 1892, ‘Productid’: 1537, ‘serial’: ‘P1FNQ2xxxx20’}]}, {‘name’: ‘Modem_Router’, ‘driver’: ‘usbhid-ups’, ‘port’: ‘auto’, ‘config’: [{‘Vendorid’: 1892, ‘Productid’: 1537, ‘serial’: ‘CXXPQ2xxxx95’}]}], ‘shutdown_host’: False}

I don’t see anything obvious, but may want to make vendorid and productid all lower-case. Separately, want to make the mode netserver, but it is likely the default anyway.

Another suggestion would be to start over and start with the example in the Docs and get it to pass the configuration test, and once it passes then start making changes little by little to see where the failure is at.

Hello
This is frustrating. I’ve been watching this video where the gentleman is able to add a second UPS to the NUT Server and add the integration. For some reason I can’t replicate it. Here is my code for a single UPS:

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2
    config:
      - vendorid = 0764
      - desc - PR1500LCDRT2U-01
mode: netserver
shutdown_host: false
list_usb_devices: true

When I try and add the second UPS, I net connection erros at the NUT client. Don’t know why.

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2
    config:
      - vendorid = 0764
      - desc - PR1500LCDRT2U-01
  - name: Modem_Router
    driver: usbhid-ups
    port: /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-3
    config:
      - vendorid = 0764
      - desc - PR1500LCDRT2U-02
mode: netserver
shutdown_host: false
list_usb_devices: true

Update.

This is the configuration file I used to get the two UPS’s to work with the NUT server (note the small “x” are replace real numbers within each serial number):

devices:
  - name: Data_Rack
    driver: usbhid-ups
    port: auto
    config:
      - serial = P1FNQ2xxxx20
  - name: Modem_Router
    driver: usbhid-ups
    port: auto
    config:
      - serial = CXXPQxxxx95
mode: netserver
shutdown_host: false
list_usb_devices: true