Ja dit is gelukt @
feelthepower
Allereerst moet je de hru 400 verbinden met Home Assistant. Ik heb dit bekabeld gedaan met een UTP kabel waarvan ik 2 draden gebruik. Dit moet je aansluiten op een rs485 usb adapter, zoals deze:
https://www.hobbyelectron...-seriele-communicatie-usb
Dit is mijn modbus.yaml
code:
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
| type: serial
name: hru400
method: rtu
port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
#port: /dev/ttyUSB0
baudrate: 19200
stopbits: 1
bytesize: 8
parity: E
sensors:
- name: bypassposition
unit_of_measurement: steps
slave: 72
address: 2032
state_class: measurement
data_type: uint16
- name: volumefrostrelease
unit_of_measurement: m3/h
slave: 72
address: 3040
state_class: measurement
data_type: uint16
- name: volumefromoutside
unit_of_measurement: m3/h
slave: 72
address: 3030
state_class: measurement
data_type: uint16
- name: highest percentage supply in automodus
unit_of_measurement: "%"
slave: 72
address: 3000
state_class: measurement
data_type: uint16
- name: highest percentage demand in auto modus
unit_of_measurement: "%"
slave: 72
address: 3001
state_class: measurement
data_type: uint16
- name: volumetooutside
unit_of_measurement: m3/h
slave: 72
address: 3080
state_class: measurement
data_type: uint16
- name: temperaturetobuilding
unit_of_measurement: °C
slave: 72
address: 3062
state_class: measurement
data_type: int16
scale: 0.1
precision: 2
- name: temperaturefrombuilding
unit_of_measurement: °C
slave: 72
address: 3072
state_class: measurement
data_type: int16
scale: 0.1
precision: 2
- name: temperaturemixed
unit_of_measurement: °C
slave: 72
address: 3052
state_class: measurement
data_type: int16
scale: 0.1
precision: 2
- name: temperaturefromoutside
unit_of_measurement: °C
slave: 72
address: 3032
state_class: measurement
data_type: int16
precision: 2
scale: 0.1
- name: temperaturetooutside
unit_of_measurement: °C
slave: 72
address: 3082
state_class: measurement
data_type: int16
scale: 0.1
precision: 2
- name: rvtobuilding
unit_of_measurement: "%"
slave: 72
address: 3063
state_class: measurement
data_type: uint16
precision: 2
- name: rvfromobuilding
unit_of_measurement: "%"
slave: 72
address: 3073
state_class: measurement
data_type: uint16
precision: 2
- name: rvmixed
unit_of_measurement: "%"
slave: 72
address: 3053
state_class: measurement
data_type: int16
precision: 2
- name: unbalanced_flow_zone1
unit_of_measurement: m3/h
slave: 72
address: 3200
state_class: measurement
data_type: int16
- name: unbalanced_flow_zone2
unit_of_measurement: m3/h
slave: 72
address: 3201
state_class: measurement
data_type: int16
- name: unbalanced_flow_zone3
unit_of_measurement: m3/h
slave: 72
address: 3202
state_class: measurement
data_type: int16
- name: unbalanced_flow_zone4
unit_of_measurement: m3/h
slave: 72
address: 3203
state_class: measurement
data_type: int16
- name: highestco2
unit_of_measurement: ppm
slave: 72
address: 3011
state_class: measurement
data_type: int16 |
En dit de scrips.yaml voor het aansturen van de HRU:
code:
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
| unbalanced_flow_zone1_update:
alias: Unbalanced Flow Zone 1 Update
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2210
value:
- '{{ states.input_number.unbalanced_flow_zone1.state | int }}'
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2211
value:
- 1
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone1
mode: single
unbalanced_flow_zone2_update:
alias: Unbalanced Flow Zone 2 Update
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2212
value:
- '{{ states.input_number.unbalanced_flow_zone2.state | int }}'
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2213
value:
- 1
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone2
mode: single
unbalanced_flow_zone3_update:
alias: Unbalanced Flow Zone 3 Update
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2214
value:
- '{{ states.input_number.unbalanced_flow_zone3.state | int }}'
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2215
value:
- 1
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone3
mode: single
unbalanced_flow_zone4_update:
alias: Unbalanced Flow Zone 4 Update
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2216
value:
- '{{ states.input_number.unbalanced_flow_zone4.state | int }}'
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2217
value:
- 1
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone4
mode: single
bypass_open:
alias: Open bypass
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2032
value:
- 0
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2033
value:
- 1
- service: input_boolean.turn_on
target:
entity_id: input_boolean.ventilation_bypass
mode: single
bypass_close:
alias: Close bypass
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2032
value:
- 550
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2033
value:
- 1
- service: input_boolean.turn_off
target:
entity_id: input_boolean.ventilation_bypass
mode: single
set_bathroom_humidity_percentage:
alias: Set bathroom humidity percentage
sequence:
- service: input_number.set_value
entity_id: input_number.humidity_bathroom_in_15sec
data_template:
value: >-
{% set c = states('sensor.highest_humidity_wet_zone') | float %}
{% set p = states('input_number.previous_15sec_humidity_bathroom') | float %}
{{ (c - p) | round (2) }}
mode: single
zone1_on:
alias: Zone 1 on
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2211
value:
- 1
mode: single
zone1_off:
alias: Zone 1 off
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2211
value:
- 0
mode: single
zone2_on:
alias: Zone 2 on
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2213
value:
- 1
mode: single
zone2_off:
alias: Zone 2 off
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2213
value:
- 0
mode: single
zone3_on:
alias: Zone 3 on
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2215
value:
- 1
mode: single
zone3_off:
alias: Zone 3 off
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2215
value:
- 0
mode: single
zone4_on:
alias: Zone 4 on
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2217
value:
- 1
mode: single
zone4_off:
alias: Zone 4 off
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2217
value:
- 0
mode: single
bypass_off:
alias: Bypass off
sequence:
- service: modbus.write_register
data_template:
hub: hru400
unit: 72
address: 2033
value:
- 0
mode: single |
En in configuration.yaml zet je de inputs
code:
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
| input_number:
unbalanced_flow_zone1:
name: Woonzone
min: 15
max: 270
step: 1
unit_of_measurement: m3/h
unbalanced_flow_zone2:
name: Slaap zone
min: 20
max: 130
step: 1
unit_of_measurement: m3/h
unbalanced_flow_zone3:
name: Natte zone
min: 20
max: 238
step: 1
unit_of_measurement: m3/h
unbalanced_flow_zone4:
name: Kookzone
min: 20
max: 115
step: 1
unit_of_measurement: m3/h
input_boolean:
zone1:
name: Woonzone
zone2:
name: Slaapzone
zone3:
name: Natte zone
zone4:
name: Kookzone
zone3_activate_humidity:
name: Natte Zone geactiveerd Luchtvochtigheid
zone3_off_started:
name: Natte zone wordt uitgeschakeld |
En dan heb je nog een reeks automations nodig
code:
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
| id: '1642608589831'
alias: Slider Set Unbalanced Flow Zone 1
description: ''
trigger:
- platform: state
entity_id: input_number.unbalanced_flow_zone1
condition:
- condition: template
value_template: '{{ states(''sensor.unbalanced_flow_zone1'') != states(''input_number.unbalanced_flow_zone1'')
}}'
action:
- service: script.unbalanced_flow_zone1_update
mode: single
- id: '1642608821061'
alias: Slider Get Unbalanced Flow Zone 1
description: ''
trigger:
- platform: time_pattern
minutes: '2'
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.unbalanced_flow_zone1
value: '{{states.sensor.unbalanced_flow_zone1.state | int}}'
mode: single
- id: '1642625239725'
alias: Slider Set Unbalanced Flow Zone 4
description: ''
trigger:
- platform: state
entity_id: input_number.unbalanced_flow_zone4
condition:
- condition: and
conditions:
- condition: template
value_template: '{{ states(''sensor.unbalanced_flow_zone4'') != states(''input_number.unbalanced_flow_zone4'')
}}'
- condition: state
entity_id: input_boolean.zone4
state: 'on'
action:
- service: script.unbalanced_flow_zone4_update
mode: single
- id: '1642626412843'
alias: Slider Set Unbalanced Flow Zone 3
description: ''
trigger:
- platform: state
entity_id: input_number.unbalanced_flow_zone3
condition:
- condition: and
conditions:
- condition: template
value_template: '{{ states(''sensor.unbalanced_flow_zone3'') != states(''input_number.unbalanced_flow_zone3'')
}}'
action:
- service: script.unbalanced_flow_zone3_update
data: {}
mode: single
- id: '1642626435593'
alias: Slider Set Unbalanced Flow Zone 2
description: ''
trigger:
- platform: state
entity_id: input_number.unbalanced_flow_zone2
condition:
- condition: template
value_template: '{{ states(''sensor.unbalanced_flow_zone2'') != states(''input_number.unbalanced_flow_zone2'')
}}'
action:
- service: script.unbalanced_flow_zone2_update
mode: single
- id: '1642626555755'
alias: Slider Get Unbalanced Flow Zone 2
description: ''
trigger:
- platform: time_pattern
minutes: '2'
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.unbalanced_flow_zone2
value: '{{states.sensor.unbalanced_flow_zone2.state | int}}'
mode: single
- id: '1642626574014'
alias: Slider Get Unbalanced Flow Zone 3
description: ''
trigger:
- platform: time_pattern
minutes: '2'
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.unbalanced_flow_zone3
value: '{{states.sensor.unbalanced_flow_zone3.state | int}}'
mode: single
- id: '1642626591573'
alias: Slider Get Unbalanced Flow Zone 4
description: ''
trigger:
- platform: time_pattern
minutes: '2'
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.unbalanced_flow_zone4
value: '{{states.sensor.unbalanced_flow_zone4.state | int}}'
mode: single
- id: '1642707835496'
alias: Zone 1 toggle on
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone1
to: 'on'
condition: []
action:
- service: script.zone1_on
mode: single
- id: '1642707867361'
alias: Zone 1 toggle off
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone1
to: 'off'
condition: []
action:
- service: script.zone1_off
mode: single
- id: '1642711135228'
alias: Zone 2 toggle off
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone2
to: 'off'
condition: []
action:
- service: script.zone2_off
mode: single
- id: '1642711152749'
alias: Zone 3 toggle off
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone3
to: 'off'
condition: []
action:
- service: script.zone3_off
mode: single
- id: '1642711170310'
alias: Zone 4 toggle off
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone4
to: 'off'
condition: []
action:
- service: script.zone4_off
mode: single
- id: '1642711194457'
alias: Zone 2 toggle on
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone2
to: 'on'
condition: []
action:
- service: script.zone2_on
mode: single
- id: '1642711209000'
alias: Zone 3 toggle on
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone3
to: 'on'
condition: []
action:
- service: script.zone3_on
mode: single
- id: '1642711224357'
alias: Zone 4 toggle on
description: ''
trigger:
- platform: state
entity_id: input_boolean.zone4
to: 'on'
condition: []
action:
- service: script.zone4_on
mode: single
- id: '1642713120533'
alias: Ventilation - Bathroom parents ventilation on for high humidity
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.bathroom_humidity_change_over_20_measurements
above: '6'
condition: []
action:
- service: input_number.set_value
target:
entity_id: input_number.unbalanced_flow_zone3
data:
value: 238
- service: timer.start
data:
duration: 00:15:00
target:
entity_id: timer.switch_off_zone3_timer
mode: single
- id: '1642887386970'
alias: Ventilation - Woonzone constant CO2 - increase flow
description: ''
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: and
conditions:
- condition: numeric_state
above: '800'
entity_id: sensor.highest_co2_livingzone
- condition: numeric_state
entity_id: sensor.unbalanced_flow_zone1
below: '250'
action:
- service: input_number.set_value
target:
entity_id: input_number.unbalanced_flow_zone1
data_template:
value: "{% if ((states('sensor.highest_co2_livingzone') | int) > 900) %}\n {%
if ((states('input_number.unbalanced_flow_zone1') | int) > 240) %}\n 250\n
\ {% else %}\n {{ ((states('input_number.unbalanced_flow_zone1') | int)
+ 30) }}\n {% endif %}\n{% else %}\n {{ ((states('input_number.unbalanced_flow_zone1')
| int) + 5) }}\n{% endif %}\n"
mode: single
- id: '1642917723767'
alias: Ventilation - Woonzone constant CO2 - decrease flow
description: ''
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: and
conditions:
- condition: numeric_state
below: '800'
entity_id: sensor.highest_co2_livingzone
- condition: numeric_state
above: '30'
entity_id: sensor.unbalanced_flow_zone1
action:
- service: input_number.set_value
target:
entity_id: input_number.unbalanced_flow_zone1
data_template:
value: "{% if ((states('sensor.highest_co2_livingzone') | int) < 700) %}\n {{
((states('input_number.unbalanced_flow_zone1') | int) - 30) }}\n{% else %}\n
\ {{ ((states('input_number.unbalanced_flow_zone1') | int) - 10) }}\n{% endif
%}\n"
mode: single
- id: '1642922271328'
alias: Ventilation - Slaapzone constant CO2 - decrease flow
description: ''
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: and
conditions:
- condition: numeric_state
below: '600'
entity_id: sensor.highest_co2_sleepingzone
- condition: numeric_state
above: '30'
entity_id: sensor.unbalanced_flow_zone2
- condition: state
entity_id: input_boolean.zone2
state: 'on'
action:
- service: input_number.set_value
target:
entity_id: input_number.unbalanced_flow_zone2
data_template:
value: "{% if ((states('sensor.highest_co2_sleepingzone') | int) < 500) %}\n
\ {{ ((states('input_number.unbalanced_flow_zone2') | int) - 20) }}\n{% else
%}\n {{ ((states('input_number.unbalanced_flow_zone2') | int) - 5) }}\n{%
endif %}\n"
mode: single
- id: '1642922418314'
alias: Ventilation - Slaapzone constant CO2 - increase flow
description: ''
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: and
conditions:
- condition: numeric_state
above: '700'
entity_id: sensor.highest_co2_sleepingzone
- condition: numeric_state
entity_id: sensor.unbalanced_flow_zone2
below: '130'
- condition: state
entity_id: input_boolean.zone2
state: 'on'
action:
- service: input_number.set_value
target:
entity_id: input_number.unbalanced_flow_zone2
data_template:
value: "{% if ((states('sensor.highest_co2_sleepingzone') | int) > 800) %}\n
\ {% if ((states('input_number.unbalanced_flow_zone2') | int) < 110) %}\n
\ {{ ((states('input_number.unbalanced_flow_zone2') | int) + 20) }}\n {%
else %}\n 130\n {% endif %}\n{% else %}\n {{ ((states('input_number.unbalanced_flow_zone2')
| int) + 5) }}\n{% endif %}\n"
mode: single
- id: '1642938172251' |
Dit was maanden uitzoekwerk. Hopelijk heb je er wat aan.
Ik heb zonekleppen in mijn systeem. Dus ook zones on de config.
Verder heb ik de nrgwatch non cve module om de itho co2 sensors uit te lezen via mqtt, zodat ik zelf volledige controle heb op de HRU 400 aansturing op basis van co2.
https://www.nrgwatch.nl/product/itho-non-cve-wifi-module/
Laat maar weten als je specifieke vragen hebt.
[Voor 104% gewijzigd door maartenvdv737 op 10-01-2023 20:05]
Ik blijf er iig vrij nuchter onder....