First commit
This commit is contained in:
5
esphome/.gitignore
vendored
Normal file
5
esphome/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Gitignore settings for ESPHome
|
||||
# This is an example and may include too much for your use-case.
|
||||
# You can modify this file to suit your needs.
|
||||
/.esphome/
|
||||
/secrets.yaml
|
||||
132
esphome/m5stack-atom-echo-0a00f0.yaml
Normal file
132
esphome/m5stack-atom-echo-0a00f0.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
substitutions:
|
||||
name: ha-horst-wozi-tv
|
||||
friendly_name: Homeassistant-Horst-WoZi-TV
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: m5stack.atom-echo
|
||||
version: "1.0"
|
||||
min_version: 2023.5.0
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: GPIO33
|
||||
i2s_bclk_pin: GPIO19
|
||||
dashboard_import:
|
||||
package_import_url: github://esphome/media-players/m5stack-atom-echo.yaml@main
|
||||
logger:
|
||||
api:
|
||||
encryption:
|
||||
key: myBjbri9iRfwWhVCtsWhU4tkfnSHC8i/c+xZ63TeoeU=
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Atom-Echo Fallback Hotspot"
|
||||
password: "somepassword"
|
||||
|
||||
captive_portal:
|
||||
|
||||
improv_serial:
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: atom_echo_microphone
|
||||
adc_type: external
|
||||
i2s_din_pin: GPIO23
|
||||
pdm: true
|
||||
|
||||
voice_assistant:
|
||||
microphone: atom_echo_microphone
|
||||
on_start:
|
||||
- light.turn_on:
|
||||
id: led
|
||||
blue: 100%
|
||||
red: 0%
|
||||
green: 0%
|
||||
effect: none
|
||||
on_tts_start:
|
||||
- light.turn_on:
|
||||
id: led
|
||||
blue: 0%
|
||||
red: 0%
|
||||
green: 100%
|
||||
effect: none
|
||||
on_tts_end:
|
||||
- media_player.play_media: !lambda return x;
|
||||
- light.turn_on:
|
||||
id: led
|
||||
blue: 0%
|
||||
red: 0%
|
||||
green: 100%
|
||||
effect: pulse
|
||||
on_end:
|
||||
- delay: 1s
|
||||
- wait_until:
|
||||
not:
|
||||
media_player.is_playing: media_out
|
||||
- light.turn_off: led
|
||||
on_error:
|
||||
- light.turn_on:
|
||||
id: led
|
||||
blue: 0%
|
||||
red: 100%
|
||||
green: 0%
|
||||
effect: none
|
||||
- delay: 1s
|
||||
- light.turn_off: led
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO39
|
||||
inverted: true
|
||||
name: Button
|
||||
id: echo_button
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON FOR AT MOST 350ms
|
||||
- OFF FOR AT LEAST 10ms
|
||||
then:
|
||||
- media_player.toggle: media_out
|
||||
- timing:
|
||||
- ON FOR AT LEAST 350ms
|
||||
then:
|
||||
- voice_assistant.start:
|
||||
- timing:
|
||||
- ON FOR AT LEAST 350ms
|
||||
- OFF FOR AT LEAST 10ms
|
||||
then:
|
||||
- voice_assistant.stop:
|
||||
|
||||
media_player:
|
||||
- platform: i2s_audio
|
||||
id: media_out
|
||||
name: None
|
||||
dac_type: external
|
||||
i2s_dout_pin: GPIO22
|
||||
mode: mono
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led
|
||||
name: None
|
||||
pin: GPIO27
|
||||
default_transition_length: 0s
|
||||
chipset: SK6812
|
||||
num_leds: 1
|
||||
rgb_order: grb
|
||||
rmt_channel: 0
|
||||
effects:
|
||||
- pulse:
|
||||
transition_length: 250ms
|
||||
update_interval: 250ms
|
||||
92
esphome/trash/ha-wozi-funk-rolladen.yaml
Normal file
92
esphome/trash/ha-wozi-funk-rolladen.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
esphome:
|
||||
name: ha-wozi-funk-rolladen
|
||||
friendly_name: HA-WoZi-Funk-Rolladen
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
logger:
|
||||
baud_rate: 0
|
||||
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "uQ0q0Do+0cDiSSAqlkfL8iMeGqMMzjorsbFk4/azqZI="
|
||||
services:
|
||||
- service: send_rf_code
|
||||
variables:
|
||||
sync: int
|
||||
low: int
|
||||
high: int
|
||||
code: int
|
||||
then:
|
||||
- rf_bridge.send_code:
|
||||
sync: !lambda 'return sync;'
|
||||
low: !lambda 'return low;'
|
||||
high: !lambda 'return high;'
|
||||
code: !lambda 'return code;'
|
||||
- service: learn
|
||||
then:
|
||||
- rf_bridge.learn
|
||||
rf_bridge:
|
||||
on_code_received:
|
||||
then:
|
||||
- homeassistant.event:
|
||||
event: esphome.rf_code_received
|
||||
data:
|
||||
sync: !lambda 'return format_hex(data.sync);'
|
||||
low: !lambda 'return format_hex(data.low);'
|
||||
high: !lambda 'return format_hex(data.high);'
|
||||
code: !lambda 'return format_hex(data.code);'
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: "5045fe5c1bc0ddc9c4403f07f37b7b3e"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Ha-Wozi-Funk-Rolladen"
|
||||
password: "mEy6nJ1G2bAh"
|
||||
uart:
|
||||
tx_pin: 1
|
||||
rx_pin: 3
|
||||
baud_rate: 19200
|
||||
|
||||
captive_portal:
|
||||
|
||||
# Sensors for ESP version and WIFI information
|
||||
text_sensor:
|
||||
# ESPHome version
|
||||
- platform: version
|
||||
hide_timestamp: true
|
||||
name: "ESPHome Version"
|
||||
# IP address and connected SSID
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
icon: mdi:wifi
|
||||
ssid:
|
||||
name: "Connected SSID"
|
||||
icon: mdi:wifi-strength-2
|
||||
sensor:
|
||||
# WiFi signal
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal"
|
||||
update_interval: 120s
|
||||
- platform: uptime
|
||||
name: Sonoff RF Bridge Uptime
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: Sonoff RF Bridge Status
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "Switch state"
|
||||
pin: GPIO13
|
||||
|
||||
Reference in New Issue
Block a user