本帖最后由 se7en 于 2017-9-7 19:42 编辑
固件固件更新,加入原风扇物理控制,状态反馈。
按钮接线方法:gpio0和gnd接低档位按钮两脚,
gpio2和gnd接中档,gpio14和gnd接高挡,gpio5和gnd接空挡(关按钮)
继电器接线方法:8266的gpio12接抵挡继电器电平输入(橙色),gpio15接中档继电器(橙色),gpio4接高档继电器(橙色)
三个继电器接法
橙色接上面说的各继电器gpio脚位(低12,中15,高4),红色接gnd,蓝、黄接原物理按钮拆下来的2根线。继电器代替原物理档位开关。
模块和继电器供电:220v to 3.3
改装后效果:
hass配置文件代码:
fan:
- platform: mqtt
name: "fengshan2"
state_topic: "home/fengshan/2/stat"
command_topic: "home/fengshan/2"
oscillation_state_topic: "home/fengshan/2/stat"
oscillation_command_topic: "home/fengshan2"
speed_state_topic: "home/fengshan/2/stat"
speed_command_topic: "home/fengshan/2"
retain: false
qos: 0
payload_on: "1"
payload_off: "0"
payload_low_speed: "1"
payload_medium_speed: "2"
payload_high_speed: "3"
payload_oscillation_on: "4"
payload_oscillation_off: "5"
speeds:
- low
- medium
- high
库文件
pubsubclient-master.rar
(62.08 KB, 下载次数: 440)
书记的两台风扇已改装,完美使用中!书记改装经验:下掉档位卡扣,即可变成电动开关,自动回弹
|