forked from rsciriano/ESPHome-OpenTherm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcv-control.yaml
172 lines (171 loc) · 4.58 KB
/
cv-control.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
substitutions:
devicename: CV Control
name: cv-control
ip: 192.168.2.77
gateway: 192.168.2.1
esp32:
board: esp32dev
framework:
type: arduino
esphome:
name: "${name}"
comment: "${ip}"
platformio_options:
lib_deps:
- ihormelnyk/OpenTherm Library @ 1.1.4
includes:
- esphome-opentherm/
wifi:
use_address: ${ip}
manual_ip:
static_ip: ${ip}
gateway: ${gateway}
subnet: 255.255.255.0
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
- ssid: !secret wifi_ssid_2
password: !secret wifi_password_2
ap:
ssid: "${name}"
password: !secret ap_password
web_server:
port: 80
auth:
username: !secret web_server_user
password: !secret web_server_password
api:
encryption:
key: !secret api_password
ota:
password: !secret ota_password
id: my_ota
logger:
custom_component:
- lambda: |-
auto opentherm = new OpenthermComponent();
return {opentherm};
components:
- id: opentherm
output:
- platform: custom
type: float
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
auto opentherm_pid_output = new OpenthermFloatOutput();
openthermComp->set_pid_output(opentherm_pid_output);
App.register_component(opentherm_pid_output);
return {opentherm_pid_output};
outputs:
id: pid_output
#min_power: 30.00%
#max_power: 60.00%
sensor:
- platform: wifi_signal
name: "${devicename} wifi signal"
update_interval: 600s
- platform: uptime
name: "${devicename} Uptime Sensor"
id: uptime_sensor
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
return {
openthermComp->boiler_temperature,
openthermComp->external_temperature_sensor,
openthermComp->return_temperature_sensor,
openthermComp->pressure_sensor,
openthermComp->modulation_sensor,
openthermComp->heating_target_temperature_sensor
};
sensors:
- name: Boiler Temperature
unit_of_measurement: °C
accuracy_decimals: 1
- name: "External Temperature"
unit_of_measurement: °C
accuracy_decimals: 0
- name: "Return Temperature"
unit_of_measurement: °C
accuracy_decimals: 1
- name: "Heating Water Pressure"
unit_of_measurement: hPa
accuracy_decimals: 1
- name: "Boiler Modulation"
unit_of_measurement: "%"
accuracy_decimals: 0
- name: "Heating Target Temperature"
unit_of_measurement: °C
accuracy_decimals: 1
- platform: homeassistant
id: temperature_sensor
entity_id: sensor.temperature_sensor
name: "Actual temperature"
unit_of_measurement: °C
switch:
- platform: restart
id: switch_restart
name: "${devicename} Restart"
- platform: gpio
name: "${devicename} Bypass"
restore_mode: RESTORE_DEFAULT_ON
pin:
number: GPIO19
mode:
output: true
inverted: true
- platform: gpio
name: "${devicename} Thermostaat"
restore_mode: RESTORE_DEFAULT_OFF
pin:
number: GPIO18
mode:
output: true
inverted: true
binary_sensor:
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
return {openthermComp->flame};
binary_sensors:
- name: "Flame"
#device_class: heat
text_sensor:
- platform: version
hide_timestamp: true
entity_category: diagnostic
name: "${devicename} Version"
- platform: template
name: "${devicename} Uptime"
id: uptime_human
icon: mdi:clock-start
- platform: wifi_info
ip_address:
name: "${devicename} IP Address"
icon: mdi:wifi
entity_category: diagnostic
ssid:
name: "${devicename} SSID"
icon: mdi:wifi-strength-2
entity_category: diagnostic
status_led:
pin: GPIO2