-
Notifications
You must be signed in to change notification settings - Fork 0
/
atmosfera-echo-hub.yaml
439 lines (395 loc) · 13.5 KB
/
atmosfera-echo-hub.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
substitutions:
# You can change the Friendly Name and Location to something, that will suite the location of your device, i.e. "Living room speaker". Do not change the 'name'.
name: 'atmosfera-echo-hub'
friendly_name: 'Atmosfera Echo Hub'
location: 'Living Room'
external_media_player: your_media_player # Change this to your external media player enity_id: do not include media_player.
home_assistant_host: http://homeassistant.local:8123 # Change to the full url or IP of your HA server including port
tts_voice_speed: "24000" #options #nabu casa "24000" #piper "16000" elevenlabs "44100" must include quotes
# Change the values on the right to match your locale
monday: Monday
tuesday: Tuesday
wednesday: Wednesday
thursday: Thursday
friday: Friday
saturday: Saturday
sunday: Sunday
jan: January
feb: February
mar: March
apr: April
may: May
jun: June
jul: July
aug: August
sept: September
oct: October
nov: November
dec: December
voice_assist_idle_phase_id: "1"
voice_assist_listening_phase_id: "2"
voice_assist_thinking_phase_id: "3"
voice_assist_replying_phase_id: "4"
voice_assist_not_ready_phase_id: "10"
voice_assist_error_phase_id: "11"
voice_assist_muted_phase_id: "12"
micro_wake_word_model: https://github.com/kahrendt/microWakeWord/releases/download/okay_nabu/okay_nabu.json
# These unique characters have been extracted from every test file of every language available on https://github.com/home-assistant/intents (14 March 2024)
allowed_characters: " !#%'()+,-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWYZ[]_abcdefghijklmnopqrstuvwxyz{|}°²³µ¿ÁÂÄÅÉÖÚßàáâãäåæçèéêëìíîðñòóôõöøùúûüýþāăąćčďĐđēėęěğĮįıļľŁłńňőřśšťũūůűųźŻżŽžơưșțΆΈΌΐΑΒΓΔΕΖΗΘΚΜΝΠΡΣΤΥΦάέήίαβγδεζηθικλμνξοπρςστυφχψωϊόύώАБВГДЕЖЗИКЛМНОПРСТУХЦЧШЪЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёђєіїјљњћאבגדהוזחטיכלםמןנסעפץצקרשת،ءآأإئابةتجحخدذرزسشصضطظعغفقكلمنهوىيٹپچڈکگںھہیےংকচতধনফবযরলশষস়ািু্చయలిెొ్ംഅആഇഈഉഎഓകഗങചജഞടഡണതദധനപഫബഭമയരറലളവശസഹാിീുൂെേൈ്ൺൻർൽൾაბგდევზთილმნოპრსტუფქყშჩცძჭხạảấầẩậắặẹẽếềểệỉịọỏốồổỗộớờởợụủứừửữựỳ—、一上不个中为主乾了些亮人任低佔何作供依侧係個側偵充光入全关冇冷几切到制前動區卧厅厨及口另右吊后吗启吸呀咗哪唔問啟嗎嘅嘛器圍在场執場外多大始安定客室家密寵对將小少左已帘常幫幾库度庫廊廚廳开式後恆感態成我戲戶户房所扇手打执把拔换掉控插摄整斯新明是景暗更最會有未本模機檯櫃欄次正氏水沒没洗活派温測源溫漏潮激濕灯為無煙照熱燈燥物狀玄现現瓦用發的盞目着睡私空窗立笛管節簾籬紅線红罐置聚聲脚腦腳臥色节著行衣解設調請謝警设调走路車车运連遊運過道邊部都量鎖锁門閂閉開關门闭除隱離電震霧面音頂題顏颜風风食餅餵가간감갔강개거게겨결경고공과관그금급기길깥꺼껐꼽나난내네놀누는능니다닫담대더데도동됐되된됨둡드든등디때떤뜨라래러렇렌려로료른를리림링마많명몇모무문물뭐바밝방배변보부불블빨뽑사산상색서설성세센션소쇼수스습시신실싱아안않알았애야어얼업없었에여연열옆오온완외왼요운움워원위으은을음의이인일임입있작잠장재전절정제져조족종주줄중줘지직진짐쪽차창천최추출충치침커컴켜켰쿠크키탁탄태탬터텔통트튼티파팬퍼폰표퓨플핑한함해했행혀현화활후휴힘,?"
esphome:
name: ${name}
name_add_mac_suffix: true
friendly_name: ${friendly_name}
comment: 'The Atmosfera Echo Hub is the ultimate Home Assistant companion, seamlessly integrating voice control, climate management, and smart device connectivity. Designed to create a harmonious living environment, this multifunctional hub combines advanced presence and climate sensors with a powerful voice-controlled satellite speaker, allowing you to effortlessly manage your home. With built-in ZigBee and Matter support, the Atmosfera Echo Hub connects a wide range of smart devices to Home Assistant, ensuring a cohesive ecosystem. Its intuitive voice assistant responds to your commands, enabling you to adjust settings, monitor conditions, and control devices with ease. Experience the future of home automation with the Atmosfera Echo Hub, where comfort, connectivity, and control converge.'
project:
name: 'kyvaith.atmosfera-echo-hub'
version: 'dev'
min_version: 2024.9.0
platformio_options:
board_build.f_cpu: 240000000
# compile_process_limit: 1
area: ${location}
on_boot:
priority: 600
then:
- light.turn_on:
id: display_backlight
transition_length: 2s
- delay: 3s
- lvgl.widget.hide: boot_screen
esp32:
#board: esp32-s3-devkitc-1
board: esp32s3box
flash_size: 16MB
framework:
type: esp-idf
# Required to achieve sufficient PSRAM bandwidth
sdkconfig_options:
CONFIG_ESP32_S3_BOX_BOARD: y
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
CONFIG_ESP32S3_DATA_CACHE_64KB: y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y
CONFIG_AUDIO_BOARD_CUSTOM: y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB: y
CONFIG_ESPTOOLPY_FLASHMODE_QIO: y
CONFIG_ESPTOOLPY_FLASHFREQ_80M: y
CONFIG_COMPILER_OPTIMIZATION_PERF: y
CONFIG_ESP32_REV_MIN_3: y
#CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE: y
platform_version: 6.8.1
version: 5.3.1
# Import ESP-ADF with improved audio
external_components:
- source:
type: git
url: https://github.com/gnumpi/esphome_audio
ref: dev-next
components: [ adf_pipeline, i2s_audio ]
refresh: 0s
# Set PSRAM parameters
psram:
mode: octal
speed: 80MHz
output:
- id: display_backlight_output
platform: ledc
pin: 14
time:
- platform: homeassistant
id: homeassistant_time
dashboard_import:
package_import_url: github://kyvaith/atmosfera-echo-hub/atmosfera-echo-hub.yaml@main
import_full_config: true
qr_code:
- id: qr_hotspot
value: "WIFI:S:${name};T:WPA;P:${name};"
- id: qr_esphome
value: https://my.home-assistant.io/redirect/config_flow_start/?domain=esphome
# Enable Captive Portal AP
wifi:
# ssid: Wokwi-GUEST
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
# on_connect:
# - script.execute: draw_display
# - ble.disable:
# on_disconnect:
# - script.execute: draw_display
# - ble.enable:
esp32_improv:
authorizer: none
# Enable Home Assistant API
api:
# on_client_connected:
# - script.execute: draw_display
# on_client_disconnected:
# - script.execute: draw_display
# Allow OTA updates
ota:
platform: esphome
# Switch to ready-made firmware
#ota:
# - platform: http_request
# id: ota_http_request
# - on_begin:
# - display.page.show: ota_page
#
#update:
# - platform: http_request
# id: update_http_request
# name: Firmware
# source: https://firmware.esphome.io/bluetooth-proxy/esp32-generic/manifest.json
#
#http_request:
#
# Enable logging
logger:
level: debug
# Enable Captive Portal page
captive_portal:
debug:
update_interval: 1s
esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true
bluetooth_proxy:
active: true
spi:
clk_pin: 7
mosi_pin: 15
# miso_pin: X
# A MISO pin should preferably not be specified, as this will limit the maximum rate in some circumstances,
# and is not required if the SPI bus is used only for the display.
# miso_pin: 6
i2c:
- id: bus_a
sda: 4
scl: 5
display:
- platform: ili9xxx
#model: gc9a01a
model: TFT 2.4
cs_pin: 18
dc_pin: 16
reset_pin: 17
rotation: 270
pixel_mode: 16bit
id: touchscreen1
invert_colors: false
auto_clear_enabled: false
update_interval: never
dimensions:
height: 240
width: 240
# offset_height: 55
touchscreen:
platform: ft63x6
#platform: cst816
display: touchscreen1
calibration:
x_max: 240
y_max: 320
#y_max: 240
transform:
#mirror_x: false
#mirror_y: false
mirror_x: true
mirror_y: true
on_release:
then:
- if:
condition: lvgl.is_paused
then:
- light.turn_on:
id: display_backlight
transition_length: 0.6s
- lvgl.resume:
- lvgl.widget.redraw:
light:
- platform: monochromatic
output: "display_backlight_output"
id: "display_backlight"
name: "Display backlight"
sensor:
- platform: homeassistant
id: cover_myroom_pos
entity_id: cover.myroom
attribute: current_position
on_value:
- if:
condition:
lambda: |-
return x == 100;
then:
- lvgl.widget.update:
id: cov_up_myroom
text_opa: 60%
else:
- lvgl.widget.update:
id: cov_up_myroom
text_opa: 100%
- if:
condition:
lambda: |-
return x == 0;
then:
- lvgl.widget.update:
id: cov_down_myroom
text_opa: 60%
else:
- lvgl.widget.update:
id: cov_down_myroom
text_opa: 100%
- platform: debug
psram:
name: "Free PSRAM"
id: free_psram
on_value:
then:
- lvgl.label.update:
id: ip_address_label
text:
format: "%f"
args: [ 'id(free_psram).state' ]
text_sensor:
- platform: homeassistant
id: cover_myroom_state
entity_id: cover.myroom
on_value:
- if:
condition:
lambda: |-
return ((0 == x.compare(std::string{"opening"})) or (0 == x.compare(std::string{"closing"})));
then:
- lvgl.label.update:
id: cov_stop_myroom
text: "STOP"
else:
- lvgl.label.update:
id: cov_stop_myroom
text:
format: "%.0f%%"
args: [ 'id(cover_myroom_pos).get_state()' ]
- platform: wifi_info
ip_address:
name: ESP IP Address
id: ip_address
on_value:
then:
- lvgl.label.update:
id: ip_address_label
text:
format: "%s"
args: [ 'id(ip_address).get_state().c_str()' ]
image:
- file: https://esphome.io/_static/favicon-512x512.png
id: boot_logo
resize: 100x100
type: RGB565
use_transparency: true
lvgl:
buffer_size: 80%
on_idle:
timeout: 10s
then:
- logger.log: "LVGL is idle"
- lvgl.pause:
- light.turn_off:
id: display_backlight
transition_length: 5s
top_layer:
widgets:
- obj:
id: boot_screen
x: 0
y: 0
width: 100%
height: 100%
bg_color: 0xffffff
bg_opa: COVER
radius: 0
pad_all: 0
border_width: 0
widgets:
- image:
align: CENTER
src: boot_logo
y: -40
- spinner:
align: CENTER
y: 95
height: 50
width: 50
spin_time: 1s
arc_length: 60deg
arc_width: 8
indicator:
arc_color: 0x18bcf2
arc_width: 8
on_press:
- lvgl.widget.hide: boot_screen
pages:
- id: room_page
widgets:
- label:
id: ip_address_label
align: TOP_RIGHT
text: 'n/a'
- label:
x: 85
y: 6
width: 70
text: "My room"
text_align: CENTER
- button:
x: 85
y: 30
width: 70
height: 68
widgets:
- label:
id: cov_up_myroom
align: CENTER
text: "\uF077"
on_press:
then:
- homeassistant.action:
action: cover.open
data:
entity_id: cover.myroom
- button:
x: 85
y: 103
width: 70
height: 68
widgets:
- label:
id: cov_stop_myroom
align: CENTER
text: STOP
on_press:
then:
- homeassistant.action:
action: cover.stop
data:
entity_id: cover.myroom
- button:
x: 85
y: 178
width: 70
height: 68
widgets:
- label:
id: cov_down_myroom
align: CENTER
text: "\uF078"
on_press:
then:
- homeassistant.action:
action: cover.close
data:
entity_id: cover.myroom