Control relays connected to you RaspberryPi using Android app. Setup multiple RaspberryPi devices around your house. Single device can operate up to 8 relays and all of them are self-discoverable using lightweight network protocol. No complicated setup. Name each relay, give its type (button, switch) and operate it from a dead simple app interface.
For ex. you can connect one of your RaspberryPi to a garage door and furnace blower, and another device to a house ceiling fan and be able to control them using Android app when you are on your home network with a click of a button.
Step 1: Install Android App
Install RaspberryPi Switch Android app from Google Play
When connected to home WiFi, app discovers all available switch-servers on your local network and allows you to control them. Discovery mechanism relies on broadcasting UDP messages, so your network router should not drop packets with broadcast addresses (by default broadcast messages are not dropped by consumer-grade routers unless you configured your network differently)
Step 2: Install Raspbian OS
You can find full instructions on official RaspberryPi website
Quick steps for Mac users to copy image on SD card
1. Download RaspberryPi image
2. Identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)
3. unmount it
4. Copy image on your SD car (takes a very long time, to speed it up use /dev/rdisk# instead of /dev/disk#)
Default credentials that come with the image
Step 3: Install Pi4j library
Pi4J is an API and implementation libraries for Java Applications to access the full I/O capabilities of the Raspberry Pi platform. Full instructions can be found on pi4j webiste or simply run the following command in the RaspberryPi terminal
Step 4: Connect RaspberryPi to your local home network
You can connect your RaspberryPi to a home network using:
- WiFi adapter
- Powerline Adapter
- wire it directly to your router
Quick tip if you are using Edimax WiFi USB adapter:
1. Replace content of the file /etc/network/interfaces (sudo vi /etc/network/interfaces) with
2. Disable WiFi adapter power safe mode
3. Reboot
For more detail: Simple home automation. RaspberryPi + Android