Page 1 of 1

Connect relay + physical switch

Posted: Fri Oct 14, 2016 10:47 pm
by dvd.ciri
Hi Guys,

I have a Raspberry pi2 that is controlling a relay board, so i can control the light of my house. I'm trying to find a way to have a physical switch that is controlling the single light as well, so it can be controlled from the relay and from the switch.

Ideally i need find a way to let the pi know if the physical switch tuned on/off the light, but if it require wifi switch of something really expensive i can work around that..

Any thought? Any suggestions?

Thanks

Re: Connect relay + physical switch

Posted: Sat Oct 15, 2016 6:38 am
by lmarmisa
I am not sure if I understand your post. Perhaps a wifi smart plug would be useful for your project:

http://www.tp-link.com/en/products/deta ... HS100.html

https://georgovassilis.blogspot.com/201 ... smart.html

Re: Connect relay + physical switch

Posted: Sat Oct 15, 2016 8:30 am
by davidcoton
There is a standard way (well, two actually) of wiring two-way switching, using SPDT switches. One of the switches could be a Pi-controlled relay.

For the Pi to know whether a light is on or off requires some form of feedback. This should be opto-isolated for safety.

If you don't understand two-way switching, you shouldn't be messing with mains wiring. Mistakes with mains can destroy you Pi, or burn down you house, or injure people (including fatal accidents). If you must, get a qualified electrician to show you what to do, and to check that all your wiring is safe.