Skip to content

Instantly share code, notes, and snippets.

@dnoegel
Last active October 7, 2025 03:08
Show Gist options
  • Select an option

  • Save dnoegel/543c72ef722365a3934bbad0bb43e222 to your computer and use it in GitHub Desktop.

Select an option

Save dnoegel/543c72ef722365a3934bbad0bb43e222 to your computer and use it in GitHub Desktop.
Modbus Register für Sungrow Wechselrichter zum Import in Iobroker
_address name description unit type len factor offset formula role room cw isScale
4999 Device type code Geräte Typ-Code int8be 1 1 0 value false false
5000 Nominal Output Power Installierte Leistung Kw uint16be 1 0.1 0 value false false
5002 Daily Output Energy Eigene Energienutzung heute (PV & Akku) Kwh uint16be 1 0.1 0 value false false
5003 Total Output Energy Eigene Energienutzung gesamt (PV & Akku) Kwh uint32sw 2 0.1 0 value false false
5007 Inside Temperature Temperatur im Wechselrichter °C int16be 1 0.1 0 value false false
5010 MPPT 1 Voltage MPPT1 Spannung V uint16be 1 0.1 0 value false false
5011 MPPT 1 Current MPPT1 Strom A uint16be 1 0.1 0 value false false
5012 MPPT 2 Voltage MPPT2 Spannung V uint16be 1 0.1 0 value false false
5013 MPPT 2 Current MPPT2 Strom A uint16be 1 0.1 0 value false false
5016 Total DC Power PV-Leistung aktuell W uint32sw 2 1 0 value false false
5018 Spannung Ph A Spannung Phase A V uint16be 1 0.1 0 value false false
5019 Spannung Ph B Spannung Phase C V uint16be 1 0.1 0 value false false
5020 Spannung Ph C Spannung Phase C V uint16be 1 0.1 0 value false false
5032 Reactive Power Blindleistung VA® int32sw 2 0 value false false
5034 Power Factor Leistungsfaktor int16be 1 0.001 0 value false false
5035 Grid Frequency Netzfrequenz Hz uint16be 1 0.1 0 value false false
6226 Monthly PV energy yields January Monatlicher PV Energieertrag Januar Kwh uint16be 1 0.1 0 value false false
6227 Monthly PV energy yields February Monatlicher PV Energieertrag Februar Kwh uint16be 1 0.1 0 value false false
6228 Monthly PV energy yields March Monatlicher PV Energieertrag März Kwh uint16be 1 0.1 0 value false false
6229 Monthly PV energy yields April Monatlicher PV Energieertrag April Kwh uint16be 1 0.1 0 value false false
6230 Monthly PV energy yields May Monatlicher PV Energieertrag Mai Kwh uint16be 1 0.1 0 value false false
6231 Monthly PV energy yields June Monatlicher PV Energieertrag Juni Kwh uint16be 1 0.1 0 value false false
6232 Monthly PV energy yields July Monatlicher PV Energieertrag Juli Kwh uint16be 1 0.1 0 value false false
6233 Monthly PV energy yields August Monatlicher PV Energieertrag August Kwh uint16be 1 0.1 0 value false false
6234 Monthly PV energy yields September Monatlicher PV Energieertrag September Kwh uint16be 1 0.1 0 value false false
6235 Monthly PV energy yields October Monatlicher PV Energieertrag Oktober Kwh uint16be 1 0.1 0 value false false
6236 Monthly PV energy yields November Monatlicher PV Energieertrag November Kwh uint16be 1 0.1 0 value false false
6237 Monthly PV energy yields December Monatlicher PV Energieertrag Dezember Kwh uint16be 1 0.1 0 value false false
6416 Monthly direct energy consumption from PVJanuary Monatlicher Energieverbrauch von PV-Anlage im Januar Kwh uint16be 1 0.1 0 value false false
6417 Monthly direct energy consumption from PV February Monatlicher Energieverbrauch von PV-Anlage im Februar Kwh uint16be 1 0.1 0 value false false
6418 Monthly direct energy consumption from PV March Monatlicher Energieverbrauch von PV-Anlage im März Kwh uint16be 1 0.1 0 value false false
6419 Monthly direct energy consumption from PV April Monatlicher Energieverbrauch von PV-Anlage im April Kwh uint16be 1 0.1 0 value false false
6420 Monthly direct energy consumption from PV May Monatlicher Energieverbrauch von PV-Anlage im Mai Kwh uint16be 1 0.1 0 value false false
6421 Monthly direct energy consumption from PV June Monatlicher Energieverbrauch von PV-Anlage im Juni Kwh uint16be 1 0.1 0 value false false
6422 Monthly direct energy consumption from PV July Monatlicher Energieverbrauch von PV-Anlage im Juli Kwh uint16be 1 0.1 0 value false false
6423 Monthly direct energy consumption from PV August Monatlicher Energieverbrauch von PV-Anlage im August Kwh uint16be 1 0.1 0 value false false
6424 Monthly direct energy consumption from PV Septemper Monatlicher Energieverbrauch von PV-Anlage im September Kwh uint16be 1 0.1 0 value false false
6425 Monthly direct energy consumption from PV October Monatlicher Energieverbrauch von PV-Anlage im Oktober Kwh uint16be 1 0.1 0 value false false
6426 Monthly direct energy consumption from PV November Monatlicher Energieverbrauch von PV-Anlage im November Kwh uint16be 1 0.1 0 value false false
6427 Monthly direct energy consumption from PV december Monatlicher Energieverbrauch von PV-Anlage im Dezember Kwh uint16be 1 0.1 0 value false false
6595 Monthly export energy from PV January Monatlicher Energieexport aus PV-Anlage Januar Kwh uint16be 1 0.1 0 value false false
6596 Monthly export energy from PV February Monatlicher Energieexport aus PV-Anlage Februar Kwh uint16be 1 0.1 0 value false false
6597 Monthly export energy from PV March Monatlicher Energieexport aus PV-Anlage März Kwh uint16be 1 0.1 0 value false false
6598 Monthly export energy from PV April Monatlicher Energieexport aus PV-Anlage April Kwh uint16be 1 0.1 0 value false false
6599 Monthly export energy from PV May Monatlicher Energieexport aus PV-Anlage Mai Kwh uint16be 1 0.1 0 value false false
6600 Monthly export energy from PV June Monatlicher Energieexport aus PV-Anlage Juni Kwh uint16be 1 0.1 0 value false false
6601 Monthly export energy from PV July Monatlicher Energieexport aus PV-Anlage Juli Kwh uint16be 1 0.1 0 value false false
6602 Monthly export energy from PV August Monatlicher Energieexport aus PV-Anlage August Kwh uint16be 1 0.1 0 value false false
6603 Monthly export energy from PV September Monatlicher Energieexport aus PV-Anlage September Kwh uint16be 1 0.1 0 value false false
6604 Monthly export energy from PV October Monatlicher Energieexport aus PV-Anlage Oktober Kwh uint16be 1 0.1 0 value false false
6605 Monthly export energy from PV November Monatlicher Energieexport aus PV-Anlage November Kwh uint16be 1 0.1 0 value false false
6606 Monthly export energy from PV Dezember Monatlicher Energieexport aus PV-Anlage Dezember Kwh uint16be 1 0.1 0 value false false
12999 System State Systemstatus uint16be 1 1 0 value false false
13000 Running State Betriebsstatus uint16be 1 1 0 value false false
13001 Daily PV Generation PV-Stromerzeugung heute Kwh uint16be 1 0.1 0 value false false
13002 Total PV Generation PV-Stromerzeugung gesamt Kwh uint32sw 2 0.1 0 value false false
13004 Daily export energy from PV PV-Einspeise Energie heute Kwh uint16be 1 0.1 0 value false false
13005 Total export energy from PV PV-Einspeise Energie gesamt Kwh uint32sw 2 0.1 0 value false false
13007 Load power Wirkleistung gesamt W int32sw 2 1 0 value false false
13009 Export power Aktuelle Leistung am Übergabepunkt des Versorgungsnetzes W int32sw 2 1 0 value false false
13011 Daily battery charge energy from PV Energie in Speicher heute Kwh uint16be 1 0.1 0 value false false
13012 Total battery charge energy from PV Energie in Speicher gesamt Kwh uint32sw 2 0.1 0 value false false
13014 CO2-reduction CO2- Reduzierung Kg uint32sw 2 0.1 0 value false false
13016 Daily direct Energy Consumption Direkter Eigenverbrauch aus PV heute Kwh uint16be 1 0.1 0 value false false
13017 Total direct Energy Consumption Direkter Eigenverbrauch aus PV gesamt Kwh uint32sw 2 0.1 0 value false false
13019 Battery voltage Batteriespannung V uint16be 1 0.1 0 value false false
13020 Battery current Batteriestrom A uint16be 1 0.1 0 value false false
13021 Battery power Batterieladeleistung W int16be 1 1 0 value false false
13022 Battery level Batteriekapazität % uint16be 1 0.1 0 value false false
13023 Battery state of health Gesundheit der Batterie % uint16be 1 0.1 0 value false false
13024 Battery Temperature Batterietemperatur °C int16be 1 0.1 0 value false false
13025 Daily battery discharge Energy Tägliche Entladungsenergie der Batterie Kwh uint16be 1 0.1 0 value false false
13026 Total battery discharge Energy Gesamte Entladungsenergie der Batterie Kwh uint32sw 2 0.1 1 value false false
13028 Self-consumption of today Heutiger Anteil des Eigenverbrauches % uint16be 1 0.1 0 value false false
13029 Grid state Netzstatus int16be 1 0.1 0 value false false
13030 Phase A current Strom Phase A aktuell A uint16be 1 0.1 0 value false false
13031 Phase B current Strom Phase B aktuell A uint16be 1 0.1 0 value false false
13032 Phase C current Strom Phase C aktuell A uint16be 1 0.1 0 value false false
13033 Total active power Eigenverbrauch aktuell W int32sw 2 1 0 value false false
13035 Daily Import Energy Gekaufte Energie heute Kwh uint16be 1 0.1 0 value false false
13036 Total Import Energy Gekaufte Energie gesamt Kwh uint16be 1 0.1 0 value false false
13038 Battery Capacity Batterie-Kapazität Kwh uint16be 1 0.1 0 value false false
13039 Daily Charge Energy Batterie-Ladeenergie heute Kwh uint16be 1 0.1 0 value false false
13040 Total Charge Energy Batterie-Ladeenergie gesamt Kwh uint32sw 2 0.1 0 value false false
13044 Daily export energy Energie Netzeinspeisung heute Kwh uint16be 1 0.1 0 value false false
13045 Total export energy Energie Netzeinspeisung gesamt Kwh uint32sw 2 0.1 0 value false false
13049 Inverter alarm Inverter alarm uint32sw 2 1 0 value false false
13051 Grid-side fault Netzfehler uint32sw 2 1 0 value false false
13053 System fault 1 System Fehler 1 uint32sw 2 1 0 value false false
13055 System fault 2 System Fehler 2 uint32sw 2 1 0 value false false
13057 DC-side fault Fehler DC-Seitig uint32sw 2 1 0 value false false
13059 Permanent fault Permanenter Fehler uint32sw 2 1 0 value false false
13061 BDC-side fault BDC-side fault uint32sw 2 1 0 value false false
13063 BDC-side permanent fault BDC-side permanent fault uint32sw 2 1 0 value false false
13065 Battery fault Batterie Fehler uint32sw 2 1 0 value false false
13067 Battery alarm Battery Alarm uint32sw 2 1 0 value false false
13069 BMS alarm BMS Alarm uint32sw 2 1 0 value false false
13071 BMS protection BMS protection uint32sw 2 1 0 value false false
13073 BMS fault 1 BMS fault 1 uint32sw 2 1 0 value false false
13075 BMS fault 2 BMS fault 2 uint32sw 2 1 0 value false false
13077 BMS alarm 2 BMS alarm 2 uint32sw 2 1 0 value false false
@hessenkletterer
Copy link

