-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBrinkWTW.yaml
485 lines (441 loc) · 10.5 KB
/
BrinkWTW.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
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# ESPHome Config for BRINK WTW
# For use on ESP32 MH ET
#
substitutions:
name: brink
friendly_name: ${name}
esphome:
name: ${name}
esp32:
board: lolin_s2_mini
variant: esp32s2
framework:
type: arduino
# Enable/Disable logging
logger:
level: DEBUG
baud_rate: 0
# Enable Home Assistant API
api:
# Enable OTA updates
ota:
wifi:
#ssid: !secret wifi_ssid
#password: !secret wifi_password
## Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${friendly_name} hotspot"
password: "configesp"
captive_portal:
# Enable Web server.
web_server:
port: 80
# Sync time
time:
- platform: sntp
id: sntp_time
timezone: "Europe/Amsterdam"
on_time_sync:
then:
- logger.log: "Synchronized sntp clock"
uart:
id: mod_bus
tx_pin: GPIO11
rx_pin: GPIO09
baud_rate: 19200
stop_bits: 1
parity: even
modbus:
flow_control_pin: GPIO7
id: modbus1
send_wait_time: 2000ms
modbus_controller:
- id: ${name}
## set the brink Modbus device addr to 1 = hex 0x1 (original 20 = hex: 0x14)
address: 0x1
modbus_id: modbus1
setup_priority: -10
#command_throttle: 250ms
update_interval: 15s
sensor:
- platform: modbus_controller
modbus_controller_id: brink
id: temp_binnen
name: "Binnen temperatuur"
address: 4036
unit_of_measurement: "°C"
register_type: read
value_type: S_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: brink
id: humidity_binnen
name: "Binnen luchtvochtigheid"
register_type: read
address: 4037
unit_of_measurement: "%"
value_type: S_WORD
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: brink
id: temp_to_outside
name: "Buiten uitblaas temperatuur"
address: 4046
unit_of_measurement: "°C"
register_type: read
value_type: S_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: brink
id: humidity_to_outside
name: "Buiten uitblaas luchtvochtigheid"
register_type: read
address: 4047
unit_of_measurement: "%"
value_type: S_WORD
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: brink
id: temp_ntc1
name: "Buitenaanzuig temperatuur"
address: 4081
unit_of_measurement: "°C"
register_type: read
value_type: S_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: brink
id: inlaatluchtvolume_ingesteld
icon: "mdi:fan"
name: "Inlaatluchtvolume ingesteld"
address: 4031
unit_of_measurement: "m3/h"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
filters:
- multiply: 1
- platform: modbus_controller
modbus_controller_id: brink
id: vochtsensor_luchtvochtigheid
name: "Vochtsensor"
register_type: read
address: 4083
unit_of_measurement: "%"
value_type: S_WORD
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: brink
id: huidig_inlaatluchtvolume
icon: "mdi:fan"
name: "Huidig inlaatluchtvolume"
address: 4032
unit_of_measurement: "m3/h"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
filters:
- multiply: 1
- platform: modbus_controller
modbus_controller_id: brink
id: uitlaatluchtvolume_ingesteld
icon: "mdi:fan"
name: "uitlaatluchtvolume ingesteld"
address: 4041
unit_of_measurement: "m3/h"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
filters:
- multiply: 1
- platform: modbus_controller
modbus_controller_id: brink
id: huidig_uitlaatluchtvolume
icon: "mdi:fan"
name: "Huidig uitlaatluchtvolume"
address: 4042
unit_of_measurement: "m3/h"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
filters:
- multiply: 1
- platform: modbus_controller
modbus_controller_id: brink
id: huidig_filter_uren
icon: "mdi:clock-start"
name: Filter uren
address: 4115
unit_of_measurement: "Uur"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
- platform: modbus_controller
modbus_controller_id: brink
id: huidig_filter_dagen
icon: "mdi:clock-start"
name: Filter dagen
address: 4115
unit_of_measurement: "Dagen"
register_type: read
value_type: S_WORD
accuracy_decimals: 0
filters:
- multiply: 0.041667
text_sensor:
- platform: modbus_controller
modbus_controller_id: brink
id: status
register_type: read
address: 4020
raw_encode: NONE
name: Status
lambda: |-
uint16_t int_mode = (data[item->offset] << 8) + data[item->offset+1];
ESP_LOGD("main","Parsed operation mode int : %d", int_mode);
std::string mode_str;
switch (int_mode) {
case 0: mode_str = "Standby"; break;
case 1: mode_str = "Bootloader"; break;
case 2: mode_str = "Non Blocking Error"; break;
case 3: mode_str = "Blocking Error"; break;
case 4: mode_str = "Manual"; break;
case 5: mode_str = "Holiday"; break;
case 6: mode_str = "Night ventilation"; break;
case 7: mode_str = "Party"; break;
case 8: mode_str = "Bypass Boost"; break;
case 9: mode_str = "Normal Boost"; break;
case 10: mode_str = "Auto CO2"; break;
case 11: mode_str = "Auto eBus"; break;
case 12: mode_str = "Auto Modbus"; break;
case 13: mode_str = "Auto Lan/ Wlan portal"; break;
case 14: mode_str = "Auto Lan/ Wlan local"; break;
}
return mode_str;
- platform: modbus_controller
modbus_controller_id: brink
id: bypass_status
register_type: read
address: 4050
raw_encode: NONE
name: Bypass status
lambda: |-
uint16_t int_mode = (data[item->offset] << 8) + data[item->offset+1];
ESP_LOGD("main","Parsed operation mode int : %d", int_mode);
std::string mode_str;
switch (int_mode) {
case 0: mode_str = "Initialisatie"; break;
case 1: mode_str = "Open"; break;
case 2: mode_str = "Dicht"; break;
case 3: mode_str = "Open"; break;
case 4: mode_str = "Dicht"; break;
default: mode_str = "Onbekend"; break;
}
return mode_str;
- platform: modbus_controller
modbus_controller_id: brink
id: filterstatus
register_type: read
address: 4100
raw_encode: NONE
name: Filter status
lambda: |-
uint16_t int_mode = (data[item->offset] << 8) + data[item->offset+1];
ESP_LOGD("main","Parsed operation mode int : %d", int_mode);
std::string mode_str;
switch (int_mode) {
case 0: mode_str = "Niet vervuild"; break;
case 1: mode_str = "Vervuild";
}
return mode_str;
- platform: template
name: Filter reset op
id: laatste_reset_filter
icon: mdi:clock-start
update_interval: 600s
filters:
- substitute:
- "Jan -> jan"
- "Feb -> feb"
- "Mar -> maart"
- "Apr -> april"
- "Mai -> mei"
- "Jun -> juni"
- "Jul -> juli"
- "Aug -> aug"
- "Sep -> sept"
- "Okt -> okt"
- "Nov -> nov"
- "Dec -> dec"
- "Mon -> ma"
- "Tue -> di"
- "Wed -> wo"
- "Thu -> do"
- "Fri -> vrij"
- "Sat -> zat"
- "Sun -> zon"
select:
- platform: modbus_controller
modbus_controller_id: brink
id: modbus_controller_mode
name: "Modbus Control Mode"
address: 8000
value_type: S_WORD
optionsmap:
"Device LCD": 0
"Modbus Step": 1
"Modbus Flow": 2
- platform: modbus_controller
modbus_controller_id: brink
name: "Bypass Mode"
address: 6100
value_type: S_WORD
optionsmap:
"Auto": 0
"Dicht": 1
"Open": 2
- platform: modbus_controller
modbus_controller_id: brink
name: "Bypass Boost fan stand"
address: 6105
value_type: S_WORD
optionsmap:
"Vakantie": 0
"Stand 1": 1
"Stand 2": 2
"Stand 3": 3
switch:
- platform: modbus_controller
modbus_controller_id: brink
name: "Bypass Boost"
register_type: holding
address: 6104
bitmask: 1
entity_category: config
icon: "mdi:toggle-switch"
- platform: modbus_controller
modbus_controller_id: brink
name: "Vochtsensor"
id: rht_sensor
register_type: holding
address: 6140
bitmask: 1
entity_category: config
icon: "mdi:toggle-switch"
- platform: modbus_controller
modbus_controller_id: brink
id: reset_filter
name: "Reset Filter"
register_type: holding
address: 8010
bitmask: 1
icon: "mdi:toggle-switch"
disabled_by_default: true
button:
- platform: template
name: "Filter reset"
on_press:
then:
- switch.turn_on: reset_filter
- delay: 2s
- switch.turn_off: reset_filter
- text_sensor.template.publish:
id: laatste_reset_filter
state: !lambda |-
char str[22];
time_t currTime = id(sntp_time).now().timestamp;
strftime(str, sizeof(str), "%a %d %b %H:%M", localtime(&currTime));
return { str };
number:
- platform: modbus_controller
modbus_controller_id: brink
name: "Ventilatie stand"
id: ventilatie_stand
address: 8001
value_type: S_WORD
min_value: 0
max_value: 3
mode: slider
# Maximum value for Flair 325 is 325m3/h
- platform: modbus_controller
modbus_controller_id: brink
name: "Modbus flow waarde"
id: brink_modbusflow_waarde
register_type: holding
address: 8002
value_type: S_WORD
min_value: 0
max_value: 280
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Flow 1"
id: brink_flow_1
register_type: holding
address: 6001
unit_of_measurement: "m3/h"
value_type: S_WORD
min_value: 50
max_value: 325
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Flow 2"
id: brink_flow_2
register_type: holding
address: 6002
unit_of_measurement: "m3/h"
value_type: S_WORD
min_value: 50
max_value: 325
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Flow 3"
id: brink_flow_3
register_type: holding
address: 6003
unit_of_measurement: "m3/h"
value_type: S_WORD
min_value: 50
max_value: 325
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Fan Onbalans Inlaat"
id: brink_onbalans_inlaat
address: 6035
unit_of_measurement: "%"
value_type: S_WORD
multiply: 10
min_value: -15
max_value: 15
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Fan Onbalans Uitlaat"
id: brink_onbalans_uitlaat
address: 6036
unit_of_measurement: "%"
value_type: S_WORD
multiply: 10
min_value: -15
max_value: 15
mode: slider
- platform: modbus_controller
modbus_controller_id: brink
name: "Dagen filter wissel"
id: brink_dagen_filter_wissel
register_type: holding
address: 6120
unit_of_measurement: ""
value_type: S_WORD
min_value: 0
max_value: 365
mode: slider