Tested on:Raspberry Pi 2; Raspberry Pi B+; Python 2.7; Raspbian pre Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
Hardware:433 Mhz Sender
10-pole-DIP switch RC switches
0

Cheap home automation: a Raspberry Pi with RC switches

Pi-switch is easily setup and configured to trigger 10-pole DIP switch RC switches. Adding in a microphone, it’s possible to use Jasper for voice-controlled switches. Another excellent add-on to an personal home automation system is the Raspberry Pi web interface WebIOPi.

This article is a wrap-up and demonstration of the great pi-switch GitHub repository from Alexander Rüedlinger, thank you very much!

The coding examples are for Type A, aka 10-pole DIP switch RC switches. For the usage of other switch types, see the pi-switch GitHub repository. Additionally, see the list of devices which work with pi-switch.

Setup and Installation
Type in the terminal

Sender assembly and GPIO connection
In the picture below, a tiny 433Mhz sender was soldered to three pin connectors which are top right = 3.3V, bottom left (aData) = board pin 11 and bottom right = GND.

433 Mhz RC sender

433 Mhz RC sender

Configure the switches
Pollin for example offers these A-type switches. They have a little screw on the backside which locks the DIP switch. In the picture below, the DIP switch is configured for sender code 11111 and reciever code 10000.

RC reciever DIP switch configured 11111 10000

RC reciever DIP switch configured 11111 10000


Usage from terminal

This sends an off signal to an A-type switch with sender code 11111 to the switch with the reciever code 10000.

Python script

Another option is to hack the switches chip like explained in this google code article or to hack the buttons like this early attempt at home automation:

Hacked RC switch buttons can be controlled via Raspberry PIs GPIO

Hacked RC switch buttons can be controlled via Raspberry PIs GPIO

In action:

Links
Voice recognition with Jasper: http://www.knight-of-pi.org/voice-control-jasper-raspberry-b-plus/
Webinterface WebIOPi tutorial: http://www.knight-of-pi.org/webiopi-a-simple-but-great-web-api-for-the-raspberry-pi/
Pi-switch on GitHub: https://github.com/lexruee/pi-switch-python
RC-Switch Wiki: https://code.google.com/p/rc-switch/wiki/HowTo_OperateLowCostOutlets
RC-Switch compatibility wiki: https://code.google.com/p/rc-switch/wiki/List_KnownDevices
Pollin A-type switches: http://www.pollin.de/shop/dt/MzMzOTQ0OTk-/Haustechnik/Funkschaltsysteme/Funksteckdosen_Set_mit_3_Steckdosen.html
Google code for hacking switch chips: https://code.google.com/p/rc-switch/wiki/HowTo_HackRemoteControl

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.

Comment

Time limit is exhausted. Please reload CAPTCHA.