# Welcome

### 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**.&#x20;

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.

![This is what your smart light bulb will look like](/files/-LdM4hjDp8srhbJPprjT)

### Reference code

The final result of this workshop is available on GitHub at [orestes/actions-on-google-smart-light](https://github.com/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&#x20;
* The front-end login screen to fake authenticating users when they link their accounts on the **Google Home app**

{% hint style="warning" %}
You need some hardware to follow along. Don't skip ahead, check out the [components list](/actions-on-google-smart-home-api-workshop/requisites.md) first.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://orestes.gitbook.io/actions-on-google-smart-home-api-workshop/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
