-
Notifications
You must be signed in to change notification settings - Fork 38
/
config.sample
304 lines (274 loc) · 11.4 KB
/
config.sample
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
[SMA-EM]
# serials of sma-ems the daemon should take notice
# separated by space
serials=30028xxxxx
# features could filter serials to, but wouldn't see serials if these serials was not defines in SMA-EM serials
# list of features to load/run
#features=simplefswriter sample pvdata ediplugs mqtt remotedebug symcon influxdb
features=simplefswriter
[DAEMON]
pidfile=/run/smaemd.pid
# listen on an interface with the given ip
# use 0.0.0.0 for any interface
ipbind=0.0.0.0
# multicast ip and port of sma-datagrams
# defaults
mcastgrp=239.12.255.254
mcastport=9522
statusdir=
# each feature/plugin has its own section
# called FEATURE-[featurename]
# the feature section is required if a feature is listed in [SMA-EM]features
[FEATURE-simplefswriter]
# list serials simplefswriter notice
serials=30028xxxxx
# measurement vars simplefswriter should write to filesystem (only from smas with serial in serials)
values=pconsume psupply qsupply ssupply
statusdir=
[FEATURE-sample]
nothing=here
[FEATURE-mqtt]
# MQTT broker details
#mqtthost=::1
mqtthost=mqtt
mqttport=1883
#mqttuser=
#mqttpass=
#The following list contains all possible field names that you can use with
#the features mqtt, symcon, influxdb
# prefix: p=real power, q=reactive power, s=apparent power, i=current, u=voltage
# postfix: unit=the unit of the item, e.g. W, VA, VAr, Hz, A, V, kWh, kVArh, kVAh ...
# postfix: counter=energy value (kWh, kVArh, kVAh)
# without postfix counter=>power value (W, VAr, VA)
#mqttfields=pconsume, pconsumeunit, pconsumecounter, pconsumecounterunit,
# psupply, psupplyunit, psupplycounter, psupplycounterunit,
# qconsume, qconsumeunit, qconsumecounter, qconsumecounterunit,
# qsupply, qsupplyunit, qsupplycounter, qsupplycounterunit,
# sconsume, sconsumeunit, sconsumecounter, sconsumecounterunit,
# ssupply, ssupplyunit, ssupplycounter, ssupplycounterunit,
# cosphi, cosphiunit,
# frequency, frequencyunit,
# p1consume, p1consumeunit, p1consumecounter, p1consumecounterunit,
# p1supply, p1supplyunit, p1supplycounter, p1supplycounterunit,
# q1consume, q1consumeunit, q1consumecounter, q1consumecounterunit,
# q1supply, q1supplyunit, q1supplycounter, q1supplycounterunit,
# s1consume, s1consumeunit, s1consumecounter, s1consumecounterunit,
# s1supply, s1supplyunit, s1supplycounter, s1supplycounterunit,
# i1, i1unit,
# u1, u1unit,
# cosphi1, cosphi1unit,
# p2consume, p2consumeunit, p2consumecounter, p2consumecounterunit,
# p2supply, p2supplyunit, p2supplycounter, p2supplycounterunit,
# q2consume, q2consumeunit, q2consumecounter, q2consumecounterunit,
# q2supply, q2supplyunit, q2supplycounter, q2supplycounterunit,
# s2consume, s2consumeunit, s2consumecounter, s2consumecounterunit,
# s2supply, s2supplyunit, s2supplycounter, s2supplycounterunit,
# i2, i2unit,
# u2, u2unit,
# cosphi2, cosphi2unit,
# p3consume, p3consumeunit, p3consumecounter, p3consumecounterunit,
# p3supply, p3supplyunit, p3supplycounter, p3supplycounterunit,
# q3consume, q3consumeunit, q3consumecounter, q3consumecounterunit,
# q3supply, q3supplyunit, q3supplycounter, q3supplycounterunit,
# s3consume, s3consumeunit, s3consumecounter, s3consumecounterunit,
# s3supply, s3supplyunit, s3supplycounter, s3supplycounterunit,
# i3, i3unit,
# u3, u3unit,
# cosphi3, cosphi3unit,
# speedwire-version
mqttfields=pconsume,pconsumecounter,psupply,psupplycounter
#topic will be exteded with serial
mqtttopic=SMA-EM/status
pvtopic=SMA-PV/status
# publish all values as single topics (0 or 1)
publish_single=1
# How frequently to send updates over (defaults to 20 sec)
min_update=5
#debug output
debug=0
# ssl support
# adopt mqttport above to your ssl enabled mqtt port, usually 8883
# options:
# activate without certs=use tls_insecure
# activate with ca_file, but without client_certs
ssl_activate=0
# ca file to verify
ssl_ca_file=ca.crt
# client certs
ssl_certfile=
ssl_keyfile=
#TLSv1.1 or TLSv1.2 (default 2)
tls_protocol=2
[FEATURE-remotedebug]
# Debug settings
debughost=mypc
debugport=9100
[FEATURE-symcon]
# symcon
host=ips
port=3777
timeout=5
user=Symcon
password=SMA-EMdata
#A list of possible field names can be found above under FEATURE-mqtt
fields=pconsume,psupply,p1consume,p2consume,p3consume,p1supply,p2supply,p3supply,psupplycounter,pconsumecounter
emhook=/hook/smaem
pvfields=AC Power,grid frequency,DC input voltage,daily yield,total yield,Power L1,Power L2,Power L3,Status
pvhook=/hook/smawr
# How frequently to send updates over (defaults to 20 sec)
min_update=30
debug=0
[FEATURE-influxdb]
# influx
host=influxdb
port=8086
ssl=
db=SMA
timeout=5
user=
password=
# How frequently to send updates over (defaults to 20 sec)
min_update=30
debug=0
# emdata
# A list of possible field names can be found above under FEATURE-mqtt
measurement=SMAEM
fields=pconsume,psupply,p1consume,p2consume,p3consume,p1supply,p2supply,p3supply
# pvdata
# Fields can be any modbus register queried under FEATURE-pvdata except serial, DeviceID, and Device Name,
# as those are used as tags in any case.
pvmeasurement=SMAWR
pvfields=AC Power,grid frequency,DC input voltage,daily yield,total yield,Power L1,Power L2,Power L3
# ediplugs
edimeasurement=edimax
[FEATURE-influxdb2]
debug=0
url=hostname.tld
token=long_token
org=org_name
bucket=bucket_name
# emdata
# A list of possible field names can be found above under FEATURE-mqtt
measurement=SMAEM
fields=pconsume,psupply,p1consume,p2consume,p3consume,p1supply,p2supply,p3supply
# pvdata
# Fields can be any modbus register queried under FEATURE-pvdata except serial, DeviceID, and Device Name,
# as those are used as tags in any case.
pvmeasurement=SMAWR
pvfields=AC Power,AC Voltage,grid frequency,DC Power,DC input voltage,daily yield,total yield
# How frequently to send updates over (defaults to 20 sec)
min_update=30
[FEATURE-pvdata]
#Reads data from SMA inverter via Modbus.
#Enable the mqtt feature to publish the data to a mqtt broker (features=pvdata mqtt),
#and/or stored the data to a influx database (features=pvdata influxdb), and/or symcom ...
# How frequently to send updates over (defaults to 20 sec)
min_update=5
# debug output
debug=0
# inverter connection
# ['host', 'port', 'modbus_id', 'manufacturer']
inverters = [
['<inverter-ip>', '502', '3', 'SMA'],
['<inverter-ip>', '502', '3', 'SMA']
]
# For Modbus registers, see e.g. https://www.google.com/search?q=SMA_Modbus-TI-en-23.xlsx
# ['Modbus register address', 'Type', 'Format', 'Name', 'Unit']
# If the mqtt feature is used, 'Name' is included in the MQTT JSON payload as tag name.
registers = [
# Don't change names in this section as they are used by some features/*.py files
# Alternatives for AC Power & daily yield in MQTT: 'SMA-EM/status/30028xxxxx/pvsum' & 'SMA-EM/status/30028xxxxx/pvdaily'
# Also note that the daily yield register is broken for some inverters
['30057', 'U32', 'RAW', 'serial', ''],
['30201', 'U32', 'ENUM', 'Status',''],
['30051', 'U32', 'ENUM', 'DeviceClass',''],
['30053', 'U32', 'ENUM', 'DeviceID',''],
['40631', 'STR32', 'UTF8', 'Device Name', ''],
['30775', 'S32', 'FIX0', 'AC Power', 'W'],
['30517', 'U64', 'FIX3', 'daily yield', 'kWh'],
####################################################
# ['30813', 'S32', 'FIX0', 'AC_Power_Apparent', 'VA'],
['30977', 'S32', 'FIX3', 'AC_Current', 'A'],
# ['30783', 'S32', 'FIX2', 'AC_Voltage_L1', 'V'],
# ['30785', 'S32', 'FIX2', 'AC_Voltage_L2', 'V'],
# ['30787', 'S32', 'FIX2', 'AC_Voltage_L3', 'V'],
# ['30777', 'S32', 'FIX0', 'AC_Power_L1', 'W'],
# ['30779', 'S32', 'FIX0', 'AC_Power_L2', 'W'],
# ['30781', 'S32', 'FIX0', 'AC_Power_L3', 'W'],
['30803', 'U32', 'FIX2', 'Grid_Frequency', 'Hz'],
['30773', 'S32', 'FIX0', 'DC_Input1_Power', 'W'],
['30771', 'S32', 'FIX2', 'DC_Input1_Voltage', 'V'],
['30769', 'S32', 'FIX3', 'DC_Input1_Current', 'A'],
['30961', 'S32', 'FIX0', 'DC_Input2_Power', 'W'],
['30959', 'S32', 'FIX2', 'DC_Input2_Voltage', 'V'],
['30957', 'S32', 'FIX3', 'DC_Input2_Current', 'A'],
['30953', 'S32', 'FIX1', 'Device_Temperature', u'\xb0C'],
['30513', 'U64', 'FIX3', 'Total_Yield', 'kWh'],
['30521', 'U64', 'FIX0', 'Operating_Time', 's'],
['30525', 'U64', 'FIX0', 'Feed-in_Time', 's'],
['30975', 'S32', 'FIX2', 'Intermediate_Circuit_Voltage', 'V'],
['30225', 'S32', 'FIX0', 'Isolation_Resistance', u'\u03a9']
]
registers_batt = [
# Don't change names in this section as they are used by some features/*.py files
['30057', 'U32', 'RAW', 'serial', ''],
['30201', 'U32', 'ENUM', 'Status',''],
['30051', 'U32', 'ENUM', 'DeviceClass',''],
['30053', 'U32', 'ENUM', 'DeviceID',''],
['40631', 'STR32', 'UTF8', 'Device Name', ''],
['30775', 'S32', 'FIX0', 'AC Power', 'W'],
['30517', 'U64', 'FIX3', 'daily yield', 'kWh'],
####################################################
['30953', 'S32', 'FIX1', 'Device_Temperature', u'\xb0C'],
['30849', 'S32', 'FIX1', 'BatteryTemp', u'\xb0C'],
['30843', 'S32', 'FIX3', 'BatteryAmp', 'A'],
['30851', 'U32', 'FIX2', 'BatteryVolt', 'V'],
['30845', 'U32', 'FIX0', 'BatteryCharge', u'\u0025'],
['30955', 'U32', 'ENUM', 'BatteryState', ''],
['31391', 'U32', 'ENUM', 'BatteryHealth', ''],
['30813', 'S32', 'FIX0', 'AC apparent power', 'VA'],
['30803', 'U32', 'FIX2', 'Grid_Frequency', 'Hz'],
# ['30777', 'S32', 'FIX0', 'Power L1', 'W'],
# ['30779', 'S32', 'FIX0', 'Power L2', 'W'],
# ['30781', 'S32', 'FIX0', 'Power L3', 'W'],
['30513', 'U64', 'FIX3', 'Total_Yield', 'kWh'],
['30521', 'U64', 'FIX0', 'Operating_Time', 's'],
['30525', 'U64', 'FIX0', 'Feed-in_Time', 's'],
]
[FEATURE-pvdata_kostal_json]
# How frequently to send updates over (defaults to 20 sec)
min_update=15
#debug output
debug=0
#inverter connection
inv_host = <inverter-ip>
#['address', 'NONE', 'NONE' 'description', 'unit']
# to get the same structure of sma pvdata feature
registers = [
['33556736', 'NONE', 'NONE', 'DC Power', 'W'],
['33555202', 'NONE', 'NONE', 'DC string1 voltage', 'V'],
['33555201', 'NONE', 'NONE', 'DC string1 current', 'A'],
['33555203', 'NONE', 'NONE', 'DC string1 power', 'W'],
['67109120', 'NONE', 'NONE', 'AC Power', 'W'],
['67110400', 'NONE', 'NONE', 'AC frequency', 'Hz'],
['67110656', 'NONE', 'NONE', 'AC cosphi', u'\xb0C'],
['67110144', 'NONE', 'NONE', 'AC ptot limitation', ''],
['67109378', 'NONE', 'NONE', 'AC phase1 voltage', 'V'],
['67109377', 'NONE', 'NONE', 'AC phase1 current', 'A'],
['67109379', 'NONE', 'NONE', 'AC phase1 power', 'W'],
['251658754', 'NONE', 'NONE', 'yield today', 'Wh'],
['251658753', 'NONE', 'NONE', 'yield total', 'kWh'],
['251658496', 'NONE', 'NONE', 'operationtime', ''],
]
[FEATURE-ediplugs]
# How frequently to send updates over (defaults to 20 sec)
min_update=15
#debug output
debug=0
# Edimax SP-2101W V2 with Firmware 3.00c change their default password during initial setup.
# Find the actual password using this hack: https://discourse.nodered.org/t/searching-for-help-to-read-status-of-edimax-smartplug/15789/6
# ['<ip>', 'admin', '<password>']
plugs = [
['host1', 'admin', '1234'],
['host2', 'admin', '1234']
]