APC UPS and Synology NAS integration for Home assistant

This is great. I didn’t realize that Synology had NUT server builtin. I’m able to pull a lot more data by querying the NUT server than what I see in the Synology UI. You can see what’s available if you ssh to your Synology and run upsc ups@localhost. Add each of those to your NUT sensor config. You can grab creds from /usr/syno/etc/ups/upsd.users.

3 Likes

Works like a charm! What a easy setup… Thanks

Hi,

I have a APC UPS connected to my synology NAS via USB port. I want to monitor data about UPS in HA.

I configured snmp in HA and in my NAS, but much os data give me extrange values in battery_charge, battery_voltage, etc.

What is necessary do to change these values in correct ones?

I’m running HA in docker app in my Synology NAS.

thanks

Have you tried the NUT component? DSM has an easy setup for NUT and it has been smooth sailing for my NAS/UPS and HA.

Hi @silvrr

I tried but didn’t worked, maybe i did something wrong, but i don’t know.

This is the configuration in my NAS.

imagen

I can’t upload now imatge. but my NAS detects info about UPS.

And in my configuration sensor file (sensor.yaml) i have this:

- platform: nut
  host: 192.168.1.100
  alias: ups_apc
  resources:
    - ups.load
    - input.voltage
    - battery.runtime
    - battery.voltage
    - battery.charge
    - ups.realpower.nominal

In logs only i can see this:

2018-09-06 22:58:43 ERROR (SyncWorker_14) [homeassistant.components.sensor.nut] NUT Sensor has no data, unable to set up
2018-09-06 22:58:43 WARNING (MainThread) [homeassistant.components.sensor] Platform nut not ready yet. Retrying in 30 seconds.

018-09-06 22:59:14 ERROR (SyncWorker_12) [homeassistant.components.sensor.nut] NUT Sensor has no data, unable to set up
2018-09-06 22:59:14 WARNING (MainThread) [homeassistant.components.sensor] Platform nut not ready yet. Retrying in 60 seconds.
2018-09-06 23:00:15 ERROR (SyncWorker_16) [homeassistant.components.sensor.nut] NUT Sensor has no data, unable to set up
2018-09-06 23:00:15 WARNING (MainThread) [homeassistant.components.sensor] Platform nut not ready yet. Retrying in 90 seconds.

What i need to do else in synology NAS? Synology give me info about my UPS…

I’m using HA in docker in my NAS, maybe this can be the problem?

thanks

Unless you’ve changed the default config, your alias should be ups. You can get the username and password from /usr/syno/etc/ups/upsd.users.

2 Likes

Hi,

After add user and password on configuration sensor.yaml file, now works!

thanks!

1 Like

Hello
i want ask what the best way to connect the UPS to synology or Rpi with hass.io run on it ?
and the best of NUT or snmp ?

Depends on what your UPS can provide.

Nut is super easy. Install and start add on, add nut sensor and restart.

1 Like

do connect the ups to synology ? is there add on for NUT ?

My diskstation supported a UPS input over USB and then could provide a NUT server. Point the Home Assistant NUT sensor to the synology and done.

Option 2 is to connect the UPS via USB to the Pi, add a NUT add-on and, add sensor, done.

i can do both option is there any different between them ? and where i can find NUT add-on ?
can you share your config here ?
i try to this:


but can’t make work don’t know what is wrong ?
can you help ?

thank you

Is the add on


Mid how to add custom add ons.

thank you
but i can’t install the add on when i click on install it don’t install on hass.io don’t know why ?
i connect the ups to my synology and work i can see the info know i want to connect the ups to HA how ?
can i use this:
https://www.home-assistant.io/components/sensor.nut/
i try this but no good
- platform: nut
name: UPS Nut
host: which ip i put here ?
port: 3493 is this correct ?
alias: ups_name
resources:
- ups.load
- ups.realpower.nominal
- input.voltage
- battery.runtime
- battery.voltage
- battery.charge
or not if yes can tell me how ? i try but not working

thank you

Ive had trouble with that one in the past. https://github.com/colindunn/hassio-addons this one is installed and working. Looks like I need to update my github.

The IP of your NAS

I believe this is the default for NUT. Check your settings on the NAS where you setup the NUT server.

i try his


but it don’t show in hass.io when i add the link.

i will there your now

That one is not in the official repository yet so it won’t load. There is a pull request to get it added but it hasn’t moved for quite some time.

https://github.com/hassio-addons/repository/pull/95

if i use this
https://github.com/colindunn/hassio-addons
i can get info from synology correct ?

when i click start it after stop it give me error:
Network UPS Tools - UPS driver controller 3.8.0-3727-geade014bef
Network UPS Tools - Generic HID driver 0.41 (3.8.0-3727-geade014bef)
No matching HID UPS found
USB communication driver 0.33
Driver failed to start (exit status=1)

can you tell me how i config it ?

I think you are confused by the options.

You need to create a NUT server. Whatever you plug the UPS into (via usb) should be your server. This will read the UPS data over USB and the server provides this data to network connected clients.

If you use your synology box as the server, you do not need the add-on. If you use your Hass.io device as the server, you need the add-on.

With either option, you can setup the NUT sensor in Home Assistant to pull the data from the server.

OK i use your synology box as the server
what i do next to connect to HA ?