2025-05-20 17:29:46 +03:00

46 lines
2.4 KiB
Markdown

---
slug: monitor-usb-ups-connected-to-synology-nas-in-home-assistant
title: "Monitor USB UPS connected to Synology NAS in Home Assistant"
tags: [self-hosting, homelab, Synology NAS, UPS, Smart Home, Home Assistant]
image: /img/blog/2023/12/upsha.png
---
There is a lot of automation you can do with this data, but today I want to write up a short guide on how to safely get the information from the UPS connected to your NAS via USB into the Home Assistant.
<!-- truncate -->
There is a lot of automation you can do with this data, but today I want to write up a short guide on how to safely get the information from the UPS connected to your NAS via USB into the Home Assistant.
:::info
Your Synology NAS and Home Assistant should be in the same local network, or you'll need an additional network configuration that is not a subject of this post
:::
## UPS server
After connecting the UPS to the NAS we need to enable Synology NAS UPS server that will allow other machines to get UPS information over the local network. In your Synology DSM go to _Control Panel -> Hardware & Power -> UPS_ tab. Here you can set up a UPS connected to your NAS via USB (or via SNMP protocol if you have enterprise-grade UPS for data centers). Assuming you did that, it is time to enable the UPS server by checking the _"Enable network UPS server"_ checkbox.
![](001.png)
Also, you need to click the _"Permitted Synology NAS Devices"_ button and add your Home Assistant local IP address there:
![](002.png)
After that, you need to make sure the port for the UPS server is open in the firewall on your NAS. Go to _Control Panel -> Security -> Firewall_ tab and click the _"Edit rules"_ button. Here you need to edit an existing rule for the _TCP_ protocol that has a list of apps in the _Ports_ column:
![](003.png)
In the editing window click the Select button near _"Select from a list of built-in applications"_ and make sure the _UPS server_ is selected:
![](004.png)
## Home Assistant integration
The integration that will allow us to connect to the UPS server on Synology NAS is [Network UPS Tools](https://www.home-assistant.io/integrations/nut/).
In your Home Assistant go to _Settings -> Devices & services_ and click the _"Add integration"_ button. Search for "nut" there and choose _"Network UPS Tools (NUT)"_.
![](005.png)
In the configuration window that appeared you need to set your NAS's local IP address as a _Host_ and leave the _Port_ number unchanged.
Hit _Submit_ and you are done.