SlideShare a Scribd company logo
Alexa Enabled
Smart Home Programming
with Python
Sonal Raj PyCon India 2018
Hyderabad, IN
Hello!
I am Sonal Raj
2 year old Alexa user. 10 year old Pythonista.
2
IOT Internet of Things
4
Woah!!
5
Total Adult
Population
252
MILLION
Smart Device
Owners
47.3
MILLION
Source: Voicebot voice shopping US Consumer Adoption and Attitudes 2018 Report
6
7
Source: Voicebot voice shopping US Consumer Adoption and Attitudes 2018 Report
8
Amazon
62%
Google
27%
Apple
4%
Sonos
4%
Others
3%
Source: Google
9
10
Commands
11
Conversations
Commands
12
Increase the living
room temperature
slightly.
I am feeling cold /
hot
Optimize my room
temperature
How many heaters
are on here
Initiate rapid
cooling mode for
all rooms
Turn off cooling
13
Light Name
On/Off
Color
Brightness
State
Location
Alexa, initiate
night mode in
living room
Interactions
Switch the TV
Channel to the
cricket match…
Is the front door
locked …
14
Turn on the
sprinklers in the
garden…
Warm up the water
in the shower..
Lower the
temperature..
Turn up the heat in
this room..
Start vacuuming
this room…
Initiate home
lockdown…
The Alexa
Framework
Skill
16
Skill
Service
17
The Service
Skill
Interface
18
The Interface
Utterances
SLOT
TYPES
INTENT
SCHEMA
Terminologies
Building a Skill
20
“Alexa, ask Zomato for the nearest [restaurantType]”
Invocation Name
Slot
Utterance
Intent
maps to
21
Invocation Name
What a user must say to “start” the skill. Each skill has a
unique Invocation Name
22
“Alexa, ask Zomato for the nearest [restaurantType]”
Invocation Name
Slot
Utterance
Intent
maps to
23
Utterance
A spoken phrase that maps to an intent. A skill can
have many utterances.
24
“Alexa, ask Zomato for the nearest [restaurantType]”
Invocation Name
Slot
Utterance
Intent
maps to
25
Slot
A variable within an utterance. Variable possibilities
must be defined.
26
“Alexa, ask Zomato for the nearest [restaurantType]”
Invocation Name
Slot
Utterance
Intent
maps to
27
Intent
Whenever you speak to an Alexa Skill, your message is
mapped to an intent which decides what code to run
within your skill.
28
“Alexa, ask Zomato for the nearest [restaurantType]”
Invocation Name
Slot
Utterance
Intent
maps to
29
Interface
Service
Interaction Model
Utterances
Flask-Ask
A Flask extension that has wrappers for the common constructs
for the Alexa skills API.
Flask-Ask
A Flask extension that has wrappers for the common constructs
for the Alexa skills API.
• Has decorators to map Alexa requests and intent slots to
view functions
• Helps construct ask and tell responses, re-prompts and cards
• Makes session management easy
• Allows for the separation of code and speech through Jinja
templates
• Verifies Alexa request signatures
[ Developer Experience ]
Let’s see how the code looks like.
33
34
35
Testing a Skill
ngrok
exposes local servers behind NATs and firewalls to the public
internet over secure tunnels.
ngrok
Local http to public https!!!
• Demoing web sites without deploying
• Building webhook consumers on your dev machine
• Testing mobile apps connected to your locally running
backend
• Stable addresses for your connected devices that are
deployed in the field
• Running personal cloud services from your home
AWS Lambda
AWS Lambda is a compute service that lets you run code without
provisioning or managing servers.
AWS Lambda
A compute service that lets you run code without provisioning or
managing servers.
• Executes your code only when needed
• Scales automatically, from a few requests per day to
thousands per second.
• Charged for compute, not downtime
• Any kind of application backend
• build serverless applications composed of functions that are
triggered by events
Alexa Skill Test
Alexa Simulator
42
Echosim.io
43
Deploying a Skill
IFTTT
46
The Future
• Interactive Social Networks
• Interactive Idea boards
• Voice Gaming
• Crisis Alerting
• Office Integration – Meeting room bookings, etc.
• Always aware state!! ( Creepy!! )
47
AlexaBot
Source: https://github.com/jacobajit/AlexaBot
Thanks!
Questions??
You can find me at:
q sonal.nitjsr@gmail.com
q sonal-raj@github
q _sonalraj@twitter
q sonalr2@facebook
48

More Related Content

