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.