IoT integration with Actions on Google: the workshop

Shiny first batch of 15 kits. Lovingly hand-crafted. Well, and laser-etched.

This summer I worked on a talk about IoT projects and how to control them using the Google Assistant via Actions on Google. Both topics working together are fascinating and really make me feel like we live in the future. “Hey Google! Turn on the lights!”. And it works! I can’t get over it.

My Internet of Things journey started with an expensive Arduino kit circa 2011. Back then I didn’t even know what IoT was bringin to the table. To me, it was all about the electronics, the gadgets, lights, switches. It was so fun, but at the same time, kind of obscure to me, as well as a bit expensive and limited in the possibilities I saw back then.

Today we live in a world where learning about IoT is much easier and getting started is far cheaper. Still, most developers I know confine their creativity to screens, whether computer or mobile phones, and their creations rarely span beyond that. I’m trying to change that through fun, engaging talks about the state of IoT and how easy and rewarding it is to get started nowadays.

The talk is somewhat interactive, and features an interesting demo, but I think I can’t get people to get hyped enough to try for themselves so I thought a hands-on workshop would be a great addition to the talk. It would be for people that really can’t wait to try it and would rather skip most of the talk, or maybe for people who needed a bit of help dipping their toes in the IoT realm.

The idea

Come, learn IoT, learn about AoG, and have fun! You get a kit with everything you need for the workshop and you can take it home so you can keep experimenting on your own.

The workshop is designed to remove most barriers people face when starting with IoT. Which components do I need? How do I connect them? How do I prototype with them? How do I debug this?

It also needed to guide and explain through examples how the Smart Home integration works with the Google Assistant and Actions on Google.

The small IoT-enabled RGB LED project that we build together in the workshop

Making of

Since I already had the talk material ready, the part about Actions on Google was just about done. I spent most of my time putting together a project that was simple, yet dynamic enough to showcase the possibilities a creative person would be able to develop in the IoT space.

I settled for a smart light-bulb replication. Using a RGD LED, it would allow a user to change the light color and switch it on and off. With a clear goal in mind, I set out to create a kit that would be easily upgradeable. I wanted to use small cardboard boxes, and get people a ready-to-assemble kit with everything they needed for the workshop, but would also serve as a platform to help them learn beyond the basic and get re-used in further workshops.

Being one of the most popular choices, I went for an ESP8266-based board. These are incredibly cheap and versatile. The ESP8266 community has made available a lot of libraries and utilities that really make a difference for small creators and beginners.

“I love it when a plan comes together”

After debating how to label the boxes and deciding a stencil would be incredibly difficult and a sticker too impersonal, I spent a couple of afternoons at A Industriosa, our local maker space, borrowing the laser cutter. Learning to use this thing equal parts nerve-wracking and fun. I owe a special thanks to Sabela for helping me get started :)

The first iteration

We had a small number of attendees and some technical difficulties, but it was a well received workshop and some participants event sent me thank you notes through different media.

There’s details to improve but it was a positive first experience overall :)

Let there be light!

What’s in the box?!

Official unboxing (get it?)

The kit is made of

  • Laser-etched box
  • Solder-less prototyping board
  • Jumper cables (male to female, male to male)
  • USB micro cable
  • ESP8266-based board (WeMos D1 mini)
  • RGB LED (common cathode, let’s be kind)

These compones are easy to find, replace, and cheap when bought in bulk. Anyone attending the workshop would need to bring only their laptop with a USB port available (this is getting trickier lately).

Ready to get started

The outline

This workshop is divided into two parts

IoT introduction, where we learn about the very basics of IoT, like how to put the components together, and we assemble a few simple projects. The last project will be a wi-fi enabled box, which will provide an HTTP API allowing you to control the RGB LED down to the color mix, as well as switching it on and off. All of the code is written for Arduino.

Actions on Google integration, where we learn about the requisites to build a Smart Home project for Actions on Google. The code for this section is written in TypeScript, and made available for the attendees in case they get stuck following the workshop guide.

Following along

Want to attend or host one of these workshops?

I’m planning on hosting more editions of this workshop in 2019, but you can also try the workshop home, buying the specific components and following along.

If you’re into IoT and Actions on Google and want to host one of these workshops, please do! You can use the reference material, contribute to it and expand on it as much as you want.

I will be open sourcing the workshop guide for anyone to contribute to and use. The materials still need some work, so please be patient. I will update this post whenever they become available, I promise!

Conclusion

If coding gives you a warm fuzzy feeling, engages your creative brain and makes you enjoy your work, I think you would love to thinker with IoT. These projects open the door to another set of fun problems and ideas that will keep you engaged and get you that feeling of accomplishment when something you put together works.

Mixing IoT with technologies you already now and love (like Actions on Google) makes the experience less frustrating, since there’s part of the technology stack you’re already familiar with.

Learning in a workshop, accompanied by like-minded peers,without having to worry about which specific components to buy, and having detailed instructions, reduces the entry barrier a lot.

Participants tinkering with their boards

Acknowledgements

This first workshop was sponsored by Google through the Google Developer Groups program. They covered the cost of the materials so nobody had to pitch in. Both my wallet and me are thankful for their support :)

It was hosted at the IV edition of Maker Faire Galicia. It was my first Maker Faire as instructor and I loved it. Thank you for organising such a big event, and thanks for having me!

The workshop was part of GDG Vigo’s event calendar. GDG Vigo is part of VigoTech, a community cluster based in Galicia, Spain.

Sadly, this giant robot wasn’t there the day of the event.