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.