PPTX
Make your home smarter with Alexa
PPTX
My home iot for dev connect korea
PDF
Internet of Things with Python & Serverless - PyCon MY 2019 - Kuala Lumpur, M...
PDF
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
PDF
IOT and Home Automation with Serverless Computing | Serverless Days 2019 | So...
PPTX
Telerik AppBuilder Presentation for TelerikNEXT Conference
PPTX
FinTech Belgium MeetUp on APIs 16/11/17 - API Overview - Ingenico ePayments
PPTX
Getting Started with Amazon Alexa on the Raspberry Pi
Make your home smarter with Alexa
My home iot for dev connect korea
Internet of Things with Python & Serverless - PyCon MY 2019 - Kuala Lumpur, M...
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
IOT and Home Automation with Serverless Computing | Serverless Days 2019 | So...
Telerik AppBuilder Presentation for TelerikNEXT Conference
FinTech Belgium MeetUp on APIs 16/11/17 - API Overview - Ingenico ePayments
Getting Started with Amazon Alexa on the Raspberry Pi

What's hot (7)

PPTX
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
PPTX
Voice controlled home automation
PDF
Writing Alexa Voice Skills With NodeJS (with a little IoT)
PPTX
Amazon alexa
PPTX
PPSX
Amazon Alexa Working
PDF
Alexa-Maria Carmela Dipinto
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
Voice controlled home automation
Writing Alexa Voice Skills With NodeJS (with a little IoT)
Amazon alexa
Amazon Alexa Working
Alexa-Maria Carmela Dipinto
Ad

Similar to Alexa enabled smart home programming in Python - PyCon India 2018 (20)

PDF
Services Over Servers - Innovate VA 2016
PPTX
Episode 9 - Building soap integrations in salesforce
PDF
Full Stack Meat Project with Arduino Node AWS Mobile
PDF
PDF
Algorand Technical Workshop 2021
PDF
Elements of Connected Products
PDF
Amazon Alexa Home Automation Skills
PDF
Make your Apps more human With Azure Cognitive Services - By infusing some AI
PDF
Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...
PDF
The Developers World
PDF
The Software Developers Guide to Prototyping Wearable Devices
PPTX
Logic appsforbeginners
PPTX
MJ Berends talk from AWS Chicago Summit
PDF
Klarna programming contest 2011
PDF
Connecting to the internet of things (IoT)
PPTX
Computer Network Part 1
PDF
Web APIs: The future of software
PPTX
Game Development in the Cloud - Live Q&A
PPTX
Amazon Alexa: How to talk with your Smart Home devices
Services Over Servers - Innovate VA 2016
Episode 9 - Building soap integrations in salesforce
Full Stack Meat Project with Arduino Node AWS Mobile
Algorand Technical Workshop 2021
Elements of Connected Products
Amazon Alexa Home Automation Skills
Make your Apps more human With Azure Cognitive Services - By infusing some AI
Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...
The Developers World
The Software Developers Guide to Prototyping Wearable Devices
Logic appsforbeginners
MJ Berends talk from AWS Chicago Summit
Klarna programming contest 2011
Connecting to the internet of things (IoT)
Computer Network Part 1
Web APIs: The future of software
Game Development in the Cloud - Live Q&A
Amazon Alexa: How to talk with your Smart Home devices
Ad

More from Sonal Raj (7)

PDF
Progressive Javascript: Why React when you can Vue?
PDF
Startup Diagnostics: Reasons why startups can fail.
PPTX
IT Quiz Mains
PPTX
IT Quiz Prelims
PPTX
Spock the human computer interaction system - synopsis
PDF
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
PDF
Storm Real Time Computation
Progressive Javascript: Why React when you can Vue?
Startup Diagnostics: Reasons why startups can fail.
IT Quiz Mains
IT Quiz Prelims
Spock the human computer interaction system - synopsis
Real Time Graph Computations in Storm, Neo4J, Python - PyCon India 2013
Storm Real Time Computation

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administraation Chapter 3
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
AI in Product Development-omnex systems
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPT
Introduction Database Management System for Course Database
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administration Chapter 2
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
How Creative Agencies Leverage Project Management Software.pdf
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administraation Chapter 3
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
AI in Product Development-omnex systems
Design an Analysis of Algorithms II-SECS-1021-03
Introduction Database Management System for Course Database
ai tools demonstartion for schools and inter college
System and Network Administration Chapter 2
Understanding Forklifts - TECH EHS Solution
Design an Analysis of Algorithms I-SECS-1021-03
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Softaken Excel to vCard Converter Software.pdf
top salesforce developer skills in 2025.pdf
Digital Strategies for Manufacturing Companies
How Creative Agencies Leverage Project Management Software.pdf

Alexa enabled smart home programming in Python - PyCon India 2018