A Home Assistant custom integration for Sofar Solar inverters via Modbus TCP.
- Sofar HYD series (hybrid inverters)
- Sofar KTL series (string inverters)
- Sofar ME series (storage inverters)
- Other Sofar inverters with Modbus TCP support
- Real-time solar production monitoring (PV power, voltage, current)
- Battery status (SoC, charge/discharge power, voltage)
- Grid import/export power monitoring
- Load consumption tracking
- Number entities for battery charge/discharge limits
- Select entities for inverter operating mode
- Button entities for inverter commands
- Configurable via the Home Assistant UI (config flow)
- Open HACS in Home Assistant
- Click the three dots menu → Custom repositories
- Add
https://github.com/LucMathlin/ha-sofar-inverterwith category Integration - Search for "Sofar Inverter" and install
- Restart Home Assistant
- Copy
custom_components/sofar_inverter/to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for "Sofar Inverter"
- Enter the Modbus TCP host, port, and slave ID of your inverter
- Configure polling interval as needed
- Modbus TCP connectivity to the inverter (via built-in WiFi module or RS485-to-TCP gateway)
pymodbus>=3.11.2(installed automatically)