forked from Egyras/HeishaMon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
heishamon.yaml
647 lines (573 loc) · 18 KB
/
heishamon.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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
################################################################
## Packages / Heishamon
################################################################
################################################################
## Changelog
################################################################
##
## 1.0.0 (08-01-2020)
## Added
## - Initial version
##
## 1.1.0 (10-01-2020)
## Added
## - Added power switch and Fan RPM sensors
##
## 1.2.0 (17-05-2020)
## Fixed
## - New/changed topics
# Automations #
###############
automation:
#Fetches quiet level from status and sets the selector accordingly
- alias: Set quiet level selector
trigger:
platform: mqtt
topic: "panasonic_heat_pump/sdc/Quiet_Mode_Level"
action:
service: input_select.select_option
data_template:
entity_id: input_select.heishamon_quietmode
option: >-
{%- if trigger.payload == "0" -%}
Off
{%- else -%}
{{ trigger.payload }}
{%- endif -%}
#Sets quiet level to the selected value
- alias: Set quiet level
trigger:
platform: state
entity_id: input_select.heishamon_quietmode
action:
service: mqtt.publish
data_template:
topic: panasonic_heat_pump/SetQuietMode
retain: false #IMPORTANT! ALWAYS set retain flag false for commands!
payload_template: >-
{%- if states('input_select.heishamon_quietmode') == "Off" -%}
0
{%- else -%}
{{ states('input_select.heishamon_quietmode') }}
{%- endif -%}
#Fetches powerful level from status and sets the selector accordingly
- alias: Set powerful level selector
trigger:
platform: mqtt
topic: "panasonic_heat_pump/sdc/Powerful_Mode_Time"
action:
service: input_select.select_option
data_template:
entity_id: input_select.heishamon_powermode
option: >-
{%- if trigger.payload == "0" -%}
Off
{%- else -%}
{{ (trigger.payload | int) * 30 }} min
{%- endif -%}
#Sets powerful level to the selected value
- alias: Set powerful level
trigger:
platform: state
entity_id: input_select.heishamon_powermode
action:
service: mqtt.publish
data_template:
topic: panasonic_heat_pump/SetPowerfulMode
retain: false #IMPORTANT! ALWAYS set retain flag false for commands!
payload_template: >-
{%- if states('input_select.heishamon_powermode') == "Off" -%}
0
{%- else -%}
{{ "%.0f" % ((states('input_select.heishamon_powermode') | replace("min", "") | int) / 30) }}
{%- endif -%}
#Fetches heatmode from status and sets the selector accordingly
- alias: Set heatmode selector
trigger:
platform: mqtt
topic: "panasonic_heat_pump/sdc/Operating_Mode_State"
action:
service: input_select.select_option
data_template:
entity_id: input_select.heishamon_heatmode
option: >-
{%- if trigger.payload == "0" -%}
Heat
{%- elif trigger.payload == "3" -%}
DHW
{%- elif trigger.payload == "4" -%}
Heat+DHW
{%- endif -%}
#Sets heatmode to the selected value
- alias: Set heatmode
trigger:
platform: state
entity_id: input_select.heishamon_heatmode
action:
service: mqtt.publish
data_template:
topic: panasonic_heat_pump/SetOperationMode
retain: false #IMPORTANT! ALWAYS set retain flag false for commands!
payload_template: >-
{%- if states('input_select.heishamon_heatmode') == "Heat" -%}
0
{%- elif states('input_select.heishamon_heatmode') == "DHW" -%}
3
{%- elif states('input_select.heishamon_heatmode') == "Heat+DHW" -%}
4
{%- endif -%}
#Fetches heatshift temperature from status and sets the selector accordingly
- alias: Set heatshift selector
trigger:
platform: mqtt
topic: "panasonic_heat_pump/sdc/Z1_Heat_Request_Temp"
action:
service: input_number.set_value
data_template:
entity_id: input_number.heishamon_heatshift
value: >-
{{ "%.1f" % (trigger.payload | int) }}
#Sets heatshift temperature to the selected value
- alias: Set heatshift
trigger:
platform: state
entity_id: input_number.heishamon_heatshift
action:
service: mqtt.publish
data_template:
topic: panasonic_heat_pump/SetZ1HeatRequestTemperature
retain: false #IMPORTANT! ALWAYS set retain flag false for commands!
payload_template: >-
{{ "%.0f" % (states('input_number.heishamon_heatshift') | int) }}
#Fetches tank target temperature from status and sets the selector accordingly
- alias: Set tank target temperature selector
trigger:
platform: mqtt
topic: "panasonic_heat_pump/sdc/DHW_Target_Temp"
action:
service: input_number.set_value
data_template:
entity_id: input_number.heishamon_tank_temp
value: >-
{{ "%.1f" % (trigger.payload | int) }}
#Sets tank target temperature to the selected value
- alias: Set tank target temperature
trigger:
platform: state
entity_id: input_number.heishamon_tank_temp
action:
service: mqtt.publish
data_template:
topic: panasonic_heat_pump/SetDHWTemp
retain: false #IMPORTANT! ALWAYS set retain flag false for commands!
payload_template: >-
{{ "%.0f" % (states('input_number.heishamon_tank_temp') | int) }}
# input_number #
################
input_number:
heishamon_tank_temp:
name: Set Tank Temperature
min: 40
max: 75
step: 1
heishamon_heatshift:
name: Set Heatshift Temperature
min: -5
max: 5
step: 1
# input_select #
################
input_select:
heishamon_quietmode:
name: Set Quiet Mode
options:
- 'Off'
- 1
- 2
- 3
heishamon_powermode:
name: Set Powerful Mode
options:
- 'Off'
- 30 min
- 60 min
- 90 min
heishamon_heatmode:
name: Set Heat Mode
options:
- Heat+DHW
- Heat
- DHW
# sensor #
##########
sensor:
#TOP0 - Power state
- platform: mqtt
name: Aquarea Power State
state_topic: "panasonic_heat_pump/sdc/Heatpump_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP1 - Pumpflow
- platform: mqtt
name: Aquarea Pump Flow
state_topic: "panasonic_heat_pump/sdc/Pump_Flow"
unit_of_measurement: 'L/min'
#TOP2 - Force DHW
- platform: mqtt
name: Aquarea Force DHW Mode
state_topic: "panasonic_heat_pump/sdc/Force_DHW_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP4 - Heat mode (Hot water, Heat or Hot water + heat)
- platform: mqtt
name: Aquarea Mode
state_topic: "panasonic_heat_pump/sdc/Operating_Mode_State"
value_template: >-
{%- if value == "0" -%}
Heat
{%- elif value == "1" -%}
Cool
{%- elif value == "2" -%}
Auto
{%- elif value == "3" -%}
DHW
{%- elif value == "4" -%}
Heat+DHW
{%- elif value == "5" -%}
Cool+DHW
{%- elif value == "6" -%}
Auto+DHW
{%- endif -%}
#TOP5 - Water inlet temp
- platform: mqtt
name: Aquarea Inlet Temperature
state_topic: "panasonic_heat_pump/sdc/Main_Inlet_Temp"
unit_of_measurement: '°C'
#TOP6 - Water outlet temp
- platform: mqtt
name: Aquarea Outlet Temperature
state_topic: "panasonic_heat_pump/sdc/Main_Outlet_Temp"
unit_of_measurement: '°C'
#TOP7 - Water outlet target temp
- platform: mqtt
name: Aquarea Outlet Target Temperature
state_topic: "panasonic_heat_pump/sdc/Main_Target_Temp"
unit_of_measurement: '°C'
#TOP8 - Compressor frequency
- platform: mqtt
name: Aquarea Compressor Frequency
state_topic: "panasonic_heat_pump/sdc/Compressor_Freq"
unit_of_measurement: 'Hz'
#TOP9 - Tank set temperature
- platform: mqtt
name: Aquarea Tank Set Temperature
state_topic: "panasonic_heat_pump/sdc/DHW_Target_Temp"
unit_of_measurement: '°C'
#TOP10 - Tank current temperature
- platform: mqtt
name: Aquarea Actual Tank Temperature
state_topic: "panasonic_heat_pump/sdc/DHW_Temp"
unit_of_measurement: '°C'
#TOP11 - Compressor Operating Time
- platform: mqtt
name: Aquarea Compressor Operating Hours
state_topic: "panasonic_heat_pump/sdc/Operations_Hours"
unit_of_measurement: 'Hours'
#TOP12 - Compressor On/Off cycle number
- platform: mqtt
name: Aquarea Compressor Start/Stop Counter
state_topic: "panasonic_heat_pump/sdc/Operations_Counter"
#TOP14 - Outdoor unit ambient temperature
- platform: mqtt
name: Aquarea Outdoor Ambient
state_topic: "panasonic_heat_pump/sdc/Outside_Temp"
unit_of_measurement: '°C'
#TOP15 - Heating power produced
- platform: mqtt
name: Aquarea Power Produced
state_topic: "panasonic_heat_pump/sdc/Heat_Energy_Production"
unit_of_measurement: 'W'
#TOP16 - Heating power consumed
- platform: mqtt
name: Aquarea Power Consumed
state_topic: "panasonic_heat_pump/sdc/Heat_Energy_Consumption"
unit_of_measurement: 'W'
#TOP17 - Heating powerful mode
- platform: mqtt
name: Aquarea Powerful Mode
state_topic: "panasonic_heat_pump/sdc/Powerful_Mode_Time"
unit_of_measurement: 'Min'
value_template: >-
{{ (value | int) * 30 }}
#TOP18 - Heating quiet mode
- platform: mqtt
name: Aquarea Quiet Mode
state_topic: "panasonic_heat_pump/sdc/Quiet_Mode_Level"
value_template: >-
{%- if value == "4" -%}
Scheduled
{%- elif value == "0" -%}
Off
{%- else -%}
{{ value }}
{%- endif -%}
#TOP19 - Holiday Mode
- platform: mqtt
name: Aquarea Holiday Mode
state_topic: "panasonic_heat_pump/sdc/Holiday_Mode_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP20 - 3-way valve state
- platform: mqtt
name: Aquarea 3-way Valve
state_topic: "panasonic_heat_pump/sdc/ThreeWay_Valve_State"
value_template: >-
{%- if value == "0" -%}
Room
{%- elif value == "1" -%}
Tank
{%- endif -%}
#TOP21 - Outside pipe temp
- platform: mqtt
name: Aquarea Outdoor Pipe Temperature
state_topic: "panasonic_heat_pump/sdc/Outside_Pipe_Temp"
unit_of_measurement: '°C'
#TOP26 - Defrost state
- platform: mqtt
name: Aquarea Defrost State
state_topic: "panasonic_heat_pump/sdc/Defrosting_State"
value_template: >-
{%- if value == "0" -%}
Inactive
{%- elif value == "1" -%}
Active
{%- endif -%}
#TOP27 - Heatshift Temperature
- platform: mqtt
name: Aquarea Heatshift Temperature
state_topic: "panasonic_heat_pump/sdc/Z1_Heat_Request_Temp"
unit_of_measurement: '°C'
#TOP40 - DHW power produced
- platform: mqtt
name: Aquarea DHW Power Produced
state_topic: "panasonic_heat_pump/sdc/DHW_Energy_Production"
unit_of_measurement: 'W'
#TOP41 - DHW power consumed
- platform: mqtt
name: Aquarea DHW Power Consumed
state_topic: "panasonic_heat_pump/sdc/DHW_Energy_Consumption"
unit_of_measurement: 'W'
#TOP44 - Last active error
- platform: mqtt
name: Aquarea Last Error
state_topic: "panasonic_heat_pump/sdc/Error"
#TOP49 - Main HEX Outlet temp
- platform: mqtt
name: Aquarea Main HEX Outlet Temperature
state_topic: "panasonic_heat_pump/sdc/Main_Hex_Outlet_Temp"
unit_of_measurement: '°C'
#TOP50 - Discharge temp
- platform: mqtt
name: Aquarea Discharge Temperature
state_topic: "panasonic_heat_pump/sdc/Discharge_Temp"
unit_of_measurement: '°C'
#TOP51 - Inside Pipe temp
- platform: mqtt
name: Aquarea Inside Pipe Temperature
state_topic: "panasonic_heat_pump/sdc/Inside_Pipe_Temp"
unit_of_measurement: '°C'
#TOP52 - Defrost temp
- platform: mqtt
name: Aquarea Defrost Temperature
state_topic: "panasonic_heat_pump/sdc/Defrost_Temp"
unit_of_measurement: '°C'
#TOP53 - Eva Outlet temp
- platform: mqtt
name: Aquarea Eva Outlet Temperature
state_topic: "panasonic_heat_pump/sdc/Eva_Outlet_Temp"
unit_of_measurement: '°C'
#TOP54 - Bypass Outlet temp
- platform: mqtt
name: Aquarea Bypass Outlet Temperature
state_topic: "panasonic_heat_pump/sdc/Bypass_Outlet_Temp"
unit_of_measurement: '°C'
#TOP55 - lpm temp
- platform: mqtt
name: Aquarea Ipm Temperature
state_topic: "panasonic_heat_pump/sdc/Ipm_Temp"
unit_of_measurement: '°C'
#TOP58 - Tank electric heater allowed state
- platform: mqtt
name: Aquarea Tank Heater Enabled
state_topic: "panasonic_heat_pump/sdc/DHW_Heater_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP59 - Water electric heater allowed state
- platform: mqtt
name: Aquarea Room Heater Enabled
state_topic: "panasonic_heat_pump/sdc/Room_Heater_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP60 - Internal heater state
- platform: mqtt
name: Aquarea Internal Heater State
state_topic: "panasonic_heat_pump/sdc/Internal_Heater_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP61 - External heater state
- platform: mqtt
name: Aquarea External Heater State
state_topic: "panasonic_heat_pump/sdc/External_Heater_State"
value_template: >-
{%- if value == "0" -%}
Off
{%- elif value == "1" -%}
On
{%- endif -%}
#TOP62 - Fan1 speed
- platform: mqtt
name: Aquarea Fan 1 Speed
state_topic: "panasonic_heat_pump/sdc/Fan1_Motor_Speed"
unit_of_measurement: "R/min"
#TOP63 - Fan2 speed
- platform: mqtt
name: Aquarea Fan 2 Speed
state_topic: "panasonic_heat_pump/sdc/Fan2_Motor_Speed"
unit_of_measurement: "R/min"
#TOP64 - High pressure
- platform: mqtt
name: Aquarea High pressure
state_topic: "panasonic_heat_pump/sdc/High_Pressure"
unit_of_measurement: "Kgf/cm2"
#TOP65 - Pump speed
- platform: mqtt
name: Aquarea Pump Speed
state_topic: "panasonic_heat_pump/sdc/Pump_Speed"
unit_of_measurement: "R/min"
#TOP66 - Low pressure
- platform: mqtt
name: Aquarea Low pressure
state_topic: "panasonic_heat_pump/sdc/Low_Pressure"
unit_of_measurement: "Kgf/cm2"
#TOP66 - Compressor Current
- platform: mqtt
name: Aquarea Compressor Current
state_topic: "panasonic_heat_pump/sdc/Compressor_Current"
unit_of_measurement: "A"
##1-Wire - Example, replace with correct sensor ID
#- platform: mqtt
# name: 1-wire sensor temperature
# state_topic: "panasonic_heat_pump/1wire/1234567890abcdef"
# unit_of_measurement: '°C'
# value_template: '{{value | round(1) }}'
# The following S0 topics are only available if S0 is enabled.
#
#S0 kWh Meter 1 - Assumed to measure the heat pump consumption
- platform: mqtt
name: Aquarea Metered Power Consumption
state_topic: "panasonic_heat_pump/s0/Watt/1"
unit_of_measurement: 'W'
- platform: mqtt
name: Aquarea Metered Power Consumption Total
state_topic: "panasonit_heat_pump/s0/Watthour/1"
unit_of_measurement: 'kWh'
#S0 kWh Meter 2 - Assumed to measure the backup heater consumption
- platform: mqtt
name: Aquarea Metered Backup Heater Power Consumption
state_topic: "panasonic_heat_pump/s0/Watt/2"
unit_of_measurement: 'W'
- platform: mqtt
name: Aquarea Metered Backup Heater Power Consumption Total
state_topic: "panasonit_heat_pump/s0/Watthour/2"
unit_of_measurement: 'kWh'
#### SENSORS BELOW ARE NOT IN FIRMWARE ####
#COP Calculations
- platform: template
sensors:
heishamon_cop:
friendly_name: "Aquarea COP"
unit_of_measurement: "x"
value_template: >-
{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
{%- if states('sensor.heishamon_w_consumption') > "0" -%}
{{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
{%- else -%}
0.0
{%- endif -%}
{%- else -%}
n/a
{%- endif -%}
#Energy use/production
- platform: template
sensors:
heishamon_w_production:
friendly_name: "Aquarea Energy Production"
unit_of_measurement: 'W'
value_template: >-
{%- if states('sensor.aquarea_dhw_power_produced') != "0" -%}
{{ states('sensor.aquarea_dhw_power_produced') }}
{%- else -%}
{{ states('sensor.aquarea_power_produced') }}
{%- endif -%}
heishamon_w_consumption:
friendly_name: "Aquarea Energy Consumption"
unit_of_measurement: 'W'
value_template: >-
{%- if states('sensor.aquarea_dhw_power_consumed') != "0" -%}
{{ states('sensor.aquarea_dhw_power_consumed') }}
{%- else -%}
{{ states('sensor.aquarea_power_consumed') }}
{%- endif -%}
# switch #
##########
switch:
#Turn on/off holiday mode
- platform: mqtt
name: Aquarea Holiday Mode
command_topic: "panasonic_heat_pump/SetHolidayMode"
state_topic: "panasonic_heat_pump/sdc/Holiday_Mode_State"
qos: 0
payload_on: "1"
payload_off: "0"
retain: false
#Turn on/off heatpump
- platform: mqtt
name: Aquarea Main Power
command_topic: "panasonic_heat_pump/SetHeatpump"
state_topic: "panasonic_heat_pump/sdc/Heatpump_State"
qos: 0
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: Aquarea Force DHW Mode
command_topic: "panasonic_heat_pump/SetForceDHW"
state_topic: "panasonic_heat_pump/sdc/Force_DHW_State"
qos: 0
payload_on: "1"
payload_off: "0"
retain: false