We have made an automation module with relay connecting the mains and the raspberry pi. We are maintaining the state for the switch on our server. We have the raspberry pi connected to the device over internet which can control the switch state. The problem we are facing is that when we turn on or turn off the switch from the physical switch on the main we are not able to get the state for the switch(whether on or off).... **is there any way to get the state from the physical switch to raspberry pi over relay*
*.
NOTE : I am a noob in electrical.

