I'm trying to get into setting up my own home automation. I've already setup HAP-NodeJS & MQTT on a raspberry and I've flashed a esp01 with NodeMCU.

What I want to do is create a light switch with the esp01 that has a failsafe so the normal light switch can still be used and I want it to be updated in the home app even when the physicall light switch is used. I have a esp01 relay module to make this possible (schema here https://github.com/IOT-MCU/ESP-01S-Relay-v1.0/blob/master/ESP-01S%20Relay%20v1.0%20Schematic.pdf).

However I can't find any good tutorials on how to make this work (code for the esp & HAP-NodeJS, I was hoping someone could help me or point me into the right direction.

  • you would have to wire the light switch and the relay in a 3-way configuration and include a current sensor to detect when the light is turned on – jsotola May 29 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.