Lights Relay Rail

by Dimitris_Arch in Circuits > Microcontrollers

101 Views, 1 Favorites, 0 Comments

Lights Relay Rail

2048-922-max.jpg

Home assistant simple project with 2 esp8266, 1 relay module and 1 stc013 on aller retour stairway ligths

The stc913 reading the voltage when ligths are on and an automation switch's momentary the relay module after a delay

circuit_image.png

After adding each esp8266 to the esphome builder via esphome web , edit the code adding simple attched codes

There is no need for accurancy for the stc013 ,only the amperage changes,so resistors and capacitors are not needed

Downloads

1.jpg
2.jpg

Adding the automation ,home assistant reading amperage changes when lights are on and after 75 seconds delay fires up the relay.This is a aller-retour connection so i made an If statement to specify the code running only if at the end delay lights are still on , or someone closed manually


Downloads

dashboardSwitch.jpg

Final step to add the switch with the on-off state to the dashboard with 2 automations(can easily be at one automation combined but i prefer pure simplicity)

Thats all