Skip to content

Commit

Permalink
Use register 5242 for high precision grid frequency (#372)
Browse files Browse the repository at this point in the history
* Use register 5242 for high precision grid frequency
Sensor was already set to precision 2 even though scale was 0.1. This way, the actual grid frequency fluctuation is visible.

* Move sensor position to new position (ascending reg values)

---------

Co-authored-by: mkaiser <[email protected]>
  • Loading branch information
Gnarfoz and mkaiser authored Oct 13, 2024
1 parent 28dbb73 commit b14c119
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions modbus_sungrow.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Home Assistant Sungrow inverter integration
# https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant
# by Martin Kaiser
# last update: 2024-10-13
# last update: 2024-10-13 (2)
#
# Note: This YAML file will only work with Home Assistant >= 2023.10

Expand Down Expand Up @@ -185,20 +185,7 @@ modbus:
state_class: measurement
scale: 0.1
scan_interval: 10

- name: Grid frequency
unique_id: sg_grid_frequency
device_address: !secret sungrow_modbus_slave
address: 5035 # reg 5036
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: "Hz"
device_class: frequency
state_class: measurement
scale: 0.1
scan_interval: 10


- name: Reactive power
unique_id: sg_reactive_power
device_address: !secret sungrow_modbus_slave
Expand Down Expand Up @@ -226,6 +213,19 @@ modbus:
scale: 0.001
scan_interval: 10

- name: Grid frequency
unique_id: sg_grid_frequency
device_address: !secret sungrow_modbus_slave
address: 5241 # reg 5242
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: "Hz"
device_class: frequency
state_class: measurement
scale: 0.01
scan_interval: 10

#https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?pageNo=13
#Meter Active Power: 5601-5602 S32 W (Energiezähler Wirkleistung)
#Meter Phase A Active Power: 5603-5604 S32 W (Stromzähler Phase A Wirkleistung)
Expand Down

0 comments on commit b14c119

Please sign in to comment.