Get Connected Blog | Nordic Semiconductor

How to Interface the Nordic Thingy:52 with Amazon Alexa

Written by Petter Myhre | December 4, 2019

The Nordic Thingy:52 is designed to be as flexible as possible. With a few steps, it can even be controlled by the Amazon Alexa voice recognition system.

Voice control is a fast-growing trend in consumer technology. One in four Americans now own a smart speaker, with 40% of those owning multiple devices. The number of US-based speakers activated increased from 47.3 million in January 2018 to 66.4 million in January 2019.

Those figures should make it clear that any IoT device aimed at the home market should at least consider how it could work with voice control.

The Nordic Thingy:52 prototyping platform allows you to work through at least part of the process and test out your ideas. Amazon Alexa Voice Service is able to interact with the Nordic Thingy:52 through voice commands, with a little help from a Raspberry Pi.

Read more: Inside the Nordic Thingy

To be clear, the Alexa isn’t talking directly to the Thingy:52. However, the addition of the Raspberry Pi gives you a short-cut to help get started with prototyping some voice solutions.

Watch how it works

In this video example, you can see a demonstration that uses an Alexa-enabled Sonos One speaker to capture the voice commands. These are sent to the AWS cloud. A Raspberry Pi monitors the same AWS Cloud and then interfaces with the Thingy:52 over Bluetooth LE as required.

As the video illustrates, it’s possible to receive the temperature sensor reading from the Thingy and set the colour of its LED. It’s also possible to play a sample audio sound from its speaker.

Teaching Alexa about the Thingy

For this to work, you need to create an Alexa Skill that will receive these voice commands. Skills are simply capabilities, either built-in or “taught” to the speaker using the Alexa Skills Kit.

When in place, the Skill triggers an AWS Lambda function that interfaces with an AWS IoT Thing Shadow. This either updates the Shadow, or fetches data from it. A device's shadow is a JSON document used to store and retrieve current state information for a device. The Device Shadow service maintains a shadow for each device you connect to AWS IoT.

The Raspberry Pi pushes temperature data to that Shadow, and also listens for changes. So when the LED colour is requested through the Voice command, the Raspberry Pi will communicate with the Thingy over Bluetooth LE to change its colour.

It works when you’re not even home

As you’ll also see from the video, it’s possible to interface with the Thingy using Amazon Alexa even when you’re not at home.

Read more: Voice Control in the Smart Home

This works via the Amazon app, which Alexa owners can use to speak to their device no matter where in the world they are. This feature in particular opens up many potential use-cases for developers keen to get started in the world of voice control.

For example, it could be used to turn on/off festive decorations, and even play a song through the speaker whenever this is done using Alexa Routines. Other possibilities include checking temperature or if doors are closed while you are not at home, or opening the door for a guest without needing to move or even reach for your smartphone.

As our smart homes become ever more connected, the potential use-cases for the Thingy:52 with Alexa become ever more elaborate!