@0xdefec71f

Hi, my battery is now installed and I am already testing. I can change the upper and lower limit of the battery. I can also see the chanages in the iSolarCloud App. But the inverter of sungrow will not limit the loading for example by 80%.

13057 1 Max SOC Max SOC % uint16be 1 0.1 0 value true false false false
13058 1 Min SOC Min SOC % uint16be 1 0.1 0 value true false false false

What am I doing wrong here?

The Batterie_EMS_Mode_Selection I set to 0 and
the Batterie_Forced_charge_discharge to "204"

@0xdefec71f
Copy link

@hessenkletterer

For me register 13057 works fine with your settings. But it could be the case, that your set upper limit is ignored, because the system needs to calibrate the new/whole battery after your installation. It does that from time to time, because LiFePo Batteries need to calculate the SOC from the taken energy and can not simply rely on the cell voltage as other lithium types. You can only see that in register 10743 (Battery1 SOC nominal), which shows the real SOC.

Register 13022 will only show you the battery SOC subtracted your limits. So if your max SOC is set to 80% and your (real nominal) battery SOC is 80%, then register 13022 will show you 100%. And this is also the value, which is always shown in the sungrow app. I don't know why sungrow did this, but it confuses a lot of people.

if it is not that, the problem may lie within Openhab.

