Real time switch feedback using nodemcu

I’m working on home automation project where I need the feedback from the physical switches. So if someone switches on the light using the physical switch, it should reflect in my mobile phone app. I don’t want to use Blynk or Ubidots for this purpose. If anyone can help me with this it would be greatly appreciated. I’m searching for this for a week now.

Thank you