本帖最后由 liantianji 于 2020-2-29 17:27 编辑
最后还按natic的贴子的方案搞定https://bbs.hassbian.com/thread-6128-1-1.html
使用esp8266 + 继电器接MQTT的方案模拟成开关,入户线一共2根,1根接COM另1根接常开ON有呼入的时候手动打开开关,参照https://tasmota.github.io/docs/#/Rules
然后在tasmota固件中加入rule
Rule1
on System#Boot do power1 off endon
on power1#state=1 do RuleTimer1 2 endon
On Rules#Timer=1 do power1 off endon
自动化2秒后自动关闭开关
configuration.yaml中加入配置
switch:
- platform: mqtt
name: 楼道门开关
state_topic: stat/sonoff/POWER
command_topic: cmnd/sonoff/POWER
qos: 1
retain: false
|