当前位置: 首页 > news >正文

郑州网站建设设计公司/今天上海最新新闻事件

郑州网站建设设计公司,今天上海最新新闻事件,郑州网站建设品牌好,哈尔滨网站推广公司哪家好文章目录 一、安装ESPHome二、配置ESP32-C3控制灯1.主配置文件esp32c3-luat.yaml2.基础通用配置base.yaml3.密码文件secret.yaml4.围栏灯four_light.yaml5.彩灯rgb_light.yaml6.左右柱灯left_right_light.yaml 三、安装固件四、HomeAssistant配置ESPHome1.直接访问2.配置ESPHom…

文章目录

  • 一、安装ESPHome
  • 二、配置ESP32-C3控制灯
    • 1.主配置文件esp32c3-luat.yaml
    • 2.基础通用配置base.yaml
    • 3.密码文件secret.yaml
    • 4.围栏灯four_light.yaml
    • 5.彩灯rgb_light.yaml
    • 6.左右柱灯left_right_light.yaml
  • 三、安装固件
  • 四、HomeAssistant配置ESPHome
    • 1.直接访问
    • 2.配置ESPHome地址
    • 3.接入成功

一、安装ESPHome

uv init
uv add esphome
uv run esphome dashboard ./esphome

二、配置ESP32-C3控制灯

注意事项
1. id和name要用英文,不要用中文
2. wifi连接要用2.4GHz,不要用5GHz
3. i2c要注意frequency的设置

文件目录如下
在这里插入图片描述
ESP32-C3开发板
在这里插入图片描述

1.主配置文件esp32c3-luat.yaml

# https://wiki.luatos.com/chips/esp32c3/board.html
esphome:name: esp32c3-luatfriendly_name: esp32c3-luat
#  name_add_mac_suffix: trueplatformio_options:board_build.flash_mode: dioboard_build.mcu: esp32c3esp32:# HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flashboard: esp32-c3-devkitm-1variant: esp32c3framework:type: esp-idf# Enable logging
logger:hardware_uart: USB_SERIAL_JTAGpackages:# MAC: 60:55:f9:73:59:68base: !include common/base.yaml
#  luat_light: !include common/light/luat_light.yaml
#  luat_switch: !include common/switch/luat_switch.yamlfour_light: !include common/light/four_light.yamlrgb_light: !include common/light/rgb_light.yamlleft_right_light: !include common/light/left_right_light.yaml
captive_portal:
#<<: !include common/mechanical/matrix_keypad.yaml#WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
#WARNING GPIO8 is a strapping PIN and should only be used for I/O with care.
#WARNING GPIO9 is a strapping PIN and should only be used for I/O with care.
#Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
#See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
#12 13 This pin cannot be used on ESP32-C3s and is already used by the SPI/PSRAM interface (function: SPIHD).

2.基础通用配置base.yaml

# https://esphome.io/components/wifi
wifi:ssid: !secret wifi_ssidpassword: !secret wifi_passwordfast_connect: true# https://esphome.io/components/ota
ota:platform: esphomepassword: !secret ota_password# https://esphome.io/components/api
api:encryption:key: !secret api_encryption_key# 没有连接HA,默认15min会重启一次,设置为0s,将不再重启reboot_timeout: 0s# https://esphome.io/components/web_server
web_server:port: 80# https://esphome.io/components/mdns
mdns:disabled: falsetext_sensor:# https://esphome.io/components/text_sensor/version- platform: versionname: "Version"# https://esphome.io/components/text_sensor/wifi_info- platform: wifi_infomac_address:name: "Mac"ip_address:name: "IP"update_interval: 1mindns_address:name: "DNS"update_interval: 1minssid:name: "SSID"update_interval: 1minbssid:name: "BSSID"update_interval: 1min

3.密码文件secret.yaml

上面base.yaml中!secret wifi_ssid就是引用secret.yaml里面的wifi_ssid的值

# Your Wi-Fi SSID and password
wifi_ssid: "xxx"
wifi_password: "xxx"api_encryption_key: "xxx"
ota_password: "xxx"
ap_password: "xxx"

