Part 6 - Bathroom Mirror with mirror heating

I have a large bathroom mirror with 2 (engraved) touch sensor ereas, surround LED lights (CCT) and a mirror defogger (220v controlled by a relay).

Materials

ESP32 NodeMCU board

Relay module 1 channel – contacts 10A/250VAC – coil 5V

 

 

a mirror defogger (220v controlled by a relay) installation

将NodeMcu的D0 <---> 继电器的IN
NodeMcu的VU <---> 继电器VCC (由于继电器需要5V电压, 此端口提供5V电压)
NodeMcu的GND <---> 继电器GND

强电部分连线 	
火线220V----> 继电器公共端(COM) ----> 常开端(NC) --> 电灯 (除雾膜)<---零线

继电器示-1.png

 

 

Relay-module-1-channel-2.avif

source:https://chochol.io/wp-content/uploads/2024/01/Add-a-little-bit-of-body-text-768x432.png

 

Install the code on the board

code

output:
  - platform: gpio
    pin: 
      number: GPIO14
      mode:
        output: "True"
        open_drain: "True" 
    id: relay_1
    inverted: true

light:
  - platform: binary
    name: "Oświetlenie lustra"
    output: relay_1
    restore_mode: ALWAYS_OFF
    id: light_1 

 

Useful links

https://www.matterxiaomi.com/boards/topic/29088/%E6%B5%B4%E5%AE%A4%E9%95%9C-%E5%8D%AB%E6%B5%B4%E9%95%9C/page/3#47688

https://chochol.io/en/smart-home/home-assistant-installing-mirror-lighting-on-esphome/

 

Comments


Comments are closed