-
Notifications
You must be signed in to change notification settings - Fork 11
/
config.yaml
165 lines (160 loc) · 9.02 KB
/
config.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
inverter:
host: modbus-proxy # [Required] IP Address of the Inverter or Dongle
port: 502 # [Optional] Default for modbus is 502, for http is 8082
timeout: 5 # [Optional] Default is 10, how long to wait for a connection
retries: 3 # [Optional] Default is 3, how many times to retry if connection fails
slave: 0x01 # [Optional] Default is 0x01
scan_interval: 10 # [Optional] Default is 30
connection: modbus # [Required] options: modbus, sungrow, http
# model: "SH10RT" # [Optional] This is autodetected on startup, only needed if detection issues or for testing
# See model list here: https://github.com/bohdan-s/SunGather#supported
smart_meter: True # [Optional] Default is False, Set to true if inverter supports reading grind / house consumption
use_local_time: True # [Optional] Default False, Uses Inventer time, if true it uses PC time when updating timestamps (e.g. PVOutput)
# log_console: INFO # [Optional] Default is WARNING, Options: DEBUG, INFO, WARNING, ERROR
# log_file: INFO # [Optional] Default is OFF, Options: OFF, DEBUG, INFO, WARNING, ERROR
level: 2 # [Optional] Set the amount of information to gather
# 0 = Model and Solar Generation,
# 1 (default) = Useful data, all required for exports,
# 2 everything your Inverter supports,
# 3 Everything from every register
# If you do not want to use a export, you can either remove the whole configuration block
# or set enabled: False
exports:
# Print Registers to console, good for debugging / troubleshooting
- name: console
enabled: False # [Optional] Default is False
# Runs a simple Webserver showing Config and last read registers
# Access at http://localhost:8080 or http://[serverip]:8080
- name: webserver
enabled: True # [Optional] Default is False
port: 8080 # [Optional] Default is 8080
# Output data to InfluxDB
- name: influxdb
enabled: False # [Optional] Default is False
url: "http://influxdb:8086" # [Optional] Default URL is http://localhost:8086
# token: "xxx" # [Required] API Token OR Username:Password (for influxdb v1.8x comment it out and use username + password)
# username: # [Optional] Username if not using token
# password: # [Optional] Password if not using token
org: "Default" # [Required] InfluxDB Organization (for influxdb v1.8x this will be ignored)
bucket: "monitoring" # [Required] InfluxDB Bucket (for influxdb v1.8x this is the database name)
measurements: # [Required] Registers to publish to bucket
- point: "power"
register: daily_power_yields
- point: "power"
register: total_active_power
- point: "power"
register: load_power
- point: "power"
register: meter_power
- point: "power"
register: export_to_grid
- point: "power"
register: import_from_grid
- point: "temp"
register: internal_temperature
# Publish Registers to MQTT / Home Assistant
- name: mqtt
enabled: True # [Optional] Default is False
host: mosquitto # [Required] IP or Hostname of MQTT Server
# port: 1883 # [Optional] Default 1883
topic: "inverter/sungrow/registers" # [Optional] Default: "inverter/{model}/registers", Variable {model} will be replaced with model number of inverter
# username: # [Optional] Username is MQTT server requires it
# password: # [Optional] Password is MQTT server requires it
homeassistant: True # [Optional] Default False, Publish discovery and sensors for HomeAssistant
ha_sensors: # [Optional] / [Required] ha_discovery: True, Topics to enable discovery for HA
- name: "Daily Generation"
sensor_type: sensor
register: daily_power_yields
dev_class: energy
state_class: total_increasing
- name: "Active Power"
sensor_type: sensor
register: total_active_power
dev_class: power
state_class: measurement
- name: "Load Power"
sensor_type: sensor
register: load_power
dev_class: power
state_class: measurement
- name: "Meter Power"
sensor_type: sensor
register: meter_power
dev_class: power
state_class: measurement
- name: "Export to Grid"
sensor_type: sensor
register: export_to_grid
dev_class: power
state_class: measurement
- name: "Import from Grid"
sensor_type: sensor
register: import_from_grid
dev_class: power
state_class: measurement
- name: "Temperature"
sensor_type: sensor
register: internal_temperature
dev_class: temperature
state_class: measurement
- name: "Power State"
sensor_type: binary_sensor
register: run_state
dev_class: running
payload_on: "ON"
payload_off: "OFF"
topics:
- topic: solar/power/load_power_hybrid
register: load_power_hybrid
- topic: solar/power/total_dc_power
register: total_dc_power
- topic: solar/power/export_power_hybrid
register: export_power_hybrid
- topic: solar/power/current/phase_a
register: phase_a_current
- topic: solar/power/current/phase_b
register: phase_b_current
- topic: solar/power/current/phase_c
register: phase_c_current
- topic: solar/battery/battery_power
register: battery_power
- topic: solar/battery/battery_level
register: battery_level
# Publish Registers to PVOutput
- name: pvoutput
enabled: False # [Optional] Default is False
api: "xxxxx" # [Required] API Key, Settings > API Key
sid: "xxxxx" # [Optional] System ID, Settings > Registered Systems > System ID
# join_team: False # [Optional] Default True, This will join the SunGather team in PVOutput, Setting to False will leave the team if previously joined
rate_limit: 60 # [Optional] Default 60, 60 for regular accounts, 300 for donation accounts
cumulative_flag: 2 # If using v2 & v4 set to 1, of using only v1 set to 2 (if daily totals)
batch_points: 1 # [Optional] Default 1, how many data points to batch upload,
# Time between uploads will be status_interval * batch_points. e.g. status_invterval of 5min, and batch_points of 12 will upload to PVOutput Hourly (5 * 12 = 60 mins)
parameters: # [Required] v1 & v3 or v2 & v4 minimum. See: https://pvoutput.org/help/api_specification.html#power-and-energy-calculation
- name: v1 # Energy Generation
register: daily_power_yields # Solar Generated Today (Energy)
multiple: 1000
- name: v2 # Power Generation
register: total_active_power # Current Generation (Power)
# - name: v3 # Energy Consumption
# register:
- name: v4 # Power Consumption
register: load_power # Current Home usage (Power)
# - name: v5 # Ambient temperature see: https://forum.pvoutput.org/t/what-temperature-is-used-to-calculate-insolation/2106
# register: internal_temperature #
- name: v6 # Voltage
register: phase_a_voltage # Read voltage from first Phase
# - name: "v7" # Extended Value v7 - Donation Only
# register:
# - name: "v8" # Extended Value v8 - Donation Only
# register:
# - name: "v9" # Extended Value v9 - Donation Only
# register:
# - name: "v10" # Extended Value v10 - Donation Only
# register:
# - name: "v11" # Extended Value v11 - Donation Only
# register:
# - name: "v12" # Extended Value v12 - Donation Only
# register:
# - name: "m1" # Text Message 1 - Donation Only
# register: