跳转至

音乐灯带-接入ESPHome(1)——常规设备

《HomeAssistant智能家居实战篇》视频

操作步骤

  1. 连接nodemcu的USB口到esphome运行设备上
  2. 构建新的esp32配置
  3. 在基础配置上,增加对应硬件信息
  4. UPLOAD固件与USB功率不够的问题
  5. 在HomeAssistant中配置esphome
  6. 使用演示

参考

  • 本课程之《ESPHome》篇章
  • 参考配置

    esphome: name: esp32_music platform: ESP32 board: nodemcu-32s

    wifi: …… logger:

    api: password: 'hachina'

    ota: password: 'hachina'

    esp32_touch: binary_sensor: - platform: esp32_touch name: "Touch Pad on ESP32" pin: GPIO32 threshold: 1000 on_press: then: - light.toggle: LedsStrip

    output: - platform: ledc id: output_gpio2 pin: GPIO2

    light: - platform: monochromatic name: "Led on ESP32 Board" output: output_gpio2 - platform: fastled_clockless id: LedsStrip chipset: NEOPIXEL pin: GPIO21 num_leds: 60 name: "MUSIC LEDS" effects: - addressable_rainbow: - addressable_color_wipe: - addressable_scan: - addressable_twinkle: - addressable_random_twinkle: - addressable_fireworks: - addressable_flicker: # - platform: fastled_spi # id: LedsStrip # chipset: APA102 # data_pin: GPIO21 # clock_pin: GPIO17 # num_leds: 60 # rgb_order: BGR # name: "MUSIC LEDS" # effects: # - addressable_rainbow: # - addressable_color_wipe: # - addressable_scan: # - addressable_twinkle: # - addressable_random_twinkle: # - addressable_fireworks: # - addressable_flicker:

  • ESPHome中配置TouchPad

https://esphome.io/components/binary_sensor/esp32_touch.html

  • ESPHome中配置FastLED Light

https://esphome.io/components/light/fastled.html

返回课程目录↩