硬件没什么好多说的,5v1a充电头-1117出来3.3v-esp12gpio直连遥控器按键,遥控器供电也用3.3。
esphome:
esphome:
name: master-bedroom-weather-station
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "***"
wifi:
ssid: "***"
password: "***"
# Enable fallback hotspot (captive portal) in case wifi connection fails
#ap:
#ssid: "***"
#password: "***"
#captive_portal:
# 电动晾衣架开关
switch:
- platform: gpio
pin: GPIO5
id: relay1
name: "UP"
icon: "mdi:arrow-up-bold-circle-outline"
on_turn_on:
- delay: 200ms
- switch.turn_off: relay1
- platform: gpio
pin: GPIO0
id: relay2
name: "Down"
icon: "mdi:arrow-down-circle-outline"
on_turn_on:
- delay: 200ms
- switch.turn_off: relay2
- platform: gpio
pin: GPIO4
id: relay3
name: "Stop"
icon: "mdi:pause-circle-outline"
on_turn_on:
- delay: 200ms
- switch.turn_off: relay3
- platform: gpio
pin: GPIO15
id: relay4
name: "Light"
icon: "mdi:lightbulb-variant-outline"
on_turn_on:
- delay: 200ms
- switch.turn_off: relay4
- platform: gpio
pin: GPIO2
id: relay5
name: "Close"
icon: "mdi:close-circle-outline"
on_turn_on:
- delay: 200ms
- switch.turn_off: relay5
web_server:
port: 80
nodered:
flows (1).rar
(2.48 KB, 下载次数: 10)
|