ESPHome example configuration to monitor and control a pipsolar inverter via RS232
Kudos to @andreashergert1984 for the great work!
- PIP4048 compatible PV Inverter
- ESPHome 2021.8.0 or higher.
- One half of an ethernet cable with RJ45 connector
- RS232-to-TTL module (
MAX3232CSE
f.e.) - Generic ESP32 or ESP8266 board
RS232 TTL
┌─────────┐ ┌──────────┐ ┌─────────┐
│ │ │ │<----- RX ----->│ │
│ │<---- TX ---->│ RS232 │<----- TX ----->│ ESP32/ │
│ PIP │<---- RX ---->│ to TTL │<----- GND ---->│ ESP8266 │
│ │<---- GND --->│ module │<-- 3.3V VCC -->│ │
│ │ └──────────┘ │ │
│ │ ┌──────────┐ │ │
│ │----- 12V --> │ Buck │--- 3.3V VCC -->│ │
└─────────┘ │ Converter│ │ │
└──────────┘ └─────────┘
Pin | Purpose | RS232-to-TTL pin | Color T-568B |
---|---|---|---|
1 | TX | TX ← | White-Orange |
2 | RX | RX → | Orange |
3 | |||
4 | VCC 12V (?) | - | Blue |
5 | |||
6 | |||
7 | VCC 12V | - | White-Brown |
8 | GND | GND | Brown |
Please be aware of the different RJ45 pinout colors (T-568A vs. T-568B).
The inverter provides +12V on pin 4 or 7 depending on the model. You can use a cheap DC-DC converter to power the ESP with 3.3V.
The source for the pinout is here.
Use the esp32-example.yaml
/ esp8266-example.yaml
as proof of concept:
# Install esphome
pip3 install esphome
# Clone this external component
git clone https://github.com/syssi/esphome-pipsolar.git
cd esphome-pipsolar
# Create a secret.yaml containing some setup specific secrets
cat > secrets.yaml <<EOF
mqtt_host: MY_MQTT_HOST
mqtt_username: MY_MQTT_USERNAME
mqtt_password: MY_MQTT_PASSWORD
wifi_ssid: MY_WIFI_SSID
wifi_password: MY_WIFI_PASSWORD
EOF
# Validate the configuration, create a binary, upload it, and start logs
# If you use a esp8266 run the esp8266-examle.yaml
esphome run esp32-example.yaml
Take a look at the official documentation of the component for additional details.
- If you configure a lot of the possible sensors etc. it could be that you run out of memory (on esp32). If you configure nearly all sensors etc. you run in a stack-size issue. In this case you have to increase stack size: esphome/issues#855