Diy Remote Control For Google Home And Chromecasts

About the project

This project is a 2 in 1 remote control which can be used to control both chromecast and google home.

Connectivity  Contest WinnerConnectivity contest winner

Project info

Difficulty: Easy

Platforms: GoogleRaspberry PiPimoroni

Estimated time: 1 hour

Items used in this project

Hardware components

Pimoroni Button shim Pimoroni Button shim x 1
Raspberry Pi Zero W Raspberry Pi Zero W x 1

Hand tools and fabrication machines

Soldering Iron Soldering Iron x 1

Story

Normally, the Google Home permits only control by touch and voice and you always need to have your smart phone/tablet by your side to control Chromcasts. Moreover, neither touch, nor voice commands can match the satisfaction that a clickable control offers.

This project implements a 2in1 remote using which you can control both your Chomecast and Google Home.  The project costs just about $15 and you need not think twice before handing over this remote to your kids, unlike your smart devices.


Demo Video:


Step-1 - Install drivers for Button SHIM using:

  1. sudo curl https://get.pimoroni.com/buttonshim | bash


Step-2 - Install dependencies using:

  1. sudo apt-get install git
  2. sudo pip3 install pychromecast


Step-3 - Clone the project using:

  1. cd /home/pi/
  2. sudo git clone https://github.com/shivasiddharth/pi-gcast-remote


Step-4 - Declare your Google Cast devices in the g-cast-controller.py script

  1. #Enter the IP Addresses of your Google Cast devices
  2. chromecasts_ip=['192.168.1.4','192.168.1.13']
  3. #Enter the names of the Google Cast devices as in the Google App
  4. chromecasts_name=['Living Room Speaker','Living Room TV']


Step-5 - Setup the script to start on boot using:

  1. sudo chmod +x /home/pi/pi-gcast-remote/scripts/service-installer.sh
  2. sudo /home/pi/pi-gcast-remote/scripts/service-installer.sh



Step-6 - Enable the service to start on boot:

  • sudo systemctl enable gcastremote.service

  • To switch between the devices, press and hold the A button/key.


    Note: pychromecast API takes time to get the list of active devices, hence continuous device status monitoring has not been added as it would cause delays to get a response from a device on button press. So the remote control program should be started after making sure that your devices are online.

    Code

    pi-gcast-remote

    DIY Remote control for Google Cast Devices using Raspberry Pi Zero and Pimoroni Button SHIM

    Credits

    Leave your feedback...