|
爱科技、爱创意、爱折腾、爱极致,我们都是技术控
您需要 登录 才可以下载或查看,没有账号?立即注册
x
看了 易记 大佬的帖子,入手了 8.5 五孔的小葱智能插座,感谢大佬分享,帖子地址如下
8.5元联想smartPlug SE-341智能wifi插座拆解、刷机天猫语音控制-超低价ESP8266开关 - 创意DIY 数码之家 (mydigit.cn)
关于内部实拍图已经有分享了,这里也不重复发了
五孔8266开始玩 - 创意DIY 数码之家 (mydigit.cn)
目前已经刷好 ESPHome,分享一下 yaml 配置吧,初学小白第一次发帖,大佬轻喷
- esphome:
- name: esp_switch_02
- platform: ESP8266
- board: esp01_1m
- wifi:
- ssid: "****"
- password: "****"
- ap:
- ssid: "Esp01 Switch 02 Fallback Hotspot"
- password: "EcQvdMTs9PIE"
- captive_portal:
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- web_server: ## 这个是web控制,添加了这2行,就可以打开设备ip,有控制页面
- port: 80
- light:
- # 红灯
- - platform: binary
- name: "Status Led Red"
- output: light_output_red
- id: statusledred
- internal: true
- # 绿灯
- - platform: binary
- name: "Status Led Green"
- output: light_output_green
- id: statusledgreen
- internal: true
- restore_mode: ALWAYS_ON
- output:
- - id: light_output_red
- platform: gpio
- pin: GPIO4
- inverted: true
- - id: light_output_green
- platform: gpio
- pin: GPIO16
- inverted: true
- switch:
- - platform: gpio
- name: "Switch Rel" ## 名称可以自定义
- pin: GPIO14
- id: relay
- restore_mode: ALWAYS_ON # 通电默认打开
- on_turn_on:
- then:
- - light.turn_off: statusledred
- - light.turn_on: statusledgreen
- on_turn_off:
- then:
- - light.turn_off: statusledgreen
- - light.turn_on: statusledred
- binary_sensor:
- # 物理按钮开关
- - platform: gpio
- pin:
- number: GPIO5
- mode: INPUT_PULLUP
- inverted: true
- name: "Power Button"
- internal: true
- on_press:
- then:
- - switch.toggle: relay
- - logger.log: "Power Button Turned Press!"
- filters:
- - delayed_on_off: 10ms
- - platform: status
- name: "Switch Status"
- text_sensor:
- # 输出IP地址
- - platform: wifi_info
- ip_address:
- name: ESP IP Address
复制代码
|
打赏
-
查看全部打赏
|