-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwaveplus_bridge.yaml
214 lines (172 loc) · 7.68 KB
/
waveplus_bridge.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
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
######## Basic WavePlus Bridge configuration ########
#
# The basic configuration includes the specification of the Wave Plus devices
# serial numbers, the sensor update period, the HTTP port and optionally the log
# file.
# Update period: Time in seconds between reading the sensor values
period: 120
# Number of extra attempts to read from the device after a connection failure
retries: 3
# Amount of time in seconds to wait before attempting reconnection
retry_delay: 1
# SN: List of 10-digit serial number of one or multiple Wave Plus devices (see
# under the magnetic backplate. Each number can be combined with a device
# nickname, separated by a column from the serial number
# (e.g. "2931234567, my_office").
sn:
- 2931234567, my_office
- 2931234569, my_living
# HTTP/Web server port: If no HTTP/web server is required, comment the
# following line.
port: 80
# Log file: Comment the following line to log all information to stdout.
# For more sophisticated logging configurations, for example for debugging, see
# section 'Debugging' of README.md.
log: /var/log/waveplus_bridge.log
######## CSV database and graph generation ########
#
# The CSV database is used to generate data graphs on the HTML page and to allow
# processing the data in external tools. The CSV file is reloaded after a
# restart, which guarantees that the generated graphs shows also the previously
# recorded data.
# CSV log file: If no CSV data logging is required, comment the following line.
csv: /var/log/waveplus_bridge.csv
# Data retention time in seconds (to limit the memory use)
data_retention: 2678400 # 31 days
# The graph decimation allows reducing the CSV data used to generate the graphs
# (see logdb.get_csv)
graph_decimations:
-1.0: 8 # -31 days (full range)
-5760: 3 # - 8 days
-750: 1 # - 25 hours
######## EMail alerts ########
# Email alerts can be sent when certain conditions are met (e.g. radon level
# higher than 100 Bq/m3 for more than 1 hour). To send such email alerts, an
# SMTP server has to be specified and one or multiple alert triggers defined.
# SMTP server definition to send mail alerts
smtp_server:
# Mail server address
server: mail.server.com
# Mail server port, e.g. 25, 465, 587
port: 465
# Options: SSL, TLS, or no definition (default)
security: SSL
# Login user name
user: wave@plus.com
# Login user password
password: bridge123
# Mail (and print) alerts
# One or multiple alerts can be defined. Each alert has one or multiple
# sources (device sensors), a trigger and one or multiple actions.
alerts:
# The first example of an email alert configuration uses the simplest form
# (single source, single threshold level, single mail destination address).
# Comprehensive explanations about the parameters are given in the 2nd
# example.
# The alert configuration is added in form of a list (starting with "-") to
# allow adding additional configurations:
- sources:
my_office:radon_st
trigger:
above: 150
for: "00:30:00"
min_interval: "12:00:00"
actions:
mail:
from: wave.plus@myhome.com
to: sophia.millar@family.com
# The second alert configuration uses multiple sources, trigger levels and
# mail destination addresses. It provides all necessary information to
# understand the configuration options:
- # At least one source (device:sensors) has to be defined as trigger
# source. The example shows the definition of multiple sources
# (list form):
sources:
- my_office:radon_st
- my_living:radon_st
# Various parameters allow defining the exact conditions when a
# triggering should occur:
trigger:
# A triggering happens if a sensor value is above or below a
# certain level. In this sense, the condition can be specified
# with the keywords 'above' or 'bellow' and a single threshold
# level, or as the example shows, as a list of threshold levels.
above: [100, 200, 400, 1000]
# 'For' delays the trigger until the specified condition is valid
# for a time span specified either in seconds, or in the format
# Hours:Minutes:Seconds. The trigger delay is applied individually
# for each specified trigger threshold level:
for: "00:30:00"
# 'min_interval' allows specifying a minimum re-triggering
# interval. The provided value is specified either in seconds, or
# in the format Hours:Minutes:Seconds. The minimum re-triggering
# interval is not respected if the re-triggering is due to a
# higher trigger threshold level than the previously triggering.
min_interval: "12:00:00"
# One or multiple actions can be specified. An action can be a mail
# alert, or a message to the stdout and to the log file.
# Both mail and print alerts allow customizing the alert information
# with the keyword 'message'. The specified message may contain the
# following placeholders: %v: sensor value, %d: device, %s: device
# sensor.
# The example below shows the definition of a mail alert and a print
# alert (list starting with "-"):
actions:
- mail:
# Author mail address
from: wave.plus@myhome.com
# Single or multiple destination addresses. Multiple
# addresses as shown in the example are provided in form
# of a list
to:
- liam.smith@family.com
- olivia.brown@family.com
# Mail subject
subject: 'Radon alert'
# Mail message, see above
message: |-
Radon level is too high!
Sensor: %d, %s
Level: %v
- print:
# Print message, see above
message: |-
Radon level is too high! Sensor: %d, %s; Level: %v
######## MQTT Publishing ########
# The sensor data can be published to an MQTT server. To do so, the MQTT broker
# has to be specified.
mqtt:
# MQTT broker host IP address
host: test.mosquitto.org
# MQTT broker port
port: 1883
# Optional client ID
# client_id: clientId-clxHpr9
# Optional authentication data composed by a user name and a password
# auth:
# username: <username>
# password: <password>
# Optional TLS configuration parameters. If present, ca_certs is required,
# all other all other parameters are optional, which results in the client
# using the default behavior.
# tls:
# ca_certs: <ca_certs>
# certfile: <certfile>
# keyfile: <keyfile>
# tls_version: <tls_version>
# ciphers: <ciphers>
# MQTT topic root: The topics for the different parameters to publish will
# be composed in the following way: <topic root>/<device>/<sensor>
topic: my_nice_home/waveplus_bridge
# List the Wave Plus devices and their sensors that should be published. A
# list of sensors to publish can be assigned to each device:
# <devicename>: ['<sensor1>', '<sensor2'>, ...]
# The wildcard character '*' (enclosed in '') can be used to select all
# sensors:
# <devicename>: '*'
publish:
my_office: [radon_st, radon_lt]
my_living: '*'
######## Test support ########
# Uncomment the following lines to enable test features
# emulation: True