Beginner Question - Home Automation Light Switch

Thread Starter

Juan Sanjur

Joined May 22, 2015
1
Hi all,

First of all, im a total beginner on Electronics, pretty much zero, just starting basic course currently. Im currently working on a home automation project and ive came across a roadblock and hopefully someone can tell me if what i want to do is possible and maybe point me to the right direction.

This question is specific for controlling lights using a relay. Let me explain you the details:

Parts:
Raspberry Pi Model 2 using Domoticz software
2 Channel 5V Relay Shield Module
Dual single pole wall on off toggle switch
Dual three way wall on off toggle switch

Goal: Control the lights manually and also tru the relay.

Ok, so far this is what i have done.
Using the 3way toggle switch, I followed this guide: https://en.wikipedia.org/wiki/Multiway_switching and i was able to make it work. I can switch on and off the light from the manual toggle switch and i can turn on and off the light from the relay (controlled by the Raspberry Pi)

Ok, so what seems to be problem then... The software im using to control the relay from the raspberry is Domoticz, and it only reads the state of the relay (or the gpio), if its on or off and reflect that status visually on the software. The situation is when for an example, i turn on the light manually, on the software will appear as off, and if i turn it off on my software then it will appear as on and so on, so basically the state of the light on the software is all messy all the time.

Ok, now that i gave a little bit of background i can ask you guys what i would like to do.
Is theres any way, where i can turn on/off the relay by turning on and off the toggle switch? And also control the relay trough the raspberry? Is theres any other alternative to my situation that can be applied here?

My question comes mainly from the fact that i also got a Zwave Enerwave ZWN-RSM2 and connected it using the single pole toggle switch and once everything was plugged in whenever i used turned on or off the toggle switch i could hear the relay working, therefore i thought, is this possible with a normal non zwave relay? Having the toggle switch activate the relay.

Anyways, i dont know if i explained myself correctly (english is not my first language) so hopefully you can shed some light or give possible alternatives to the situation

thanks in advance,

Juan
 

Alec_t

Joined Sep 17, 2013
14,316
In order for the software to recognise that a switch has been operated manually you will need to provide feedback to the Pi via an optoisolator or transformer; otherwise your whole Pi set-up risks being at mains potential and so could KILL you :eek:.
 
Top