New apcupsd Hass.io add-on

@korylprince I’ll try to use apcupsd on server and clients, what I want with powershute is to shutdown all machines connected to UPS when it runs out, thats what apcupsd also does, so I’ll give it a try…

Well, after 2 hours, it seems like I am not making much progress. I run Hassio on Hassos in Raspberry 3b+. I am not even sure how to check the USB ports, I ran these commands:
Screenshot 2020-03-03 at 12.11.39
Any help?

@fernmac According to your lsusb output, your UPS is not connected. You should see something with 051d as the vendor id. None of those devices are APC devices. I would double-check your USB connections, and maybe try replacing the cable.

Hello,

I’ve installed the apcupsd on the physical machine and then connected the HA to that, and its working.
I don’t have the Voltage In/Out or Load information, my ups it’s a SmartUPS 1000, is there a way/configuration that can be done to retrieve that?

Also is there a way to trigger a self-test or battery calibration from apcupsd software, as I can with powerchute?

Thanks!

Julio Silva

@zejulio Before you worry about what Home Assistant sees, let’s see what apcupsd can actually see.

On the same OS that’s running apcupsd, run the apcaccess command and see what output you get. If the information is missing from there, it’s possible you have apcupsd misconfigured. You may need to configure apcupsd to use MODBUS to communicate with your UPS to get all of that information.

If apcaccess does show all of the information you need, then you likely have Home Assistant misconfigured on what information to pull.

Yes i understand.
What i have in HA is the same as host.
I’m using USB cable, i need to activate modbus also?

Thanks!

Changed from usb to modbus in config but ive get less information…

Unfortunately, that’s as far as my knowledge can get you. I suggest you post to the apcupsd mailing list for further support.

In modbus i got COM Lost status. It seams that it does not detect the usb UPS in this mode…

I finally made it work. I had to use the rs232 cable to update the UPS firmware and then enable the advanced config so I can enable modbus. Then i was able to connect to the UPS using modbus via serial cable.
I’ve tried the same over USB but its unable to connect. The standard USB config does not gives me the full information like voltage and load.
I have an 2011 SMT1000I APC UPS

That’s great to hear! Thanks for posting the solution here, as I’m sure it will help others with the same issue.

hi everyone I installed the plugin (APC UPS Daemon) in Home Assistant, connected the cable from the UPS Smart-UPS 1000 (model SMC1000IC) to RPI 4 and entered the following data:

Configuration.yaml

apcupsd:
  host: 127.0.0.1
  port: 3551

sensor.yaml

  - platform: apcupsd
    resources:
      - apc
      - date
      - hostname
      - version
      - upsname
      - cable
      - driver
      - upsmode
      - starttime
      - model
      - status
      - linev
      - loadpct
      - bcharge
      - timeleft
      - mbattchg
      - mintimel
      - maxtime
      - maxlinev
      - minlinev
      - outputv

the plugin is configured by default:

name: APC UPS
cable: usb
type: usb
device: ''
extra: []

unfortunately I can’t see some data,I attach the screenshots:


2

how do i go about receiving all the data correctly? thank you very much

@Denny_d I think you’re having the same issue zejulio had above. Make sure to read through our conversation, especially his last comment on how he updated the UPS, turned on MODBUS support, and configured apcupsd to use MODBUS.

hi zejulio I have SMT1000I APC UPS and I have your same problems I would like some more indications to solve the problem:

  1. would you show me which cable you took to update the ups?
  2. once connected how did you access the advanced mode?

thank you

ok thanks i try to contact him

Hello Denny,

You are getting what I’ve got with USB cable…
I have changed to advance mode in order get the MODBUS option available. Even then I was not able to get all the information with USB, I need to use the cable that came with the UPS that is serial/rs232 to make it work…
I’m using Windows PC, since you are using a RPI maybe you need a USB to Serial converter…

If you need further help or if you found a way to make it work with USB cable, let me know!

JS

1 Like

I have sensors set up in configuration.yaml, and they’re showing up as expected.

From the configuration readme I see:

You can also override any setting in apcupsd.conf using the extra configuration option:

"extra": [
    {"key": "KILLDELAY", "val": 10},
    {"key": "NISPORT", "val": 5555}
], ```

I don’t see apcupsd.conf in /config or /addons. Do I need to create that file, or is there a way to reformat the extra [] in YAML and put it in the UI at http://homeassistant.local:8123/hassio/addon/a722577e_apcupsd?

I’m trying to change MINTIMEL, but after a couple hours, I guess I’m just missing something obvious.

@jetatomic MINTIMEL is a value reported by apcupsd, not a configuration option. Looking at the manual, you’re looking for the MINUTES configuration option. You would configure the add-on something like this:

...,
"extra": [
    {"key": "MINUTES", "val": "10"},
    ...
]

Thanks for spotting that error. I’m still not sure whether the config needs to be added to an apcupsd.conf which already exists (and I can’t find), or if I need to create apcupsd.conf (and where), or if I can add some YAML to extra [] via the GUI at http://homeassistant.local:8123/hassio/addon/a722577e_apcupsd

@jetatomic

This add-on manages the apcupsd.conf file inside the container. You set the options in the JSON config for the add-on, and it configures apcupsd.conf.