After adding the Sungrow_Inverter_Battery_Current as item and oberving a few day, I can not confirm, that it has a sign. Like the power, the value is always positive.
So second option will not work out
Here are the icons:
Hey Simon,
now that i’ve my battery too i’ve updated the widget as follows:
- battery is charging, if battery power is greater than zero and load is lower than pv-generation
- battery is discharging, if battery power is greater than zero and load is greater than pv-generation
- battery feeds into grid, if battery power is greater than load
This seems to work fine and reflects the state the iSolarCloud shows too.
May you have a try if this fits your requirements too?
BR
Sönke
Hey,
i’ve created two widgets for Energy production and energy usage.
There is a sizing issue (see Chart sizing problem) but basically they work fine:
uid: iSolarCloud_EnergyProduction
tags:
- card
props:
parameters:
- context: item
default: Sungrow_Inverter_Daily_Direct_Energy_Consumption
description: Daily Direct Energy Consumption
name: directEnergyConsumption
required: true
type: TEXT
- context: item
default: Sungrow_Inverter_Daily_Export_Energy
description: Daily Export Energy
name: exportEnergy
required: true
type: TEXT
- context: item
default: Sungrow_Inverter_Daily_Charge_Energy
description: Battery Charge Energy
name: batteryChargeEnergy
required: true
type: TEXT
timestamp: Jul 16, 2023, 1:32:29 PM
component: f7-card
config:
title: Stromproduktion heute
slots:
default:
- component: f7-card-content
config:
style:
padding: 20px
slots:
default:
- component: oh-chart
slots:
series:
- component: oh-data-series
config:
renderer: svg
data:
- itemStyle:
color: rgb(245, 151, 69)
name: Eigenverbrauch
value: =Number.parseFloat(items[props.directEnergyConsumption].state)
- itemStyle:
color: rgb(64, 194, 70)
name: Batterieladung
value: =Number.parseFloat(items[props.batteryChargeEnergy].state)
- itemStyle:
color: rgb(122, 198, 2459)
name: Einspeisung
value: =Number.parseFloat(items[props.exportEnergy].state)
itemStyle:
borderColor: '=themeOptions.dark === "dark" ? "black" : "white"'
borderRadius: 10
borderWidth: 2
label:
formatter: = "{b}\n{c} kWh\n{d}%"
radius:
- 40%
- 50%
startAngle: 45
type: pie
uid: iSolarCloud_EnergyUsage
tags:
- card
props:
parameters:
- context: item
default: Sungrow_Inverter_Daily_Import_Energy
label: Daily Import Energy
name: importEnergy
required: true
type: TEXT
- context: item
default: Sungrow_Inverter_Daily_Direct_Energy_Consumption
description: Daily Direct Energy Consumption
name: directEnergyConsumption
required: true
type: TEXT
- context: item
default: Sungrow_Inverter_Daily_Battery_Discharge_Energy
description: Battery Discharge Energy
name: batteryDischargeEnergy
required: true
type: TEXT
timestamp: Jul 16, 2023, 1:33:25 PM
component: f7-card
config:
title: Stromverbrauch heute
slots:
default:
- component: f7-card-content
config:
style:
padding-top: 20px
slots:
default:
- component: oh-chart
slots:
series:
- component: oh-data-series
config:
data:
- itemStyle:
color: rgb(245, 151, 69)
name: Direktverbrauch
value: =Number.parseFloat(items[props.directEnergyConsumption].state)
- itemStyle:
color: rgb(64, 194, 70)
name: Batterie
value: =Number.parseFloat(items[props.batteryDischargeEnergy].state)
- itemStyle:
color: rgb(122, 198, 2459)
name: Netzbezug
value: =Number.parseFloat(items[props.importEnergy].state)
itemStyle:
borderColor: '=themeOptions.dark === "dark" ? "black" : "white"'
borderRadius: 10
borderWidth: 2
label:
formatter: = "{b}\n{c} kWh\n{d}%"
width: 90
radius:
- 40%
- 50%
startAngle: 45
type: pie
Feedback is welcome!
- Sönke
Hi Sönke,
you logic seems to be a viable workaround, when it comes to showing the current charging-state, even when I’m not sure, if it correctly handles all edge cases it should be correct most of the times. But I for example already saw Situations, where the battery was charged from the grid (before my electrician updated the firmware to fix it)
But it would be still nice, if there would be a way to modify the actual values beeing propagated to the item, as this would help when p.e. drawing a graph with the battery-state over time. See this example:
I guess, when taking your rules as basis, it would be possible to write a transformation-rule for that. Will try to have a look at this in the next day, if I find some time and tell you, if this works
Hey,
i’ve checked around other forums about this modbus issues for sungrow inverters and many said, that they only can read modbus data via the internal lan port of the inverter, but not with via the Winet-S Stick attached to the inverter. So as i’m using the Winet-S dongle (which is working fine expecting some values that can’t be read) i’ve attached an additional lan cable to the local LAN port of the inverter and tried to read some data (with QModbusMaster). I’m able to connect to the device but can’t read any of the registers specified. So my question is: are you using the Winet-S Dongle’s Modbus or the direct one?
Thanks.
Sönke
Hey,
I’m using the internal LAN port.
Hello, is it possible to use this addon for an sg Converter?
Hey ~Backbe,
if sg stands for sungrow - that’s just what this binding is developed for.
Which converter model do you have?
BR Sönke
Sorry no i mean a sg8.0rt…
Hey,
unfortunately sungrow has two protocol specifications:
- Communication Protocol of Residential Hybrid Inverter (Models: SH*)
- Communication Protocol of PV Grid-Connected String Inverters (Models SG*)
They have some modbus registers in common, but there are some differences. First i’ve implemented the second one (because i didn’t know that there is another one) and when reading registers that dosn’t exists modbus throws an exception so while debugging i’ve discovered the second one.
Now that i’ve a SH10RT i’ve chosen to implemented the first one and discarding the other part.
So sorry your device will not work (for now).
It should be possible to add some more logik into the binding (first read the meta data and extract the device code and then decide which registers to read), but i’m not yet working on this (as it is difficult because i can’t test it myself).
BR
Sönke
Hi Sönke,
sry for the late answer, I totally missed that post. I am using the direct LAN port. My plumber installed both - a LAN connection on the direct port for modbus and the wifi stick.
My understanding was, that the direct connection is only used for modbus, while the wifinet is used to get at the Web-UI for configuration. This is why I am connecting against the IP of the LAN-connection, not against the IP connected via Wifi.
KR,
Simon
Hey there, how to install this binding?
- First step download the jar file
- Second step: https://www.openhab.org/docs/configuration/addons.html#through-manually-provided-add-ons
Hey I’ve read here that modbus over wifi should be possible since 2022. Sadly there is no source posted.
Any experience if it works and how to setup?
Guten Abend,
Wie bekomme ich so eine schöne Übersicht mit den Werten hin?
Ich muss immer die Channels linken und ein Item erstellen, damit ich die Werte sehe.
Danke für die Hilfe.
(Sorry dass ich auf deutsch schreibe, aber ich denke Ihr versteht mich )
Ja, aber wenn man gratis Unterstützung von Anderen möchte, dann sollte man sich schon an die Regeln halten, die für alle gelten.
Ok alles klar.
Danke.
Dann frag ich Tante Google.
Could you share a sample thing configuration? I don’t get the nested bridge/thing configuration of ModBus, TCP and Sungrow-Inverter.
Looking forward to connect my SH10 and BYD batteries
Thank you a lot!