https://github.com/syssi/esphome-apc-ups
ESPHome component to monitor and control a APC UPS via RS232
https://github.com/syssi/esphome-apc-ups
apc esphome esphome-component hacktoberfest ups
Last synced: about 1 year ago
JSON representation
ESPHome component to monitor and control a APC UPS via RS232
- Host: GitHub
- URL: https://github.com/syssi/esphome-apc-ups
- Owner: syssi
- License: apache-2.0
- Created: 2023-05-06T09:41:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T10:11:29.000Z (over 1 year ago)
- Last Synced: 2025-04-15T06:54:18.916Z (about 1 year ago)
- Topics: apc, esphome, esphome-component, hacktoberfest, ups
- Language: C++
- Homepage:
- Size: 77.1 KB
- Stars: 47
- Watchers: 4
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# esphome-apc-ups




[](https://www.buymeacoffee.com/syssi)
ESPHome component to monitor and control a APC UPS via RS232
## Supported devices
* APC SU420INET (firmware `21.3.I`)
* APC SUVS420I (firmware `42.L.I`)
* APC SUA1000I (firmware `652.13.I`)
## Requirements
* [ESPHome 2024.6.0 or higher](https://github.com/esphome/esphome/releases).
* Generic ESP32/ESP8266 board
## Schematics
```
RS232 UART-TTL
┌───────────┐ ┌──────────┐ ┌─────────┐
│ │ │ │<----- RX ----->│ │
│ │<---- TX ---->│ RS232 │<----- TX ----->│ ESP32/ │
│ APC UPS │<---- RX ---->│ to TTL │<----- GND ---->│ ESP8266 │
│ │<---- GND --->│ module │<-- 3.3V VCC -->│ │<--- VCC
│ │ │ │ │ │<--- GND
└───────────┘ └──────────┘ └─────────┘
```
### D-SUB 9P connector
| Pin | Purpose | MAX3232 pin |
|:---:| :----------- | :---------------- |
| 1 | RX | P14 (DOUT1) |
| 2 | TX | P13 (RIN1) |
| 3 | | |
| 4 | | |
| 5 | | |
| 6 | | |
| 7 | | |
| 8 | | |
| 9 | GND | P15 (GND) |
### MAX3232
| Pin | Label | ESPHome | ESP8266 example | ESP32 example |
| :----------- | :----------- | :---------- | :--------------- | :------------ |
| P11 (DIN1) | TXD | `tx_pin` | `GPIO4` | `GPIO16` |
| P12 (ROUT1) | RXD | `rx_pin` | `GPIO5` | `GPIO17` |
| P16 (VCC) | VCC | | | |
| P15 (GND) | GND | | | |
## Installation
You can install this component with [ESPHome external components feature](https://esphome.io/components/external_components.html) like this:
```yaml
external_components:
- source: github://syssi/esphome-apc-ups@main
```
or just use the `esp32-example.yaml` as proof of concept:
```bash
# Install esphome
pip3 install esphome
# Clone this external component
git clone https://github.com/syssi/esphome-apc-ups.git
cd esphome-apc-ups
# Create a secrets.yaml containing some setup specific secrets
cat > secrets.yaml <