logo elektroda
logo elektroda
X
logo elektroda

Raspberry Pi - How to combine a relay module with a traditional light switch?

setesh_pl 4947 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 13568579
    setesh_pl
    Level 10  
    Posts: 5
    Warm welcome,

    i am currently picking up a flat and am considering (in the shorter / longer term future) the possibility of controlling the lighting from the Raspberry Pi. Looking through various forums, I see two general approaches:
    1) can-mounted bistable relays, controlled via the Raspberry Pi.
    2) a relay module for the Raspberry, where I connect 220V (I would probably go with this solution as 'safer' than building this myself).

    Also what puzzles me is assuming approach 2 (using the relay module for the raspberry) on the wiring side I would have to pull two strands of wire from the switch box to where the raspberry pi is. Please can you confirm. .

    How, in such a solution, do I maintain the ability to turn the light on/off both via the Raspberry Pi (via control of a specific GPIO) and via a traditional light switch (in a scenario where the manual switch has priority -> i.e. when it is in the on state the light is on regardless of the GPIO state, when it is in the off state it is off regardless of the GPIO state).

    Do I need a larger light switch box for such an installation ?

    kind regards!
  • ADVERTISEMENT
  • Helpful post
    #2 13571471
    snoppy
    Level 11  
    Posts: 21
    Help: 1
    Rate: 14
    You would have to have some sort of three-position wall switch (1 - always on, 2 - always off, 3 - raspberry) - a rather unusual (expensive) thing.
    Alternatively you could use two stair buttons connected as below:
    Raspberry Pi - How to combine a relay module with a traditional light switch?
    where:
    1 - 220V from Raspberry (as long as this Raspberry relay can handle such current)
    2 - "constant" 220V
    3 - nothing
    4 - 220V to the lamp

    Then switch B would determine whether the lamp control goes from switch A or from the Raspberry.
  • #3 14004873
    arkady_pl
    Level 24  
    Posts: 574
    Help: 59
    Rate: 24
    I personally would use relay systems controlled via a TCP/IP network. This type of network is often readily available in a flat, there are more and more devices from Polish manufacturers that use this network, and there are quite a few devices that can be managed via web services or modbus on TCP/IP.

    Of course, the PI can then be as a server which contains the control software by sending commands rather than controlling the actuators e.g. via GPIO.

    Good luck!
ADVERTISEMENT