-
Notifications
You must be signed in to change notification settings - Fork 0
/
emmbus2influx.conf
308 lines (257 loc) · 7.21 KB
/
emmbus2influx.conf
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
305
306
307
# emmbus2influx sonfiguration file
# long options can be used, see emmbus2influx --help
#
# options given at command line will override the
# ones on this file
# The first section until a line beginning with [ may contain command line
# options. Values have to be specified exactly the same way as if command
# line arguments would be used. (e.g. no blanks allowed after =)
# verbosity
#verbose=10
# default Influx measurement to use
# can be overridden by a meter definition
measurement=heatMeter
# Influx server
server=lnx.armin.d
# influxdb v1 database name
# db=myDB
# influx v1 user and password (optional)
#user=myInfluxV1_user
#password=myInfluxV1_password
# Influxdb V2 API (do not specify db, user or password)
# organization
org=diehl
# Influx bucket to use (like db in V1)
bucket=ad
# name for the tag (not the value, value equals meter name), defaults to Meter=
# can be overridden per meter definition
tagname=Device
# access token (replaced user/password)
token=8fSHguY6Cspa7-rF0w4_c7ejN9ytVOXPUuc9BrKlo8p90f19RjaqzBh5oAkOi4ztVzukpgBEmp_2GbVmVdL1og==
# MQTT
# hostname without protocol and port
mqttserver=lnx.armin.d
mqttport=1883
mqttprefix=ad/house/heating/
#Grafana
ghost=wss://lnx.armin.d
gtoken=glsa_zyG6SFxiB6DZImk3CZ4H5mvxmlbwZep3_ab583316
gpushid=house
gport=63000
gsslverifypeer=0
# Serial port for serial mbus, not needed if only IP connections will be used (specified per meter)
device=/dev/ttyUSB_mbus
#device=/dev/ttyAMA0
baud=2400
poll=5
# [MeterType] sections
# ====================
# energy meter types, one [MeterType] section per meter type
# name="xxx" defines the name/type (case sensitive)
#
# mqttqs=x set the qos value for mqtt (0: At most once, 1:At least once, 2: Exactly once)
# mqttretain=0|1 1: The broker stores the last retained message and the corresponding QoS for that topic
#
# influx=0|1 0 will disable this register for influxdb, sets default
# for registers below
# mqtt=0|1 0 will disable this register for mqtt, sets default for
# registers below
# Registers
# =========
#
# for each register,
# "name"=recordNumber
# or
# "name"="Formula"
# has to be specified. Additional, optional parameters may be specified
# (separated by comma). If no data type is specified, int16 will be assumed
# A name must be specified with quotes to be able to use reserved words like "name"
#
# Options
#
# arr=name This option is applicable for mqtt only
#
# force=int|float converts to float or integer (to have the same influx
# data type for different sources)
# dec=x number of decimals, has to be >= 0
# div=x Divider
# mul=x Multiplier
# formula="..." the result of the formula will be the new value.
# The current value as well as the values of other registers
# can be accessed by its name. Formulas will be executed
# after all registers within a meter has been read.
# influx=0|1 0 will disable this register for influxdb
# mqtt=0|1 0 will disable this register for mqtt
# Schedule section
# name = "CronDefinition"
#
# The cron definition is a list of six single space-separated fields: representing
# second, minute, hour, day, month, weekday. Month and weekday names can be given
# as the first three letters of the English names.
#
# Example definitions
# "0 0 * * * *" = the top of every hour of every day
# "*/10 * * * * *" = every ten seconds
# "0 0 8-10 * * *" = 8, 9 and 10 o'clock of every day
# "0 0/30 8-10 * * *" = 8:00, 8:30, 9:00, 9:30 and 10 o'clock every day
# "0 0 9-17 * * MON-FRI" = on the hour nine-to-five weekdays
# "0 0 0 25 12 ?" = every Christmas Day at midnight
[Schedule]
"WaterMeter" = "45 55 22 * * *" # once per day at 22:55:45
"HeatMeterInflux" = "0 45 22 * * *" # once per day at 22:45:00
# query heat meter every 15 minutes to have flow and temp in mqtt/grafana (no influx write)
"HeatMeter" = "0 0,15,30,45 * * * *"
# this works as if a meter schedule fits to more than one schedule at the same time, the meter will queried ony once
# write all variables to MQTT/Grafana once per minute (for Grafana live)
"mqttWrite" = "0 * * * * *"
[MeterType]
mqtt=0
grafana=0
influx=0
name = "Engelmann_SensoStar"
"serial" = 0
"kwh" = 1 # Energy (kWh)
"flow" = 5,influx=1 # Instantaneous value, Volume flow (m m^3/h)
"tempVL" = 7,influx=1 # flow temperature (deg C)
"tempRet" = 8,influx=1
measurement="heatMeter"
#influxwritemult=4 # once per hour
[MeterType]
name = "Itron_BM_m"
mqtt=0
grafana=0
measurement="waterConsumption"
"serial" = 0,influx=0
"m3" = 1,div=1000,dec=2
# heat meter to influx
[Meter]
type="Engelmann_SensoStar"
address=9
name="SUT"
disabled=0
schedule="HeatMeter"
[Meter]
type="Engelmann_SensoStar"
address=10
name="EG"
disabled=0
schedule="HeatMeter"
[Meter]
type="Engelmann_SensoStar"
address=11
name="G1"
disabled=0
schedule="HeatMeter"
[Meter]
type="Engelmann_SensoStar"
address=12
name="G2"
disabled=0
schedule="HeatMeter"
[Meter]
type="Engelmann_SensoStar"
address=30
name="HK_EG"
disabled=0
schedule="HeatMeter"
[Meter]
type="Engelmann_SensoStar"
address=31
name="HK_G12"
disabled=0
schedule="HeatMeter"
# water meter to influx
[Meter]
type="Itron_BM_m"
address=19
name="W_SUT"
iname="SUT"
measurement="waterConsumption"
schedule="WaterMeter"
[Meter]
type="Itron_BM_m"
address=20
name="W_EG"
iname="EG"
measurement="waterConsumption"
schedule="WaterMeter"
[Meter]
type="Itron_BM_m"
address=21
name="W_G1"
iname="G1"
measurement="waterConsumption"
schedule="WaterMeter"
[Meter]
type="Itron_BM_m"
address=22
name="W_G2"
iname="G2"
measurement="waterConsumption"
schedule="WaterMeter"
# write variables to MQTT/Grafana
[Meter]
influx=0
name="heatMeter"
"SUT_kwh" = "SUT.kwh"
"SUT_Flow" = "SUT.flow"
"SUT_tempVL" = "SUT.tempVL"
"SUT_tempRet"= "SUT.tempRet"
"EG_kwh" = "EG.kwh"
"EG_Flow" = "EG.flow"
"EG_tempVL" = "EG.tempVL"
"EG_tempRet" = "EG.tempRet"
"G1_kwh" = "G1.kwh"
"G1_Flow" = "G1.flow"
"G1_tempVL" = "G1.tempVL"
"G1_tempRet" = "G1.tempRet"
"G2_kwh" = "G2.kwh"
"G2_Flow" = "G2.flow"
"G2_tempVL" = "G2.tempVL"
"G2_tempRet" = "G2.tempRet"
"HK_EG_kwh" = "HK_EG.kwh"
"HK_EG_Flow" = "HK_EG.flow"
"HK_EG_tempVL" = "HK_EG.tempVL"
"HK_EG_tempRet" = "HK_EG.tempRet"
"HK_G12_kwh" = "HK_G12.kwh"
"HK_G12_Flow" = "HK_G12.flow"
"HK_G12_tempVL" = "HK_G12.tempVL"
"HK_G12_tempRet"= "HK_G12.tempRet"
schedule="mqttWrite"
# heat consumption to influx
[Meter]
name="C_SUT"
iname="SUT"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="SUT.kwh",mqtt=0,grafana=0
[Meter]
name="C_EG"
iname="EG"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="EG.kwh + HK_EG.kwh",mqtt=0,grafana=0
[Meter]
name="C_G1"
iname="G1"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="G1.kwh",mqtt=0,grafana=0
[Meter]
name="C_G2"
iname="G2"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="G2.kwh",mqtt=0,grafana=0
[Meter]
name="C_HK_G12"
iname="HK_G12"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="HK_G12.kwh",mqtt=0,grafana=0
[Meter]
name="C_HK_EG"
iname="HK_EG"
schedule="HeatMeterInflux"
measurement="heatConsumption"
"kwh"="HK_EG.kwh",mqtt=0,grafana=0