Comments (18)
This works with my two SH10RT! I've completed the 2nd yaml, see below.
I have an additional question: when I try to write a modbus register like this, it's not working. Do you have any idea? Actually the "Set battery SoC reserve" doesn't work either. Perhaps the same problem?
alias: Battery-SoC 17
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.battery_level
above: 90
condition: []
action:
- service: modbus.write_register
data:
address: 13100
hub: SungrowSHx
slave: 2
value: 17
mode: single
from sungrow-shx-inverter-modbus-home-assistant.
Since the last update i get no data from my second inverter... Does anybody have an idea?
from sungrow-shx-inverter-modbus-home-assistant.
Good question. I will be installing a second one soon.
Can we keep this in English please.
from sungrow-shx-inverter-modbus-home-assistant.
hey,
that should work. See #16
Recently, one guy in the home assistant forum confirmed that he got it working:
https://community.home-assistant.io/t/sungrow-sh10-rt-modbus-integration/361356/35
from sungrow-shx-inverter-modbus-home-assistant.
Unfortunately, the method described in #16 does not work. i tried to avoid duplicate names by using the designation 2 or slave. but dying didn't help.
modbus_sungrow2.yaml.txt
from sungrow-shx-inverter-modbus-home-assistant.
copied this together with just 2 sensors, but I obviously cannot check without a second inverter, so I need your help here :)
When this works, the next step is more or less copy / paste for the other sensors
- copy the file (modbus_sungrow_inv2.yaml) next to the existing file (modbus_sungrow.yaml) in the integrations folder
- update your secrets.yaml accordingly (see the comments of modbus_sungrow_inv2.yaml
- Check and restart HA
from sungrow-shx-inverter-modbus-home-assistant.
great to know that this is working.
I will put this on the "ToDo" list, but final integration and documentation will take some time.
If you want to write to modbus register 13100 (reserved soc for backup), you need to decrement the address to 13099
copied from modbus_sungrow.yaml (arount line 1470)
alias: "sungrow inverter update reserved soc for backup"
description: "Updates reserved SoC for backup register"
trigger:
- platform: state
entity_id:
- input_number.set_sg_reserved_soc_for_backup
condition: []
action:
- service: modbus.write_register
data_template:
hub: SungrowSHx
slave: !secret sungrow_modbus_slave
address: 13099 # reg 13100
value: "{{ states('input_number.set_sg_reserved_soc_for_backup') | int}}"
mode: single```
Does this help?
from sungrow-shx-inverter-modbus-home-assistant.
Yes, it works! Thanks!!
But for example, if I enter value: "70" the Battery SoC reserve (sensor.battery_soc_reserve) displays 7%, with "90" this changes to 9%, values above 100 have no effect. Where is my mistake?
from sungrow-shx-inverter-modbus-home-assistant.
This is known, I haven't seen it..
- name: Battery SoC reserve 2
unique_id: sg_battery_soc_reserve_2
slave: !secret sungrow_modbus_slave_inv2
address: 13099 # reg 13100
input_type: holding
count: 1
data_type: uint16
swap: word
unit_of_measurement: "%"
device_class: battery
state_class: measurement
scale: 1 **# NOT 0.1**
scan_interval: 10
from sungrow-shx-inverter-modbus-home-assistant.
I tried to adjust the max_charge_power because battery system SunGrow SBR265 supports up to 17.520 W
Unfortunately this doesn't work... Perhaps the register isn't correct?
set_sg_battery_max_charge_power:
name: Set max battery charge power in W
#initial: 40
min: 0
max: 17520
step: 100
set_sg_battery_max_discharge_power:
name: Set max battery discharge power in W
#initial: 40
min: 0
max: 17520
step: 100
from sungrow-shx-inverter-modbus-home-assistant.
In the secret.yaml, the slave inverter must be set as a Modbus slave from 1 to 2 in order to be able to query data via the sh10rt's Modbus port
z.B
`
#first inverter Master
sungrow_modbus_host_ip: 192.168.178.xx
sungrow_modbus_port: 502
sungrow_modbus_slave: 1
########################################################################
#second inverter Slave
sungrow_modbus_host_ip_inv2: 192.168.178.xx
sungrow_modbus_port_inv2: 502
sungrow_modbus_slave_inv2: 2 `
from sungrow-shx-inverter-modbus-home-assistant.
This works with my two SH10RT! I've completed the 2nd yaml, see below.
I have an additional question: when I try to write a modbus register like this, it's not working. Do you have any idea? Actually the "Set battery SoC reserve" doesn't work either. Perhaps the same problem?
alias: Battery-SoC 17 description: "" trigger: - platform: numeric_state entity_id: sensor.battery_level above: 90 condition: [] action: - service: modbus.write_register data: address: 13100 hub: SungrowSHx slave: 2 value: 17 mode: single
Thankyou.
Your YAML file worked perfectly for my TWO SG5.0RS
I'd spent a couple of hours trying to create a second modbus_sungrow.yaml file to handle two inverters!
Now I can plot my 4 MPPT string currents
from sungrow-shx-inverter-modbus-home-assistant.
Quick heads up RE the dual YAML files - reduce increase the scan_interval time ...the default will flood the Winet-s devices and knock them offline.
i've taken mine to 60s at the moment and will see how it goes
from sungrow-shx-inverter-modbus-home-assistant.
hi, i have problems with the power mppt 1/2. I don't understand how the code works and my mistake lies. I just don't get any values for the power. Could you please help me
`
-
name: MPPT1 voltage inv 2
unique_id: sg_mppt1_voltage_inv2
slave: !secret sungrow_modbus_slave_inv2
address: 5010 # reg 5011
input_type: input
count: 1
data_type: uint16
swap: word
precision: 1
unit_of_measurement: V
device_class: Voltage
scale: 0.1
scan_interval: 10-
name: MPPT1 current inv 2
unique_id: sg_mppt1_current_inv2
slave: !secret sungrow_modbus_slave_inv2
address: 5011 # reg 5012
input_type: input
count: 1
data_type: uint16
swap: word
precision: 2
unit_of_measurement: A
device_class: Current
scale: 0.1
scan_interval: 10 -
name: MPPT2 voltage inv 2
unique_id: sg_mppt2_voltage_inv2
slave: !secret sungrow_modbus_slave_inv2
address: 5012 # reg 5013
input_type: input
count: 1
data_type: uint16
swap: word
precision: 1
unit_of_measurement: V
device_class: Voltage
scale: 0.1
scan_interval: 10 -
name: MPPT2 current inv 2
unique_id: sg_mppt2_current_inv2
slave: !secret sungrow_modbus_slave_inv2
address: 5013 # reg 5014
input_type: input
count: 1
data_type: uint16
swap: word
precision: 2
unit_of_measurement: A
device_class: Current
scale: 0.1
scan_interval: 10 -
name: Total DC power inv 2
unique_id: sg_total_dc_power_inv2
slave: !secret sungrow_modbus_slave_inv2
address: 5016 # reg 5017
input_type: input
count: 2
data_type: uint32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
sensor:
name: MPPT1_inv2 power
unique_id: sg_mppt1_power_inv2
unit_of_measurement: W
device_class: power
availability: "{{states('sensor.mppt1_voltage_inv2')|is_number and states('sensor.mppt1_current_inv2')|is_number }}"
state: "{{ (states('sensor.mppt1_voltage_inv2') | float * states('sensor.mppt1_current_inv2') | float) |int }}"
-
name: MPPT2_inv2 power
unique_id: sg_mppt2_power_inv2
unit_of_measurement: W
device_class: power
availability: "{{states('sensor.mppt2_voltage_inv2')|is_number and states('sensor.mppt2_current_inv2')|is_number }}"
state: "{{ (states('sensor.mppt2_voltage_inv2') | float * states('sensor.mppt2_current_inv2') | float) |int }}"
from sungrow-shx-inverter-modbus-home-assistant.
Last HA Update broke my complete Sungrow INtegration for SH and SG... Think there are some issues between Modbus in HA Core and the Code (there is something with regards to uint/int16 needs swap: none ... but this did not help...
I will get deeper into this during the next week.
from sungrow-shx-inverter-modbus-home-assistant.
Are you using the latest version of modbus.yaml file? There the error with swap
is fixed.
Since HA 2023.9.x there are some new, weird ModBus issues. See 158
There you will find a link to the HA issue regarding the problems with ModBus.
from sungrow-shx-inverter-modbus-home-assistant.
I created a .yaml config file for my second inverter that works with Home Assistant 10.1.
I only included the sensors I really need, so of you like, feel free to complete the file - I was too lazy :)
If you want to use this, please follow the instructions given earlier in this thread.
Thanks to @bleughb for the "inspiration" (I basically stole your way of doing the config).
second_inverter_version_10_1.yml.txt
from sungrow-shx-inverter-modbus-home-assistant.
Has anyone two SH10RT-V112 as Master/Slave working and both combined shown in a flow chart?
from sungrow-shx-inverter-modbus-home-assistant.
Related Issues (20)
- Some Entities are not available HOT 10
- 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
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.