Multiple UPS with apcupsd component

I have two systems running APCUPSd, one on the same machine as HA and one on another machine. I can use the following config to get status for one UPS, but I can’t figure out how to get status for the 2nd one.

apcupsd:
  host: 192.168.0.10

sensor:
  - name: ups_status
    platform: apcupsd
    type: status

I’ve tried variations of this:

apcupsd:
  host: 192.168.0.10

apcupsd 2:
  host: 127.0.0.1

sensor:
  - name: ups_status
    platform: apcupsd
    type: status

  - name: ups2_status
    platform: apcupsd 2
    type: status

Bumping this thread, hopefully the new changes to apcupsd will allow this to work. Has anyone else had success with this type of setup?

Unfortunately do most components only support one entity. This may change in the future…

You could use the command line sensor and /sbin/apcupsd for the second UPS.

http://www.apcupsd.org/manual/manual.html

Will there be a change to this to allow multiple apcupsd components?

Bumping this one again, as i would really like to know if anyone figured out how to monitor multiple APC UPS. NUT looks like a possiblity, but I do not see how you would configure multiple entries there.

1 Like

Unlike apcupsd, nut is setup as a component, not a platform so multiple sensors is easy. Just add a defintion for each nut server/ups you want to monitor. See below for an example that would go in your sensors.yaml that you would then include in the main configuation.yaml.

- platform: nut
  name: Unraid
  host: 192.168.X.X
  resources:
    - ups.load
    - ups.realpower.nominal
    - battery.charge

- platform: nut
  name: Network
  host: 192.168.X.X
  resources:
    - ups.load
    - ups.realpower.nominal
    - battery.charge

Thanks, this is good to know. Appears to be in the RHEL 7 repos, so I will give it a shot

Ok so I am knee deep in nut. :grimacing:

I noticed that in your config you have not defined a user or password. Did you just leave your upsd.users blank?

I ask as I am troubleshooting this error…

NUT Sensor has no data, unable to setup

Everything appears to look ok on the nut server. I can run the command below without issue.

usbhid-ups -u nut -DDD -a nutdev1

The nut server is listening remotely on port 3493 as I can telnet to it. I’m not quite sure how to test a remote nut connection.

------Update------

Scratch that. I was able to test nut remotely via the command below:

upsc [email protected]:3493

Now I need to troubleshoot this message from HA.

ERROR (Thread-12) [homeassistant.components.sensor.nut] NUT Sensor has no data, unable to setup.#033[0m

Just to follow up.

I was able to get the nut sensor polling properly with the config below.

  - platform: nut
    alias: nutdev1
    name: "apc_network_closet"
    username: apc_user
    password: PASSWORD
    host: 192.168.0.5
    port: 3493
    resources:
      - ups.load
      - ups.realpower.nominal
      - battery.charge
      - input.voltage

“alias” is the ups device name used in the upsc command shown below.

upsc [email protected]:3493

Username and Password are pulled from remote upsd.users file.

1 Like

anyone got multiple ups working with apcupsd yet? ive got 3 ups

has anyone considered turning the multimon.cgi web UI or whatever… ( I havent set it up yet) into a iframe_panel?

I got i to work… but no way to automate from the information. in my head i figure all this info is floating around my network… just a matter of capturing it and making a sensor.

@Chandler_K_Sharp Slightly off topic, do you have two separate computers with APCUPSD running? If so how did you get it to be visible on on or both?

I believe this is the guide i used or very similar

1 Like

Just discovered apcupsd and, like everyone else here, I’d love to get the data from more than one UPS into HA. Looks like someone will have to take the apcupsd “platform” and convert it to a “component” to do this well?

Would love to get this working also, tried NUT but since my UPS’s are super Serial->USB cable ones, NUT just does not seem happy…

I think in the iterm I might just use a command line for one of them, but would love to have this as a component.

@rechena @ldeffenb here is the solution that I have been using successfully for the last few months. A great apcupsd2mqtt addon.