The title of Dr. John Allwork's book, Programming Voice-controlled IoT Applications with Alexa and Raspberry Pi (Elektor 2023), says it all. It will help you to learn programming for Alexa devices, to extend your skills to smart home devices, and to control the Raspberry Pi. The book is split into two parts: the first part covers creating Alexa skills, and the second part covers designing Internet of Things and Smart Home devices using a Raspberry Pi.

Get Started with Alexa

The first chapters describe the process of Alexa communication, opening an Amazon account and creating a skill for free. The operation of a skill and terminology such as utterances, intents, slots, and conversations are explained. Debugging your code, saving user data between sessions, S3 data storage and Dynamo DB database are discussed.

The second half of the book starts by creating a Raspberry Pi IoT "thing" to control a robot from your Alexa device. This covers security issues and methods of sending and receiving MQTT messages between an Alexa device and the Raspberry Pi.

Skills and Node Red

Next, readers discover how to control a smart home Raspberry Pi display from a skill using Simple Queue Service (SQS) messaging to switch the display on and off or change the color. A node-RED design is discussed from the basic user interface right up to configuring MQTT nodes. MQTT messages sent from a user are displayed on a Raspberry Pi.
 

Resources