Hmm... I see a lot of questions about why I want to do that.
I'm making some kind of house network. Many small arduinos (Arduino Pro Mini) in many places making many things and comunicating to each other with 2.4GHz transmitters.
This node will be bigger hub. But it nedds to control light. Problem is that light needs to be controlled by 2 switches on 2 levels.
Switch on lower level will be sending wireless message to hub when its state change, but switch on upper level is strangely placed so I can't fit receiver and relay in it to switch lamp on/off and I can't place box near it because it would be visible. The good thing is that upper switch is currently connected to lamp. What I thought about is that this hub (placed under lamp) will be controlling lamp. Getting wireless state of lower switch and detecting upper switch which I will disconnect from lamp and connect to the system. Turning light on/off with relay is piece of cake.
I'm not sure how to implement detecting AC Power from upper switch. As nsayer said, I can use MID400. I think this is good idea, but I am not well educated in electrical and electronical laws. I'm better programmer
This is how I see this hub system for now:
I looked into MID400 datasheet and I didn't found anything about maximum AC Voltage (maybe I'm just blind). How can I calculate what resistors to put on AC input to MID400 to not burn anything? On way from upper switch to hub I have totally no load. Just 2 wires that were connected straight to lamp, providing it with power.
I think I could search for alternative of MID400 just because of its availability in Poland. I don't want to pay enormous money for single element. I'm used to transport cost at about 0.50 - 1.50$ not 10$
But I'm not sure what I'm looking for...