dvd.ciri
Posts: 4
Joined: Tue May 03, 2016 10:08 pm

Connect relay + physical switch

Fri Oct 14, 2016 10:47 pm

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

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Connect relay + physical switch

Sat Oct 15, 2016 6:38 am

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

User avatar
davidcoton
Posts: 5083
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Connect relay + physical switch

Sat Oct 15, 2016 8:30 am

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.
Signature retired

Return to “Advanced users”