Pi to Azure to Alexa


This project is about surfacing information from a Raspberry Pi through an Microsoft Azure infrastructure to an Amazon Alexa Skill. This could be an architecture that would support telemetry data collection over time by automating the collection, transport and storage of data from a Raspberry Pi. Maybe the most obvious example of a system like this would be a weather station that cyclically collects data from sensors.


Goals and Intentions

  • Use Windows 10 IoT Core on Raspberry Pi 3 to produceĀ data.
  • Use Visual Studio and C# for all coding.
  • Use Microsoft Azure PaaS Infrastructure.
  • Surface information through Amazon Alexa Skill.

Project Steps

This project contains many detailed steps which will not be completelyĀ outlined step-by-step in this story. I will try to pull together all the resources necessary to replicate the project and point out details that took me hours toĀ track down solutions.

The order in which to execute these steps can vary. You can perform the steps in any order which interests you or meets your goals. I can provide the sequence of steps that I went through to complete the project.

  • Setup Amazon Echo (Dot/Tap whatever)Ā and practice using theĀ built in features, admin website/app, and skills available in the Amazon store.
  • Setup Raspberry Pi with Windows 10 IoT Core and install the Windows 10 IoT Core Dashboard on your computer. Connect your Raspberry Pi to your WiFi network and setup administration of the Pi using the Dashboard.
  • Learn how to build Windows IoT Core Background Application and deploy it to the Raspberry Pi and execute.
  • Learn how to build a simple Amazon Alexa Skill and deploy the skill to anĀ Azure Api App.
  • Publish the Alexa Skill to Amazon Developer Portal then test it to ensure it is working.
  • Setup the Azure IoT Hub, Azure functions and DocumentDB database.
  • Change the Alexa Skill to pull information from DocumentDB database.
  • Change the Windows IoT Core Background Application to simulate (or use sensors to pull) data and push messages to the IoT Hub.
  • Write the Azure Function to receive IoT Hub messages and write documents to DocumentDB database for Alexa Skill consumption.
  • Change Alexa Skill to query DocumentDB and respond to utterances related to the data you are collecting with your Raspberry Pi.

Setup Amazon Echo (Dot or Tap)

You will need to setup your Amazon Echo going through the Setup Instructions provided by Amazon.Ā  The Amazon Echo Support page has links to many other support documents describing how to use and troubleshoot your device.

Setup Raspberry Pi

Install the Windows 10 IoT Core on your Raspberry Pi.


Install Windows 10 IoT Core Dashboard


Setup and get familiar with Managing a Windows IoT device using the IoT Dashboard and Device Portal apps.


Build Windows IoT Core > Background Application (IoT)

Here is a sample IoT background application for generating a random number, build a IoT message and sending the message to the IoT Hub. You can comment out the IoT code until we get to that step below. The sample solution also contains a sample IoT client console application to view the IoT messages as they are sent by the Raspberry Pi. More on this once we get the IoT Hub created.

Deploy your background application to the Raspberry Pi


Build the Amazon Alexa Skill Visual Studio Solution

Use Visual Studio to create a ASP.NET Web API Project hosted in Azure App Service. Of course you will need an Azure account if you don't already have one.

Read More:Ā  Pi to Azure to Alexa

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top