GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rjpearce/sofar2mqtt-python: 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

BranchesTags
Open more actions menu

Latest commit

 

History

179 Commits
179 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ha
ha
 
 
img
img
 
 
systemd
systemd
 
 
.gitignore
.gitignore
 
 
99-usb-serial.rules
99-usb-serial.rules
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
SOFAR-HYD-3PH-AND-G3.json
SOFAR-HYD-3PH-AND-G3.json
 
 
SOFAR-HYD-ES-AND-ME3000-SP.json
SOFAR-HYD-ES-AND-ME3000-SP.json
 
 
generate-ha-cfg.py
generate-ha-cfg.py
 
 
requirements.txt
requirements.txt
 
 
sofar2mqtt-v2.py
sofar2mqtt-v2.py
 
 

Repository files navigation

Sofar2MQTT - Python

Build Docker Image CodeQL

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 (preferred) or Python script .

View the documentation

Release notes

3.0.1

  • Implemented MQTT auto discovery for home assistant - no more manual config!
  • Added a new refresh option for each register allowing some registers to be read more regularly (fresher) than other that are less important (i.e serial number)
  • Added registers for serial number, software version, hardware version.
  • The script now retains a local dict of data which is updated after reading registers for this iteration (based on refresh)
  • After an iteration the entire dict (JSON) is sent to a new topic sofar/state_all'
  • Added a new option for LEGACY_PUBLISH to continue to send messages individually in addition to sofar/state_all.
  • Introduce Signal handling to ensure graceful exit

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:

  • sofar-hyd-ep.json
  • sofar-me-3000.json

Please do feel free to contribute changes and improvements.

Example usage

Watch the video Click here to watch the video

NOTE: The slightly weird behaviour of desired power when in Self use, it is probably best to only change it when you are in Passive mode.

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!

Credits

Based on a script originally created by Matt Nichols in 2021. Thank you to Andre Wagner to his example write python code. Thank you everyone on the Sofar Solar Inverter - Remote Control & Smart Home Integration Facebook group.

Support

You can ping me directly on here or the awesome Sofar Solar Inverter - Remote Control & Smart Home Integration Facebook group

Other interesting projects

  • Sofar2Mqtt - Using an ESP32 device to read from the inverter and send to MQTT
  • M5Stack Core2 MQTT Solar Display - DIY Solar display to show MQTT data

About

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

Topics

home-assistantmqttpython3rs485sofarsofar-hydsofar-ktl-xsofarsolar

Resources

Readme
Activity

Stars

5 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.