backup 20240718
This commit is contained in:
187
esphome/cfg_experimental/t-embed.yaml
Normal file
187
esphome/cfg_experimental/t-embed.yaml
Normal file
@@ -0,0 +1,187 @@
|
||||
substitutions:
|
||||
device_name: "t-embed"
|
||||
friendly_name: "t-embed"
|
||||
comment: "esp32-s3, lcd, rotary, leds, mic, spk"
|
||||
location: "zolder"
|
||||
api_password: !secret t-embed_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret t-embed_ip
|
||||
update_interval: 30s
|
||||
num_leds: "7"
|
||||
led_chipset: APA102
|
||||
|
||||
#t-embed pins
|
||||
|
||||
pin_i2slrclk: GPIO05
|
||||
pin_i2sbclk: GPIO07
|
||||
pin_i2sdout: GPIO06
|
||||
pin_es7210_blck: GPIO47
|
||||
pin_es7210_lrck: GPIO21
|
||||
pin_es7210_din: GPIO14
|
||||
pin_es7210_mclk: GPIO48
|
||||
pin_sd_cs: GPIO39
|
||||
pin_sd_sck: GPIO40
|
||||
pin_sd_mosi: GPIO41
|
||||
pin_sd_miso: GPIO38
|
||||
pin_power: GPIO46
|
||||
pin_led_data: GPIO42
|
||||
pin_led_clk: GPIO45
|
||||
pin_encode_a: GPIO02
|
||||
pin_encode_b: GPIO01
|
||||
pin_encode_btn: GPIO00
|
||||
pin_sda: GPIO18
|
||||
pin_scl: GPIO8
|
||||
pin_lcd_bl: GPIO15
|
||||
pin_lcd_dc: GPIO13
|
||||
pin_lcd_cs: GPIO10
|
||||
pin_lcd_clk: GPIO12
|
||||
pin_lcd_mosi: GPIO11
|
||||
pin_lcd_res: GPIO09
|
||||
pin_vbat: GPIO4
|
||||
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-s3-voice.yaml
|
||||
spkmic: !include interfaces/SpkMicVoiceTembed.yaml
|
||||
#leds: !include templates/light_fastled_spi.yaml
|
||||
connection: !include common/wifi.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
backlight: !include templates/backlight.yaml
|
||||
i2c: !include interfaces/i2c_a.yaml
|
||||
encoder: !include sensors/encoder.yaml
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
platformio_options:
|
||||
board_build.mcu: esp32s3
|
||||
board_build.name: "LilyGO T-Embed ESP32-S3"
|
||||
board_build.upload.flash_size: "16MB"
|
||||
board_build.upload.maximum_size: 16777216
|
||||
board_build.vendor: "LilyGO"
|
||||
on_boot:
|
||||
priority: 800
|
||||
then:
|
||||
- lambda: |-
|
||||
id(disp).enable();
|
||||
id(disp).transfer_byte(0x11);
|
||||
id(disp).disable();
|
||||
- switch.turn_on: power_on
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: 'Restart'
|
||||
|
||||
api:
|
||||
on_client_connected:
|
||||
then:
|
||||
- delay: 50ms
|
||||
- micro_wake_word.start:
|
||||
on_client_disconnected:
|
||||
then:
|
||||
- voice_assistant.stop:
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: mute
|
||||
name: mute
|
||||
optimistic: true
|
||||
on_turn_on:
|
||||
- micro_wake_word.stop:
|
||||
- voice_assistant.stop:
|
||||
on_turn_off:
|
||||
- micro_wake_word.start:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: ${pin_power}
|
||||
mode:
|
||||
output: True
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
name: "Power On"
|
||||
id: power_on
|
||||
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: home_time
|
||||
|
||||
voice_assistant:
|
||||
id: va
|
||||
microphone: mic
|
||||
noise_suppression_level: 2.0
|
||||
volume_multiplier: 4.0
|
||||
on_error:
|
||||
- micro_wake_word.start:
|
||||
on_end:
|
||||
then:
|
||||
- wait_until:
|
||||
not:
|
||||
voice_assistant.is_running:
|
||||
- micro_wake_word.start:
|
||||
|
||||
|
||||
micro_wake_word:
|
||||
on_wake_word_detected:
|
||||
- voice_assistant.start:
|
||||
model: okay_nabu
|
||||
|
||||
|
||||
# spi:
|
||||
# id: ledbus
|
||||
# mosi_pin: ${pin_led_data}
|
||||
# clk_pin: ${pin_led_clk}
|
||||
|
||||
external_components:
|
||||
# - source:
|
||||
# type: local
|
||||
# path: components
|
||||
- source: github://rpatel3001/esphome@es7210
|
||||
components: [ es7210 ]
|
||||
|
||||
|
||||
# light:
|
||||
# - platform: spi_led_strip
|
||||
# num_leds: 30
|
||||
# spi_id: "ledbus"
|
||||
# color_correct: [80%, 60%, 100%]
|
||||
# id: rgb_led
|
||||
# name: "RGB LED Strip"
|
||||
# data_rate: 1MHz
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 96
|
||||
|
||||
spi:
|
||||
- id: spi_display
|
||||
clk_pin: ${pin_lcd_clk}
|
||||
mosi_pin: ${pin_lcd_mosi}
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
model: st7789V
|
||||
dimensions:
|
||||
height: 170
|
||||
width: 320
|
||||
offset_height: 35
|
||||
offset_width: 0
|
||||
transform:
|
||||
swap_xy: true
|
||||
mirror_x: false
|
||||
mirror_y: true
|
||||
color_order: bgr
|
||||
data_rate: 80MHz
|
||||
cs_pin: ${pin_lcd_cs}
|
||||
dc_pin: ${pin_lcd_dc}
|
||||
reset_pin: ${pin_lcd_res}
|
||||
update_interval: 5s
|
||||
id: disp
|
||||
lambda: |-
|
||||
it.strftime(10, 20, id(roboto), "%H:%M", id(home_time).now());
|
||||
//it.line(0, 0, 50, 50);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user