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 (the cheap way). Let me explain you the details:
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.
Is theres any way, where i can change the state of the relay when 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? I want to be able to control the lights from the manual switch and the raspberry also, but that it display the current status on the software
Thanks in advance