Simple Home Automation Using Raspberry Pi3 and Android Things




Introduction: Simple Home Automation Using Raspberry Pi3 and Android Things

About: Studying Electronics andCommunication Engineering and passionate about IOT.

The idea is to design a “smart HOME” wherein one can control household devices using Android Things and Raspberry Pi. The project consists of controlling house appliance like Light, Fan, motor etc.

Materials Required:

Raspberry Pi 3

HDMI Cable


household devices like Fan, Light bulb Etc.

Soldering Gun

Step 1: Setup

Download and Install Android Studio. Create an account on Android Things Console. Create a product using suitable product setting.

android Studio:

link for Android Console:

In the factory image select latest android version and click build configuration. In the Build configuration list download the latest build you create. This is the Raspberry Pi image of Andriod Things. Extract the downloaded .zip file to get the image of Android Things.

For more details click here:

Step 2: Flashing the Image Onto Raspberry Pi

Download and install two softwares:

·SD card formatter –used to format SD card·

Win32DiskImager – used to flash image onto SD card

In SD card formatter select the correct SD card location and click on format After formatting open Win32DiskImager select the correct device (sd card location) and correct image and click on write. After the write is successful you have completed flashing the memory card.

Step 3: Android Things Setup

Insert the SD card into the card slot in RPi3 and connect to any display using HDMI. Connect the Ethernet Cable from Router to the RPi3. Connect mouse and keyboard to the RPi3 for operations. After the OS boots up you will see the local IP address of the RPi3 being displayed.

Connect the PC to same router and open cmd. Connect to the local IP address of RPi3 using commands :

$ adb connect<ip-Address> connected to <ip-address>:5555

To connect the device to Wifi run the following command :

$ adb shell am startservice -n -a WifiSetupService.Connect -e ssid ‘network ssid’ -e passphrase ‘password’

Replace ‘network ssid’ and ‘password’ with your Wifi credentials.
Note: if you have some difficulties running adb command you may have to set the adb path in Environment Variables.

Step 4: Deploying the Application on RPi3

Download the simple UI from the samples link:

Open this project using android studio make necessary changes to the code if required.

Click on run and select the RPI3 in connected devices.

If you are unable to see your device then you may need to reconnect it using the command:

$ adb connect <ip-address> connected to <ip-address>:5555

If the run is successful then the application will be displayed on the monitor .

Step 5: Finish

Make the circuit diagram as shown in the figure.

Finally with the above steps the project is complete.

Raspberry Pi Contest 2017

Participated in the
Raspberry Pi Contest 2017

Remote Control Contest 2017

Participated in the
Remote Control Contest 2017

Be the First to Share


    • For the Home Contest

      For the Home Contest
    • Big and Small Contest

      Big and Small Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge



    Question 4 years ago

    I have an older version of the Raspberry Pi, do you think the older version would work just as good as the newer version?

    Adithya T G
    Adithya T G

    Answer 4 years ago

    I haven't tried it on older raspberry pi... I think it may work, however you may not get newest resources for it.