Skip to content
Richard Pearce edited this page Feb 25, 2024 · 3 revisions

Overview

This project provides an integration between Sofar inverters over RS485 and MQTT using Python

It allows you to read and write data to Sofar inverters using a prebuilt Docker image or Python script.

  graph TD;
      Inverter["Sofar Inverter"]--"USB:RS485/modbus (read register)"-->Pi["Raspberry Pi"]
      Pi--"1833/tcp (publish: sofar/)"-->MQTT
      MQTT--"1833/tcp (subcribe: sofar/rw)"-->Pi
      Pi--"USB:RS485/modbus (write register)"-->Inverter;
Loading

Inverter Compatability

This software is currently compatible with:

  • Sofar ME3000
  • Sofar HYD 3~6 EP

Note: It has only been tested on EP inverters.

There is no reason it cannot work with other Sofar inverters, the code and data have been seperately deliberately to support this you just need to provide the correct registers, see the following files:

Please do feel free to contribute changes and improvements.

Requirements

  1. Docker / RaspberryPi / other nix device with Python 3.x installed.
  2. RS485 to USB adapter
  3. Existing MQTT server

If you want to do the same with ESP32 checkout the other Sofar2Mqtt project

Home Assistant auto-discovery

The gateway supports Home Assistant MQTT discovery. It publishes configuration information automatically, the inverter will appears as an new MQTT device. No more manual configuration in Home Assistant!