Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 2 months 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-08T11:28:46.000Z (5 months ago)
- Last Synced: 2024-10-29T22:53:50.762Z (2 months ago)
- Topics: apc, esphome, esphome-component, hacktoberfest, ups
- Language: C++
- Homepage:
- Size: 61.5 KB
- Stars: 35
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# esphome-apc-ups
![GitHub actions](https://github.com/syssi/esphome-apc-ups/actions/workflows/ci.yaml/badge.svg)
![GitHub stars](https://img.shields.io/github/stars/syssi/esphome-apc-ups)
![GitHub forks](https://img.shields.io/github/forks/syssi/esphome-apc-ups)
![GitHub watchers](https://img.shields.io/github/watchers/syssi/esphome-apc-ups)
[!["Buy Me A Coffee"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](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 <