Have you tried a shorter scanning interval fore some registers. Are there some experiences?
currently I hard-coded the modbus scan_intervals:
10s for power / voltage and current values
60s for battery parameters, which can be set via GUI
600s for values that don’t change frequently, e.g. serial number (should in fact never change), but also energy values (total daily generation)
the values can be decreased, but I don’t see a good benefit to poll the power values faster than every 10seconds.
Do you see some benefits for - lets say 5s?
Why did you define the template sensors to be positive or negative depending of inverter state (e.g. sg_battery_charging_power). For this sensor comment tells it will be 0 when discharging. Maybe I am missing something?
I recently changed the behaviours for these values:
“Battery Charging Power” # positive value if charging else zero
“Battery Discharging Power” # positive value if discharging else zero
they could be negative before, but that confused me sometimes
I have to admit, that several decisions are more or less random. But I am very open for disussions and change requests !
I think the most intervals are perfect. Maybe I will try if I would like shorter intervals for power sensors. Maybe its because everything is new. And so I look very often in my dashboard.
I have seen this also for my backup power sensors. They also sometimes have negative values. Likely a random measurement error when no load is applied.
My questions are only for understanding and to get some background.
Your work is a perfect point to start with integration of Sungrow inverters into HA. The idea to create a package is a very good idea. And easy to use.
I think own adjustments and optimizations are left to each individually.
Hi and thanks for this nice tool. I really like it and can skip solaranzeige and such tools now. In combination with water and gasmeter I have a very nice summary over consumption and gain. Two things maybe: I own a SH8.0RT which is recognized by solaranzeige using the very same id code as in your yaml. However, I see just “unknown device code”. Any idea, what is going wrong? I also use eth connection on the dedicated LAN port and everything else is working fine. And one other thing might be easily achievable: I would like to see power consumption for all 3 phases as stacked plot. would that be an improvement also for other users? Thanks for considering and also for the nice work so far.
Thanks for the update. Device code works now as expected, however, I have an issue with exported power now. This is stated as not available. Is this entity deprecated now or is something wrong with my configuration?
Hi mkai,
Thanks for your work on this. It made the integration of a SH10-rt so easy today.
But for some reason the battery power on our device never becomes negative.
I fixed it locally by evaluating the inverter state to check if it is charging or not.
Not sure if this is firmware version dependent or not, but here is my code.
- name: "Battery charging power" # positive if charging else zero
unique_id: sg_battery_charging_power
unit_of_measurement: W
device_class: power
state: >-
{% if is_state('sensor.battery_power', 'unavailable') %}
unavailable
{% elif states('sensor.running_state')|int |bitwise_and(2) %}
{{ states('sensor.battery_power') }}
{% else %}
0
{% endif %}
- name: "Battery discharging power" # positive if discharging else zero
unique_id: sg_battery_discharging_power
unit_of_measurement: W
device_class: power
state: >-
{% if is_state('sensor.battery_power', 'unavailable') %}
unavailable
{% elif states('sensor.running_state')|int |bitwise_and(4) %}
{{ states('sensor.battery_power') }}
{% else %}
0
{% endif %}
Hi, export power seems the only value which is not shown. Import power works as well. I believe, it did work before, but I’m not 100% sure. Did you change something here? Otherwise I would try out to jump one version down again?
Hi, for me it is still not working. Export Power is the only sensor not available. Everything else is working fine, it seems. Is there a way to test it somehow?
What is the ouput value of the sensor “running state”
Running State is used to determine, of the PV is generating, if battery is charged / discharged and if power is imported or exported. If this value is not working correctly, export power is consequently not working, too.
And one other thing might be easily achievable: I would like to see power consumption for all 3 phases as stacked plot. would that be an improvement also for other users? Thanks for considering and also for the nice work so far.
Do you mean something like this?
raw dashboard code:
chart_type: line
period: hour
days_to_show: 1
type: statistics-graph
entities:
- sensor.meter_phase_a_active_power
- sensor.meter_phase_b_active_power
- sensor.meter_phase_c_active_power
stat_types:
- mean