本帖最后由 671792320 于 2019-10-28 09:53 编辑
前些日子一直想折腾下灯的开关,但是无奈单火一直没有下手。终于前些天的时候下手了。购买清单如下
单火单开模块*2
三开触摸面板*1
四开触摸面板*1
购买回来的易微联单火模块WiFi芯片写的是psf-b01或者psf-b05其实内部都是ESP8285芯片,好了开始刷机。 同时也适用于论坛改装模块或者触摸面板
模块已经引出了tx rx只需要按下按钮即可进入刷机模块,还是很简单的。
重点说下4开模块(坑苦我了)esp8285的rx tx没有引出来、需要自己飞线放图,4开模块有一个刮掉点的就是gpio0
然后是三开模块
。欧克剩下没有图了。产品图借用淘宝的。
改装模块还有这个东西其实都跟论坛的长的一样。
正题。esphome配置
改装模块搭配机械双控单开开关内容如下
esphome:
name: light_ciwo
platform: ESP8266
board: esp8285
wifi:
ssid: "xxx"
password: "xxx"
reboot_timeout: 0s # 无wifi连接自动重启时间,默认5min
power_save_mode: none # 节能模式,启用的话不会一直连接wifi
fast_connect: on # 快速连接,不执行完整的wifi扫描,当存在多个相同wifi可能会直接连接到最弱的信号
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
safe_mode: true # 连续10次启动失败,进入安全模式,只加载Serial Logging+WiFi+OTA组件
light:
- platform: binary
name: "light_ciwo"
id: light_ciwo
output: relay
output:
- platform: gpio
pin: GPIO12
id: relay
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
name: "light_ciwo wuli kai guan"
internal: true
on_press:
then:
- light.toggle: light_ciwo
on_release:
then:
- light.toggle: light_ciwo
status_led:
pin:
number: GPIO13
inverted: yes
三开触摸开关(用来改的卫生间的浴霸。一共三个开关、照明、风暖、换气、双电机。这个开关说的最大支持2000W但是我的浴霸是2069w的。希望不会挂模块,模块是用的零活模块,取零线方便就是任性啊)
esphome:
name: toilet
platform: ESP8266
board: esp8285
on_boot:
priority: -10
then:
- light.turn_on: blue_led_light
wifi:
ssid: "xxx"
password: "xxx"
reboot_timeout: 0s # 无wifi连接自动重启时间,默认5min
power_save_mode: none # 节能模式,启用的话不会一直连接wifi
fast_connect: on # 快速连接,不执行完整的wifi扫描,当存在多个相同wifi可能会直接连接到最弱的信号
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
safe_mode: true # 连续10次启动失败,进入安全模式,只加载Serial Logging+WiFi+OTA组件
light:
- platform: binary
name: "yuba_light"
id: yuba_light
output: relay
- platform: monochromatic
name: "Sonoff T1 UK 3 Gang Blue LED"
output: blue_led
internal: true
id: blue_led_light
fan:
- platform: binary
name: "yuba_fengnuan"
id: yuba_fengnuan
output: relay1
- platform: binary
name: "yuba_huanqi"
id: yuba_huanqi
output: relay2
output:
- platform: gpio
pin: GPIO12
id: relay
- platform: gpio
pin: GPIO5
id: relay1
- platform: gpio
pin: GPIO4
id: relay2
- platform: esp8266_pwm
id: blue_led
pin: GPIO13
inverted: True
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
name: "yuba_light Physical Switch Sensor"
internal: true
on_press:
then:
- light.toggle: yuba_light
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
name: "yuba_fengnuan Physical Switch Sensor"
internal: true
on_press:
then:
- fan.toggle: yuba_fengnuan
- platform: gpio
pin:
number: GPIO10
mode: INPUT_PULLUP
name: "yuba_huanqi Physical Switch Sensor"
internal: true
on_press:
then:
- fan.toggle: yuba_huanqi
四开(接的客厅灯,单火由于客厅灯功率为100W所以没有并联电容也不闪烁或者发生其它的问题)
esphome:
name: living_room
platform: ESP8266
board: esp8285
on_boot:
priority: -10
then:
- light.turn_on: blue_led_light
wifi:
ssid: "xxx"
password: "xxx"
reboot_timeout: 0s # 无wifi连接自动重启时间,默认5min
power_save_mode: none # 节能模式,启用的话不会一直连接wifi
fast_connect: on # 快速连接,不执行完整的wifi扫描,当存在多个相同wifi可能会直接连接到最弱的信号
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
safe_mode: true # 连续10次启动失败,进入安全模式,只加载Serial Logging+WiFi+OTA组件
light:
- platform: binary
name: "light_keting"
id: light_keting
output: relay
- platform: binary
name: "light_keting_tongdeng"
id: light_keting_tongdeng
output: relay1
- platform: binary
name: "light_keting_dengdai"
id: light_keting_dengdai
output: relay2
- platform: binary
name: "light_keting_xuanguan"
id: light_keting_xuanguan
output: relay3
- platform: monochromatic
name: "Sonoff T1 UK 3 Gang Blue LED"
output: blue_led
internal: true
id: blue_led_light
output:
- platform: gpio
pin: GPIO12
id: relay
- platform: gpio
pin: GPIO5
id: relay1
- platform: gpio
pin: GPIO4
id: relay2
- platform: gpio
pin: GPIO15
id: relay3
- platform: esp8266_pwm
id: blue_led
pin: GPIO13
inverted: True
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
name: "light_keting Physical Switch Sensor"
internal: true
on_press:
then:
- light.toggle: light_keting
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
name: "light_keting_dengdai Physical Switch Sensor"
internal: true
on_press:
then:
- light.toggle: light_keting_tongdeng
- platform: gpio
pin:
number: GPIO10
mode: INPUT_PULLUP
name: "light_keting_tongdeng Physical Switch Sensor"
internal: true
on_press:
then:
- light.toggle: light_keting_dengdai
- platform: gpio
pin:
number: GPIO14
mode: INPUT_PULLUP
name: "light_keting_xuanguan Physical Switch Sensor"
internal: true
on_press:
then:
- light.toggle: light_keting_xuanguan
以上直接ha发现并自动接入homekit下。完毕
|