『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 784|回复: 2

M5Stack ATOM Matrix的esphome模板

[复制链接]

6

主题

201

帖子

1137

积分

金牌会员

Rank: 6Rank: 6

积分
1137
金钱
936
HASS币
0
发表于 2023-7-7 19:40:51 | 显示全部楼层 |阅读模式
最近买了个M5Stack ATOM Matrix,整体做工还行,有些小瑕疵,不影响。很迷你,挺喜欢,就是太贵了。
以下为接入代码,完全接入,并可在homeassistant中显示。红外需要自己添加设备,不过据说信号不行。
esphome:
  name: gradienter
  friendly_name: gradienter


esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: ""
            
ota:
  password: "homeassistant"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Gradienter"
    password: "homeassistant"

captive_portal:

i2c:
  sda: 25
  scl: 21
  scan: true
  id: bus_a

sensor:
  - platform: mpu6886
    i2c_id: bus_a
    id: gradienter_info
    address: 0x68
    update_interval: 1s
    accel_x:
      name: "MPU6886 Accel X"
    accel_y:
      name: "MPU6886 Accel Y"
    accel_z:
      name: "MPU6886 Accel z"
    gyro_x:
      name: "MPU6886 Gyro X"
    gyro_y:
      name: "MPU6886 Gyro Y"
    gyro_z:
      name: "MPU6886 Gyro z"
    temperature:
      name: "MPU6886 Temperature"
    
binary_sensor:
  - platform: gpio
    pin: 39
    name: user_button

light:
  - platform: esp32_rmt_led_strip
    rgb_order: GRB
    pin: 27
    num_leds: 25
    rmt_channel: 1
    chipset: ws2812
    name: "My Light"
    effects:
      # Customize parameters
      - random:
          name: "My Slow Random Effect"
          transition_length: 30s
          update_interval: 30s
      - random:
          name: "My Fast Random Effect"
          transition_length: 4s
          update_interval: 5s
      - pulse:
          name: "Fast Pulse"
          transition_length: 0.5s
          update_interval: 0.5s
          min_brightness: 0%
          max_brightness: 100%
      - pulse:
          name: "Slow Pulse"
          # transition_length: 1s      # defaults to 1s
          update_interval: 2s
      - random:
          name: Random Effect With Custom Values
          transition_length: 5s
          update_interval: 7s
      - strobe:
          name: Strobe Effect With Custom Values
          colors:
            - state: true
              brightness: 100%
              red: 100%
              green: 90%
              blue: 0%
              duration: 500ms
            - state: false
              duration: 250ms
            - state: true
              brightness: 100%
              red: 0%
              green: 100%
              blue: 0%
              duration: 500ms
      - flicker:
          name: Flicker Effect With Custom Values
          alpha: 95%
          intensity: 1.5%
      - addressable_rainbow:
          name: Rainbow Effect With Custom Values
          speed: 10
          width: 50
      - addressable_color_wipe:
          # name: Color Wipe Effect With Custom Values
          # colors:
          #   - red: 100%
          #     green: 100%
          #     blue: 100%
          #     num_leds: 1
          #   - red: 0%
          #     green: 0%
          #     blue: 0%
          #     num_leds: 1
          # add_led_interval: 100ms
          # reverse: false
      - addressable_scan:
          name: Scan Effect With Custom Values
          move_interval: 100ms
          scan_width: 1
      - addressable_twinkle:
          name: Twinkle Effect With Custom Values
          twinkle_probability: 5%
          progress_interval: 4ms
      - addressable_random_twinkle:
          name: Random Twinkle Effect With Custom Values
          twinkle_probability: 5%
          progress_interval: 32ms
      - addressable_fireworks:
          name: Fireworks Effect With Custom Values
          update_interval: 32ms
          spark_probability: 10%
          use_random_color: false
          fade_out_rate: 120


remote_transmitter:
  pin: GPIO12
  carrier_duty_percent: 50%


回复

使用道具 举报

6

主题

201

帖子

1137

积分

金牌会员

Rank: 6Rank: 6

积分
1137
金钱
936
HASS币
0
 楼主| 发表于 2023-7-7 19:44:25 | 显示全部楼层
分别接入了加速度计、角速度计,按钮,5*5灯板,红外。剩下的外围接口或者外围设备自行添加。
回复

使用道具 举报

0

主题

48

帖子

582

积分

高级会员

Rank: 4

积分
582
金钱
534
HASS币
0
发表于 2023-8-10 09:36:10 | 显示全部楼层
这个功能太好了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-3 01:58 , Processed in 0.228374 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表