forked from meltaxa/solariot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modbus-sungrow-sg8kd.py
50 lines (47 loc) · 1.39 KB
/
modbus-sungrow-sg8kd.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
read_register = {
"5001": "inverter_size_10", # KW
"5003": "daily_power_yield_0.01", # Wh
"5004": "total_power_yield_100", # MWh
"5006": "inverter_power_on_hours", #hrs
"5008": "internal_temp_10", # C
"5011": "pv1_voltage_10", # V
"5012": "pv1_current_10", # A
"5013": "pv2_voltage_10", # V
"5014": "pv2_current_10", # A
"5017": "total_pv_power", # W
"5019": "grid_voltage_10", # V
"5022": "inverter_current_10", # A
"5031": "total_active_power", # W
"5036": "grid_frequency_10", # Hz
"5083": "export_power_overflow", # W - House Grid Consumption (+ = importing, - = exporting)
"5084": "export_power_indicator", # W - House Grid Consumption Overflow Indicator
"5091": "house_loads", # W - House Used Power - All sources
"5093": "daily_export_energy_0.01", # Wh
"5095": "total_export_energy_10", # KWh
"5097": "daily_import_energy_0.01", # Wh
"5099": "total_import_energy_10", # KWh
"5101": "daily_self_consumption_energy_0.01", # Wh
"5103": "total_self_consumption_energy_10", # KWh
}
holding_register = {
"5000": "year",
"5001": "month",
"5002": "day",
"5003": "hour",
"5004": "minute",
"5005": "second"
}
scan = """{
"read": [
{
"start": "5000",
"range": "110"
}
],
"holding": [
{
"start": "4999",
"range": "6"
}
]
}"""