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 fail-safe so the normal light switch can still be used and I want it to be updated in the home app even when the physical light switch is used. I have a esp01 relay module to make this possible (schema here).

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.

  • 1
    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, 2019 at 3:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.