4.围栏灯four_light.yaml

# https://esphome.io/components/light/binary
light:- platform: binaryname: four_lightoutput: four_light_outputoutput:- id: four_light_outputplatform: gpiopin: 0

5.彩灯rgb_light.yaml

# https://esphome.io/components/light/rgb
light:- platform: rgbid: colorful_lightname: colorful_lightred: output_component_redgreen: output_component_greenblue: output_component_blue
# https://esphome.io/components/light/#pulse-effect
#    effects:
#        - pulse:
#        - 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
#        - pulse:
#            name: "Asymmetrical Pulse"
#            transition_length:
#              on_length: 1s
#              off_length: 500ms
#            update_interval: 1.5s
output:# https://esphome.io/components/output/ledc
#  - platform: ledc
#    id: output_component_red
#    pin:
#      number: 4
#      inverted: true
#  - platform: ledc
#    id: output_component_blue
#    pin:
#      number: 3
#      inverted: true
#  - platform: ledc
#    id: output_component_green
#    pin:
#      number: 2
#      inverted: true- platform: ledcid: output_component_redpin:number: 1inverted: true- platform: ledcid: output_component_bluepin:number: 18inverted: true- platform: ledcid: output_component_greenpin:number: 19inverted: true#output:
#  - platform: esp8266_pwm
#    id: output_component_red
#    pin: D1
#  - platform: esp8266_pwm
#    id: output_component_green
#    pin: D2
#  - platform: esp8266_pwm
#    id: output_component_blue
#    pin: D3

6.左右柱灯left_right_light.yaml

# https://esphome.io/components/light/binary
light:- platform: binaryname: left_lightoutput: left_light_output- platform: binaryname: right_lightoutput: right_light_output
output:- id: left_light_outputplatform: gpiopin: 6- id: right_light_outputplatform: gpiopin: 7

三、安装固件

在这里插入图片描述

四、HomeAssistant配置ESPHome

1.直接访问

在这里插入图片描述

2.配置ESPHome地址

如果配置了api_encryption_key,需要填写密钥
在这里插入图片描述

3.接入成功

在这里插入图片描述

http://www.whsansanxincailiao.cn/news/31982268.html

相关文章:

  • 云南专业网站优化/培训网站推荐
  • 重庆网络技术有限公司/网站关键词排名优化软件
  • 购物网站策划方案/品牌策划与推广
  • wordpress在php7.0/企业关键词排名优化网址
  • 上海网站建设服务/信息流广告投放平台
  • 360建站abc官网/营销技巧培训ppt
  • 网站建设费应开具互联网信息服务吗/东莞seo推广
  • 个体工商户是否能够做网站/2023年又封城了
  • 上海网站建设最好的公司/网推拉新app推广平台
  • 安装 wordpress/seochinaz查询
  • seo优化关键词挖掘/提高seo排名
  • 56m做图片视频的网站是什么/推广普通话手抄报
  • 网站开发java架构/赚钱平台
  • 九江建设网站/优化网站建设
  • 网站建设新零售/电商广告网络推广
  • 如何让自己做的博客网站上线/网店运营是做什么的
  • 网站建设买阿里云云服务器/如何做好产品网络推广
  • 骏域网站建设专家电话/网络推广怎么赚钱
  • wordpress隐藏/优化大师手机版
  • 网站建设更新/湖南专业关键词优化
  • 百度地图推广一年多少钱/搜索引擎技术优化
  • 网站建设白云/百度搜索引擎的特点
  • 免费下载网站模板/网页设计培训学校
  • 定制网站建设公司/国内新闻最新消息十条
  • asp网站加速/今日国际新闻头条
  • 模版网站开发/福州seo顾问
  • 做美女图片网站需要备案吗/厦门网站建设
  • 大连网站建设选高和科技/浏览器直接进入网站的注意事项
  • 做 直销网站 公司吗/上海网站外包
  • 国内漂亮网站欣赏/青岛快速排名