Remote control and monitoring of APC Power Distribution Units from Home Assistant
Table of Contents
This custom component provides an integration for Home Assistant to control APC PDUs using SNMP.
Control and monitoring of the PDUs was already possible using the built-in SNMP integration but has the limitations of needing manual configuration from the config file and each output being presented as a separate entity that couldn't be edited from the UI. This component presents the PDU using Home Assistant's device and entity model, allowing configuration from the UI and functionality like relabelling outputs or assigning them to an area so they can be targetted by automations.
This integration was developed for the AP7920B, but it will likely work with other APC PDUs that have a simmilar MIB structure.
The integration has been tested and proven to work with the following devices:
- AP7920B
- AP7921B - fw v7.2.0 (thanks to @zotanmew)
- AP8981 - fw v6.8.2 without per port power monitoring (thanks to @zotanmew)
Firmware might need to be updated on the PDU for SNMP compatability.
The integration can be added as a custom repository to HACS which allows installation and updating from the Home Assistant UI.
- From the HACS Dashboard, select "Custom repositories" from the overflow menu (3 dots in the top right)
- Paste "https://github.com/Tycho-MEC/apc-pdu" in the Repository field
- From the Type drop down select "Integration", and then press the Add button
- Search for "APC PDU" from HACS search bar at the top and select the entry in the list
- Press Download to install the integration to your Home Assistant
To manually install the integration:
- Clone the repository
- Copy the apc_pdu folder to the custom_components folder in your Home Assistant installation
- Restart Home Assistant
SNMPv2 must be enabled on the PDU and be accessible from the Home Assistant installation!
To add a new matrix to Home Assistant:
- Go to "Settings" -> "Devices & services" to open the Integrations page, and then select "Add integration".
- If the integration has been sucessfully installed "APC PDU" will be available in the list.
- Add the following details:
- host - the hostname or IP address of the management port of the PDU.
- community - the SNMP community configured on the PDU
- Click submit.
The PDU will be added to Home Assistant as a device with a separate entity for each output.
Planned features:
- HACS Integration
- PDU model identifcation
- PDU health monitoring
- Support for more APC PDU models
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. I'm not a professional dev and any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Thanks to:
- Home Assistant for the incredible open source platform. https://www.home-assistant.io/
- The Best Readme Template. https://github.com/othneildrew/Best-README-Template