@hessenkletterer
Copy link

@0xdefec71f

Thanks for your informations. But I will not get access to the register 10743:

image

@0xdefec71f
Copy link

10743 is not a holding register! It is input register with ID 200.
13057 is a holding register with ID 1.

@hessenkletterer
Copy link

Thank you. I changed now to this:

image

I also deactivated it for 4 hours and tried it again. But I will still get the failure info.

@hessenkletterer
Copy link

hessenkletterer commented May 24, 2025

Another question. I also do not find this 2 informations in the Register:

image

Right now I calculate it very complicated. But I want the right informations directly from Sungrow Modbus Binding

  1. Loading or Unloading of the battery in W and
    I used 13021. But this register will show me something with 65000 W if I load or stoped the battery loading. Unloading is fine.

  2. Only the power from the panels without the power from the battery

@0xdefec71f
Copy link

@hessenkletterer again, i cannot help you with OpenHAB. Maybe it's the configuration, maybe your inverter or battery. With id 200 you are talking directly with the battery through the inverter. That's why only sungrow batteries are compatible with id 200.

Also this could be a reason:
image
Try to delete all registers, you do not need. The most interesting values could be cut down to about 10 or 20 registers. If there is an error message, read it!

  1. is 13021, but it looks like you disconfigured the datatype. this is a signed register: int16be
  2. is 5016

@kshala
Copy link

kshala commented May 25, 2025

@hessenkletterer (disclaimer I use home assistant and never seen your tools. Below tips are pure speculation and deductions). Simply use your inverter modbus and don’t attempt for the battery directly.

  1. Check on Ethernet. Use the back ethernet port. It allows to access more registers. Don’t use dongle WiFi and don’t use the dongle ethernet.
  2. Check the ip. If you did connect to the back ethernet, your dhcp (I guess your FRITZ!Box) did assign an ip to it.
  3. Check your parent bridge. Use above ip and set modbus device to "1" to talk to your inverter.
  4. Set start to 13022 which is the register of battery level/soc.
  5. Set length to 1. tldr: Sungrow uses word register lengths; 2 bytes big endian per register.

this would be analog to any other register. However, I recommend home assistant or iobroker. There’s just more support here on GitHub.

@manny4566
Copy link

hi,
do someone knowswhy 13017 and all other "Monthly" register not works anymore with FW > 95.01 ?
inverter = SH10RT-V112

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment