/
ivt490.yaml
342 lines (285 loc) · 7.65 KB
/
ivt490.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
esphome:
name: ivt490
friendly_name: ESPHome IVT490Ctrl
platform: ESP8266
board: d1_mini
includes:
- custom_ivt_reader.h
- CustomDigipotOutput.h
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "IVT490 Fallback Hotspot"
password: "OzrNk8AzQXoQ"
# Enable fallback hotspot (captive portal) in case wifi connection fails
captive_portal:
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "LpZgUE6QuvCDKvMHHPhCdQcoO/CMk9d39IV3VUb7MNB="
services:
- service: control_pot
variables:
level: float
then:
- number.set:
id: digipot_level
value: !lambda "return level * 100;"
number:
- platform: template
name: "Temp level"
id: digipot_level
optimistic: true
min_value: 0
max_value: 100
initial_value: 0
step: 1
mode: slider
on_value:
then:
- output.set_level:
id: boiler_digipot
level: !lambda "return x / 100.0;"
ota:
web_server:
port: 80
# UART settings for IVT RX connection (required)
uart:
id: uart_bus
tx_pin: TX # not used (unstrapped on the VPmon board)
rx_pin: RX # hardware dependant
rx_buffer_size: 512
baud_rate: 9600
debug:
# SPI Connection to the resistor device
# CS GPIO16
spi:
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
output:
- platform: custom
type: float
lambda: |-
auto custom_digipot_output = new CustomDigipotOutput();
App.register_component(custom_digipot_output);
return {custom_digipot_output};
outputs:
id: boiler_digipot
button:
- platform: template
name: Temp PLUS
id: digipot_plus
on_press:
- logger.log: Button PLUS Pressed
- number.set:
id: digipot_level
value: !lambda "return id(digipot_level).state+1;"
- platform: template
name: Temp MINUS
id: digipot_minus
on_press:
- logger.log: Button MINUS Pressed
- number.set:
id: digipot_level
value: !lambda "return id(digipot_level).state-1;"
- platform: template
name: Temp SETLOW
id: digipot_setlow
on_press:
- logger.log: Button LOW Pressed
- number.set:
id: digipot_level
value: !lambda "return 30;"
- platform: template
name: Temp SETHIGH
id: digipot_sethigh
on_press:
- logger.log: Button HIGH Pressed
- number.set:
id: digipot_level
value: !lambda "return 70;"
# Example configuration entry
switch:
- platform: gpio
pin: GPIO02
id: led_switch
name: "Led Switch"
icon: "mdi:gate"
- platform: gpio
pin: GPIO0
id: ext_int
name: "ext_int"
icon: "mdi:gate"
sensor:
- name: "ivt framlednings temp"
platform: template
id: ivtFramledning
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Ute temp"
platform: template
id: ivtUte
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Tappvarmvatten Topp temp"
platform: template
id: ivtTappvarmvattenTopp
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Varmvatten Mitt temp"
platform: template
id: ivtVarmvattenMitt
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Varmevatten Botten temp"
platform: template
id: ivtVarmevattenBotten
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Rums temp"
platform: template
id: ivtRumstemp
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivtHetgas temp"
platform: template
id: ivtHetgas
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Extra Acc-Tank temp"
platform: template
id: ivtExtraAccTank
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt Tryckvakt"
platform: template
id: ivtTryckvakt
lambda: "return {};"
- name: "ivt Högtryck"
platform: template
id: ivtHogtryck
lambda: "return {};"
- name: "ivt Lågtryck"
platform: template
id: ivtLogtryck
lambda: "return {};"
- name: "ivt Semester aktiv"
platform: template
id: ivtSemesteraktiv
lambda: "return {};"
- name: "ivt Kompressor aktiv"
platform: template
id: ivtKompressoraktiv
lambda: "return {};"
- name: "ivt SV1 Öppna"
platform: template
id: ivtSV1Oppna
lambda: "return {};"
- name: "ivt SV1 Stäng"
platform: template
id: ivtSV1Stang
lambda: "return {};"
- name: "ivt P1 Rad"
platform: template
id: ivtP1Rad
lambda: "return {};"
- name: "ivt Fläkt"
platform: template
id: ivtFlakt
lambda: "return {};"
- name: "ivt Larm aktiv"
platform: template
id: ivtLarmaktiv
lambda: "return {};"
- name: "ivt Extern P2 "
platform: template
id: ivtExternP2
lambda: "return {};"
- name: "ivt LLT GT1 temp"
platform: template
id: ivtLLTGT1
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt LL GT1 temp"
platform: template
id: ivtLLGT1
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt BV GT1 temp"
platform: template
id: ivtBVGT1
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt UL GT1 temp"
platform: template
id: ivtULGT1
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt LLT GT3:2 temp"
platform: template
id: ivtLLGT3_2
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt ULT GT3:2 temp"
platform: template
id: ivtULTGT3_2
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt UL GT3:2 temp"
platform: template
id: ivtULGT3_2
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt LL GT3:3 temp"
platform: template
id: ivtLLGT3_3
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt BV GT3:3 temp"
platform: template
id: ivtBVGT3_3
unit_of_measurement: "°C"
lambda: "return {};"
- name: "ivt SV3 BV Förskj"
platform: template
id: ivtSV3BVForskj
lambda: "return {};"
- name: "ivt Effekt ink vit VV behov"
platform: template
id: ivtEffektinkvitVVbehov
lambda: "return {};"
- name: "ivt Tillskotstimer VV behov"
platform: template
id: ivtTillskotstimerVVbehov
lambda: "return {};"
- name: "ivt Tappv prio"
platform: template
id: ivtTappvprio
lambda: "return {};"
- name: "ivt Tillskott i 10"
platform: template
id: ivtTillskotti10
lambda: "return {};"
- name: "ivt Tillskott RAD"
platform: template
id: ivtTillskottRAD
lambda: "return {};"
- name: "ivt Tillskott Tillägg"
platform: template
id: ivtTillskottTillagg
lambda: "return {};"
- name: "ivt Default SV2 Open"
platform: template
id: ivtDefaultSV2Open
lambda: "return {};"
custom_component:
- lambda: |-
auto my_Ivt495Twin = new Ivt495Twin(id(uart_bus),id(ivtFramledning),id(ivtUte),id(ivtTappvarmvattenTopp),id(ivtVarmvattenMitt),id(ivtVarmevattenBotten),id(ivtRumstemp),id(ivtHetgas),id(ivtExtraAccTank),id(ivtTryckvakt),id(ivtHogtryck),id(ivtLogtryck),id(ivtSemesteraktiv),id(ivtKompressoraktiv),id(ivtSV1Oppna),id(ivtSV1Stang),id(ivtP1Rad),id(ivtFlakt),id(ivtLarmaktiv),id(ivtExternP2),id(ivtLLTGT1),id(ivtLLGT1),id(ivtBVGT1),id(ivtULGT1),id(ivtLLGT3_2),id(ivtULTGT3_2),id(ivtULGT3_2),id(ivtLLGT3_3),id(ivtBVGT3_3),id(ivtSV3BVForskj),id(ivtEffektinkvitVVbehov),id(ivtTillskotstimerVVbehov),id(ivtTappvprio),id(ivtTillskotti10),id(ivtTillskottRAD),id(ivtTillskottTillagg),id(ivtDefaultSV2Open));
App.register_component(my_Ivt495Twin);
return {my_Ivt495Twin};