Comments (20)
You have to do 3 steps for this to get it working:
- Set the desired charging power
set_sg_forced_charge_discharge_power
- Select
Forced charge
fromset_sg_battery_forced_charge_discharge_cmd
- Select
Forced mode
fromset_sg_ems_mode
And then, after a short while, the inverter should begin charging the battery. Could take a little while before it starts.
If this doesn't work try to force charge inside the iSolarCloud app.
from sungrow-shx-inverter-modbus-home-assistant.
I did try that, but it just doesn't seem to register correctly. I just want it working inside Home Assistant. When I change the power, the register battery_forced_charge_discharge_power still reports 3900W. Even if I change it to something completely different.
from sungrow-shx-inverter-modbus-home-assistant.
What does the GUI say, if you change the value and wait for one minute or so?
The modbus register behind is not updated very frequently. Unfortunately the automation can not retrigger an immediate modbus register update. So you select a new value and need to wait for a certain amoiunt of time, until the next refresh of the modbus values
from sungrow-shx-inverter-modbus-home-assistant.
If I change the forced charge discharge power, it takes a few seconds and then it updates sensor.battery_forced_charge_discharge_power. The same thing applies for the other two registers. I change it and the corresponding sensor also changes. The problem is, that it doesn't do anything. The battery doesn't draw any power from the grid. If I change it in the ISolarCloud app, it works. I just want it working in Home Assistant, so that I can disconnect it from the cloud and only use the WiFi Dongle for Firmware-Updates.
from sungrow-shx-inverter-modbus-home-assistant.
Whoops, restarted my inverter and forgot to turn on the breaker to the grid. Just turned it on and will try again in a few minutes.
from sungrow-shx-inverter-modbus-home-assistant.
Takes a few minutes to start, but it works now. I don't know what was wrong this morning, but I just updated to the newest code and it somehow works now.
from sungrow-shx-inverter-modbus-home-assistant.
I noticed today that battery_forced_charge_discharge_power is also respected when discharging in self-consumption mode.
Maybe someone could check if that is true. In that case it would be better to rename the sensor.
from sungrow-shx-inverter-modbus-home-assistant.
Would love to try it, but I don't exactly unterstand what you mean. Could you elaborate a bit more on what exactly happens?
from sungrow-shx-inverter-modbus-home-assistant.
just checked this and it works for me. I can limit the battery discharging power with "set_sg_battery_max_discharge_power"
Also I could successfully limit the forced charge discharge power
Can you double check? It is easy to mix them up, because they look pretty much alike:
-
input_number.set_sg_battery_max_discharge_power
--> set_sg_battery_max_discharge_power is providing the value for address: 33047 # reg 33048 -
input_number.set_sg_battery_max_charge_power
--> set_sg_battery_max_charge_power is providing the value for address: 33046# reg 33047 -
input_number.set_sg_forced_charge_discharge_power
-->set_sg_forced_charge_discharge_power is providing the value for address: 13051 # reg 13052
from sungrow-shx-inverter-modbus-home-assistant.
Yup. Checked it. I can limit the forced charge and discharge power using set_sg_forced_charge_discharge_power. That is very accurate. With set_sg_battery_max_discharge_power it's always a bit under. If I set it to 200W it only discharges with about 112W. I think that's normal, because I've seen it in the Local Access of the WiNet-S Module. If the BMS limits the battery current to 6A it only takes about 5.4A. set_sg_battery_max_charge_power it's pretty accurate. Just 4-6 watts over what I've set. I set 200W max charge power and it takes about 204-206W.
from sungrow-shx-inverter-modbus-home-assistant.
Checked registers:
- sg_battery_max_charge_power has value 10.000 W
- sg_battery_max_discharge_power has value 10.000 W
- sg_forced_charge_discharge_power has value 1.000 W
Load on inverter is > 5.000 W. Nearly exactly 1.000 W were taken from the battery and the rest is coming from grid. But I will double check again if my battery is charged again. Actually no sun here in germany.
Blue is battery discharging power, green is power taken from grid. EMS setting is Self-Consumption mode (Default).
Sorry. Y-Axis is missing in image. But the maximum for blue line is at 1.000 W.
from sungrow-shx-inverter-modbus-home-assistant.
For me, if I set the EMS-Mode to Self-Consumption the forced charge discharge doesn't do anything. Only the max charge/discharge do something in self-consumption mode. What I can see is that your battery discharge is limited by the forced charge discharge power? I set mine to zero and I am still using my battery.
Also, there really isn't any sun in germany where I live. I generated 2.5kWh today. I've got 12kWp on the roof. The fact that another part of the roof is blocking the sun in the morning also doesn't help. In the summer that isn't really an issue, because the sun rises pretty quickly, but during the winter it's pretty much always pretty low...
from sungrow-shx-inverter-modbus-home-assistant.
Checked registers:
- sg_battery_max_charge_power has value 10.000 W
- sg_battery_max_discharge_power has value 10.000 W
- sg_forced_charge_discharge_power has value 1.000 W
Load on inverter is > 5.000 W. Nearly exactly 1.000 W were taken from the battery and the rest is coming from grid. But I will double check again if my battery is charged again. Actually no sun here in germany.
Blue is battery discharging power, green is power taken from grid. EMS setting is Self-Consumption mode (Default).
Sorry. Y-Axis is missing in image. But the maximum for blue line is at 1.000 W.
Could you try other values for discharge power?
In your screenshot it looks like there is 1/10 of the 10.000 W discharge power being used.
In case you have a inverter model that interprets the discharge power slightly different (factor 10), that could explain that behaviour
Whats your inverter model?
from sungrow-shx-inverter-modbus-home-assistant.
Yes. I will try some other values set the charge and discharge values to some other value than the default 10.000 W.
But for the next day the forecast says no sun for the place where I live π«
Maybe it could also be an EMS function. Limit the discharging power due to battery SoC or other conditions.
Nothing important or a bug. Only a quick observation yesterday.
So I am very happy with the configuration for the Sungrow inverter. Great work. In the next few weeks I have to learn a lot about the inverter and how it works.
from sungrow-shx-inverter-modbus-home-assistant.
No sun here in Bielefeld, germany , too :/
I used the forced charge feature for an hour to have 10% SoC test the charge / discharge power settings.
from sungrow-shx-inverter-modbus-home-assistant.
Maybe it could also be an EMS function. Limit the discharging power due to battery SoC or other conditions.
I can say, that the BMS of my Sungrow SBR128 limits the current in certain conditions, for example when the battery is almost empty, it's too hot or too cold.
When it's at about 95% it also limits the charging current.
from sungrow-shx-inverter-modbus-home-assistant.
You have to do 3 steps for this to get it working:
- Set the desired charging power
set_sg_forced_charge_discharge_power
- Select
Forced charge
fromset_sg_battery_forced_charge_discharge_cmd
- Select
Forced mode
fromset_sg_ems_mode
And then, after a short while, the inverter should begin charging the battery. Could take a little while before it starts.
This works perfectly for me (Home Assistant 2023.1.7; inverter integration last update: 2023-01-20; SH10RT-v112). I like your work a lot and I enjoy reading your modbus_sungrow.yaml ;) Thanks for that!
Although I like to change the values of set_sg_ems_mode
and set_sg_battery_forced_charge_discharge_cmd
manually in the GUI I would love an automation for that action.
My first usecase for that action will be the 'sensor.electricity_price_home' of my tibber integration (dynamic electricity tarif) as a trigger to charge my battery (if price <x β¬ then charge) . Later then there should be conditions like pv-production forecast because usually the electricity price is cheaper at night than at day. But in the long run I don't want to force charging if the pv-production will be more than my consumption incl. saved electricity.
Can you help me with that? How should I define the action in that automation?
from sungrow-shx-inverter-modbus-home-assistant.
hi GrandAmmor,
this would be a separate issue here... sorry, but I am loosing the overview of open, closable issues and discussion.
You can use the automations at the end of the yaml file as a blueprint. If you are not familiar with YAML, you can also use the settings --> automation GUI.
As Action, you need to select "Call a service", then "Modbus:Write register" and use the values from the yaml.
If you need more specific help, please open a separate issue. There are some friendly guys around here who are glad to help
from sungrow-shx-inverter-modbus-home-assistant.
Thx for your fast reply! I'll keep on trying, but have to open a separate issue also, I guess ;)
from sungrow-shx-inverter-modbus-home-assistant.
Load on inverter is > 5.000 W. Nearly exactly 1.000 W were taken from the battery and the rest is coming from grid. But I will double check again if my battery is charged again. Actually no sun here in germany.
Found the reason for this behavior. While I am experimenting with my inverter and iSolarCloud a played with Active Power Limit
. Have set it to a value of 10%. And it seems, this is also respected when discharging the battery π
. So has nothing to do with the modus register settings.
from sungrow-shx-inverter-modbus-home-assistant.
Related Issues (20)
- 2 sensors not available in the tesla dashbaord by louis HOT 1
- Zwei Wechselrichter. Daten unterschiedlich in HA und iSolarCloud | Two inverters. Different data in HA and iSolarCloud HOT 18
- Strange outage HOT 1
- Force charge and all other modbus write registers don't work HOT 1
- Retrieved data through modbus not containing data of both inverters HOT 1
- Battery Capacity wrong HOT 9
- Battery dis/charging power sensors don't work. HOT 5
- Load 1 ON/OFF Mode Switch for the DO-port holding register 130011 or more complex DO-Configuration and Load Control Mode by using registers 13001-13016 HOT 3
- Entities are no longer available or jumping between available and unavailable HOT 28
- NO VALUE after Home Assistant >= 2024.04 HOT 68
- Second Inverter ist changing between unavailable and avalaible every few seconds
- Undocumented Holding Registers destroys SH10RT Config HOT 6
- Yearly Export jumps about 1100kWh on May 1st HOT 1
- Modbus no longer works HOT 7
- Some values ββare missing after updating to 2024.5.2 HOT 2
- Battery charging/discharging power using wrong registers? HOT 1
- sungrow update no battery forced mode HOT 2
- total_dc_power over a million watts HOT 1
- Self-consume mode not triggering HOT 2
- 16bit integer wraparound error on Single phase hybrid inverters battery current sensor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sungrow-shx-inverter-modbus-home-assistant.