forked from nliaudat/floor-heating-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
170 lines (140 loc) · 6.13 KB
/
config.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
# change log
# v103:
# remove rollback function as it cause troubles with cover position status + add device_class: shutter to cover
# v102 :
# add endstop_rollback_percent and enable it in sensor_bemf.yaml + test change endstop cover to feedback cover + better calibration script.
# v101:
# inputs.yaml : add substitution for bemf_trigger values cause bemf_trigger do not survive hassio reboot
# v100:
# climate.yaml : 11.11.2021 : remove away_config (temperature do not survive reboot : https://github.com/esphome/issues/issues/2680#issuecomment-966863690
# V99 :
# divide into packages :https://esphome.io/guides/configuration-types.html#config-substitutions
# V95 :
# default_mode: heat_cool (https://github.com/esphome/issues/issues/2680#issuecomment-966006171)
# V94 :
# substitution for default_target_temperature_low + high
# disable web_server as not needed anymore for debug
# V93 :
# substitution for temperature function (round(((diff_temp+1)/2)/0.1)*0.1;)
# V92 :
# minimum movement of valve 0.01 replaced with number.min_movement_change (if (abs(current_position - target_position) > id(min_movement).state/100) {)
# V91 :
# add timezone substitution
# V90:
# logger sensor + text_sensor + homeassistant.sensor : ERROR
# disable schedule valve_maintenance as it's triggered on reboot once a week
# v89 :
# add check for CLIMATE_MODE_OFF
# add default_mode: auto to thermostat
# v85 :
# Rollback function tested (bug)
# add esp32: routine
# flash_write_interval: 60min
# Substitution for names
# replace check_interval loop in climate.thermostat by interval (or time)
# Number for parameters like BEMF triggers
# One BEMF trigger param per channel
# add idle global variable for thermostat
# Re test pid climate with that parameters for low temperature heating : kp: 30 ki: 0.005 kd: -24000
# Test current_base_cover : done but do not work as expected : endstop triggered as FLT_MAX parameter is reach but FLT_MAX is position. I do not understand.
# for flashing : press boot button for 2-3 seconds before the serial connection initialize
# After OTA update, the EN (reset) button must be pressed to run firmware
# do not use gpio12 (MTDI)
# Heizkreise:
#
# CH1 BAD
# CH2 Medienzimmer Wand
# Ch3 Medienzimmer Tür
# ch4 Wohnzimmer Treppe
# Ch5 Küche
# ch6 Wz Ost
# Ch7 Wz West
# CH8 Gästezimmer
#
substitutions:
name: flhc-v4
friendly_name: "Floor heating"
#must only consist of lowercase characters, the underscorecharacter and numbers. The character '#' cannot be used.
ch1_thermostat_name: bad
ch1_thermostat_sensor: ATC_51C199_Temperature #name of the sensor
#################
# Formula explanation :
#################
# // get info from climate
# float current_temp = id(${ch1_thermostat_name}_thermostat).current_temperature;
# float target_temp_low = id(${ch1_thermostat_name}_thermostat).target_temperature_low;
# float target_temp_high = id(${ch1_thermostat_name}_thermostat).target_temperature_high ;
# float diff_temp = (target_temp_high + target_temp_low)/2 - current_temp;
#
# //arduino map function : return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; in_min=-1;in_max=1;out_min=0;out_max=1
# //simplified => f(x) = (x+1)/2
# //rounded at 0.1 => f(x) = round(((x+1)/2)/0.1)*0.1
# //float target_position = round(((diff_temp+1)/2)/0.1)*0.1;
# float target_position = round(((((id(${ch1_thermostat_name}_thermostat).target_temperature_high + id(${ch1_thermostat_name}_thermostat).target_temperature_low)/2 - id(${ch1_thermostat_name}_thermostat).current_temperature)+1)/2)/0.1)*0.1;
ch2_thermostat_name: me_wand
ch2_thermostat_sensor: ATC_999EC2_Temperature
ch3_thermostat_name: me_tuer
ch3_thermostat_sensor: ATC_BE2C2D_Temperature
ch4_thermostat_name: wz_treppe
ch4_thermostat_sensor: ATC_7E0406_Temperature
ch5_thermostat_name: kueche
ch5_thermostat_sensor: ATC_254DD2_Temperature
ch6_thermostat_name: wz_ost
ch6_thermostat_sensor: ATC_C9FA01_Temperature
ch7_thermostat_name: wz_west
ch7_thermostat_sensor: ATC_06F092_Temperature
ch8_thermostat_name: gaeste
ch8_thermostat_sensor: ATC_E30A6D_Temperature
TZ: "Europe/Berlin" #timezone
ch1_bemf_trigger_open: "0.150"
ch1_bemf_trigger_close: "0.18"
ch2_bemf_trigger_open: "0.150"
ch2_bemf_trigger_close: "0.180"
ch3_bemf_trigger_open: "0.150"
ch3_bemf_trigger_close: "0.180"
ch4_bemf_trigger_open: "0.150"
ch4_bemf_trigger_close: "0.180"
ch5_bemf_trigger_open: "0.150"
ch5_bemf_trigger_close: "0.180"
ch6_bemf_trigger_open: "0.150"
ch6_bemf_trigger_close: "0.180"
ch7_bemf_trigger_open: "0.165"
ch7_bemf_trigger_close: "0.185"
ch8_bemf_trigger_open: "0.165"
ch8_bemf_trigger_close: "0.185"
# PID Parameter github/Technologic values kp=0.05 ki=0,0001 kd=0 ; aktuell update temp ist ca.2,5 min > cycle time 150 sec daher 0,05/(8h*3600s/150s)) 0,00026
pid_kp: "0.06"
pid_ki: "0.00011"
pid_kd: "4.0"
####### NOT recommended to change #######
#all chars exept $
ch1_cover_name: CH1
ch2_cover_name: CH2
ch3_cover_name: CH3
ch4_cover_name: CH4
ch5_cover_name: CH5
ch6_cover_name: CH6
ch7_cover_name: CH7
ch8_cover_name: CH8
packages:
wifi: !include wifi.yaml
board: !include board.yaml
time: !include time.yaml
climate: !include climate.yaml
script_termostat_check: !include script_termostat_check.yaml
script_calibrate_valves: !include script_calibrate_valves.yaml
switch_gpio: !include switch_gpio.yaml
switch_others: !include switch_others.yaml
inputs: !include inputs.yaml
covers: !include covers.yaml
sensor_bemf: !include sensor_bemf.yaml #back electromotive force (back EMF)
sensor_adc: !include sensor_adc.yaml
sensor_temperature: !include sensor_temperature.yaml
sensor_others: !include sensor_others.yaml
web_server:
port: 80
logger:
level: DEBUG
baud_rate: 230400
logs:
adc: DEBUG