Welcome

How to follow this workshop

What we are going to do

We are going to build an Arduino project that mimics a Smart RGB Light Bulb. The project will connect to the internet on its own and get its configuration from the Firebase Realtime Database.

We will then connect our project to the Actions on Google platform, which will enable us to control our light by changing its color or intensity. To issue commands, we'll be able to use our voice with the Google Assistant on our phone or any other voice-enabled device like a Google Home, Google Nest Mini or Google Nest Hub.

Objective

The main goal is to have fun writing simple code and learning new things together.

When you complete this workshop, you will have learned:

  • How to wire up a simple Internet of Things project using an esp8266 board and one RGB LED compatible with Adafruit's NeoPixels

  • How to install and configure your Arduino IDE to work with esp8266 boards

  • How to connect to and get real-time updates from the Firebase Realtime

    Database from your Arduino project

  • How to write a JavaScript HTTP API integration with the actions-on-google SDK

  • How to set up your Actions on Google project to enable the Smart Home API integration.

Expected result

You will be able to ask the Google Assistant to, for example:

  • Turn your light on or off

  • Set your light to any color (even teal?, what kind of blue is that?!)

  • Set your light's intensity to a percentage

  • Turn the light's intensity up or down

You will be able to all of this using in any language supported by the Google Assistant, and run any other commands related to lights.

In other words, your project will behave exactly like any other off-the-shelf smart light bulb.

Reference code

The final result of this workshop is available on GitHub at orestes/actions-on-google-smart-light

This repo contains

  • The Arduino code for the smart light project

  • The Firebase Cloud Functions code to integrate with the Actions on Google Smart Home API

  • The front-end login screen to fake authenticating users when they link their accounts on the Google Home app

You need some hardware to follow along. Don't skip ahead, check out the components list first.

Last updated