leodesigner / powmr_comm

PowMr Inverter serial communication protocol reverse engineering
MIT License
50 stars 6 forks source link
esp8266-arduino inverter iot modbus mqtt powmr solar wifi

PowMr Inverter serial communication protocol

Would you like to monitor and control your PowMr solar hybrid inverter via MQTT?

Here is the reverse engineering of the communication protocol. The infomation might be incomplete, feel free to contribute. All communications has been sniffed out of the original Wifi dongle.

Compatibility

Tested with:

However, also other models that are supported by the WIFI-VM device should work:

Communication

The device communicates with RS232 modbus protocol at 2400 baud (1 stop bit, no parity control). PowMr device slave id is 5.

RJ45 connector is located on the left side of the inverter and it has the following pinout:

Modbus Holding registers to control inverter:

Original WiFi dongle sends two requests every few seconds to monitor inverter state.

Please refer wifi bridge code for state registers description.

ESP8266 MQTT Modbus RS232 bridge

The code in this repo providing a wifi MQTT-modbus bridge. It compiles in Platformio. The hardware part is simple esp8266 module with RS232 level converter attached to the

define SS_TX_PIN D8 // GPIO15

define SS_RX_PIN D7 // GPIO13

It's possible to read and write modbus registers. Also it constatly pools data from inverter and publishes varios state variables like battery voltage, pv power, etc. You can store that data later in influxdb/postgres and visualize in Grafana. The controller part of the code responsible for keeping battery voltage at the predefined value. (to prolong li-ion battery life)

Important note: during operation inverter produces a lot of RF noise. To make communnication with inverter more stable you might want to attach small capactor to RX pin of the ESP8266 (GPIO13). It helps to filter out RF noise.

Additional references:

https://www.dessmonitor.com/ main website for data logging (official PowMr dongle)

https://powmr.com/ PowMr website with manuals

https://github.com/syssi/esphome-smg-ii ESPHome project to monitor and control a ISolar/EASUN SMG II inverter via RS232

https://github.com/odya/esphome-powmr-hybrid-inverter ESPHome config for various PowMr Hybrid Inverter models.