-
Notifications
You must be signed in to change notification settings - Fork 0
/
ESPhome.yaml
301 lines (244 loc) · 5.37 KB
/
ESPhome.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
esphome:
name: keyestudiosmarthouse
friendly_name: "Eefjes Huis"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
api:
# Enable Home Assistant API
encryption:
key: "!secret haApi_password"
#Used for buzzer music
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
ota:
#Home Assistant Over The Air update
- platform: esphome
password: "!secret ota_password"
wifi:
#Local WIFI settings
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Keyestudiosmarthouse"
password: "!secret wifi_password"
captive_portal:
i2c:
- frequency: 800kHz
rc522_i2c:
#RF-Reader
address: 0x28
display:
# LCD Screen
- platform: lcd_pcf8574
update_interval: 10s
id: lcd_display
dimensions: 16x2
address: 0x27
lambda: |-
it.printf(0, 0, "Temp: %.1f C", id(temperature_dht).state);
it.printf(0, 1, "Vocht: %.1f %%", id(humidity_dht).state);
binary_sensor:
# Reports if this device is Connected or not
- platform: status
name: "Status"
# Left push button
- platform: gpio
pin:
number: 16
inverted: true
name: "Linkerknop"
# Right push button
- platform: gpio
name: "Rechterknop"
pin:
number: 27
inverted: true
# GAS Sensor
- platform: gpio
pin:
number: 23
inverted: true
name: "Gas sensor"
device_class: gas
# PIR Sensor
- platform: gpio
pin: 14
name: "Bewegingsmelder"
device_class: motion
# NFC tags
- platform: rc522
uid: 95-86-4D-XXXXXX
name: "Tag badge Blauwe Sleutelhanger"
- platform: rc522
uid: 64-6F-3E-XXXXXX
name: "Tag badge Witte Kredietkaart"
- platform: rc522
uid: 04-A0-05-B2-FB-5C-XXXXXX
name: "Tag badge Disney 04A005B2FB5CXXXXXX"
- platform: rc522
uid: 04-94-06-B2-FB-5C-XXXXXX
name: "Tag badge Disney 049406B2FB5CXXXXXX"
- platform: rc522
uid: 04-A7-06-B2-FB-5C-XXXXXX
name: "Tag badge Disney 04A706B2FB5CXXXXXX"
- platform: rc522
uid: 1D-06-8B-02-00-00-XXXXXX
name: "Tag badge Plugsurfing"
- platform: rc522
uid: D5-E0-9E-XXXXXX
name: "Tag badge Oude Witte Kredietkaart"
- platform: rc522
uid: B4-35-70-XXXXXX
name: "Tag badge Efteling EBR-F324004"
- platform: rc522
uid: CD-95-10-XXXXXX
name: "Tag badge Efteling EBR-F282747"
light:
# Status LED
- platform: status_led
name: "LED"
pin: 12
# 6812RGB Led
- platform: neopixelbus
type: GRB
variant: SK6812
pin: 26
num_leds: 4
name: "RGB Leds"
effects:
- pulse:
- random:
- strobe:
- flicker:
- addressable_rainbow:
- addressable_color_wipe:
- addressable_scan:
- addressable_twinkle:
- addressable_random_twinkle:
- addressable_fireworks:
servo:
# Servo 90 Motor 1
- id: servo_01
output: servo_01_out
# Servo 90 Motor 2
- id: servo_02
output: servo_02_out
output:
# Roof FAN
- platform: ledc
pin: 18
frequency: 100 Hz
id: ventilation_fan_pwm_r
# Roof FAN
- platform: ledc
pin: 19
frequency: 100 Hz
id: ventilation_fan_pwm_l
# Servo 90 Motor 1
- platform: ledc
id: servo_01_out
pin: 5
frequency: 50 Hz
# Servo 90 Motor 2
- platform: ledc
id: servo_02_out
pin: 13
frequency: 50 Hz
# Buzzer config
- platform: ledc
id: rtttl_out
pin: 25
# Buzzer config
rtttl:
output: rtttl_out
on_finished_playback:
- logger.log: 'Song ended!'
number:
# Servo 90 Motor 1
- platform: template
name: "Venster"
min_value: 0
initial_value: 0
max_value: 100
step: 1
optimistic: true
set_action:
then:
- servo.write:
id: servo_01
level: !lambda 'return x / 100.0;'
# Servo 90 Motor 2
- platform: template
name: "Deur"
min_value: 0
initial_value: 0
max_value: 100
step: 1
optimistic: true
set_action:
then:
- servo.write:
id: servo_02
level: !lambda 'return x / 100.0;'
fan:
# Roof FAN L
- platform: speed
output: ventilation_fan_pwm_l
name: "Dak Ventilator L"
# Roof FAN R
- platform: speed
output: ventilation_fan_pwm_r
name: "Dak Ventilator R"
sensor:
# Reports the WiFi signal strength
- platform: wifi_signal
name: "WIFI Signaal"
update_interval: 60s
#Temperature and Humidity
- platform: dht
pin: 17
model: dht11
temperature:
name: "Temperatuur"
id: temperature_dht
humidity:
name: "Vochtigheid"
id: humidity_dht
update_interval: 30s
# Reports how long the device has been powered (in minutes)
- platform: uptime
name: "Opgestart"
filters:
- lambda: return x / 60.0;
unit_of_measurement: minutes
# Steam Sensor
- platform: adc
pin: 34
name: "Stoom Water sensor"
update_interval: 30s
switch:
# Helps to restart the device at distance
- platform: restart
name: "Herstart"
text_sensor:
# Reports the ESPHome Version with compile date
- platform: version
name: "ESPHome Versie"
# Reports WiFi name
- platform: wifi_info
ssid:
name: "WiFi"
# Reports current IP
- platform: wifi_info
ip_address:
name: "IP-Adres"