SlideShare a Scribd company logo
1 of 11
Voice controlled Home
Automation
Using Amazon Alexa and Pubnub
This is the basic hardware
setup. Raspberry Pi 3 with a
USB Microphone, speakers.
HDMI connection,
keyboard/mouse are not
shown for simplicity.
A beaglebone black with an
LED connected on a GPIO.
Both boards connected to
Internet.
Internet
Internet
https://abszeroblog.wordpress.com/
We also need accounts on
Amazon developer, AWS and
Pubnub.
Amazon hosts Alexa voice
service and our skill.
AWS hosts our skill adapter
code.
Pubnub is used for message
passing from skill adapter to
beaglebone.
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Subscribed to Pubnub
channel ‘Alexa_World’
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Running Alexa app
with wakeword agent
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Run the Alexa app on
Raspberry Pi.
Run the Pubnub subscribing
and GPIO controller code on
beaglebone.
Alexa app is continuously
listening for the keyword
‘Alexa’. When user speaks
the keyword, the app listens
to the voice until a pause. In
this case it is the sentence
‘Alexa, ask my home to turn
on bedroom light’.
•Alexa voice service
•Alexa Skill (‘My home’)
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
https://abszeroblog.wordpress.com/
Alexa app sends the audio to
Alexa voice service running
in Amazon cloud
(developer.amazon.com)
along with device
authentication details and
other metadata.
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
In this case, the intent is
to ‘turn on’ something and
the slot is ‘bedroom light’.
This data is then passed on
to an AWS endpoint running
skill adapter code.
Alexa voice service
interprets the voice and
determines that this is a
request for the skill ‘My
home’. It then further
decodes the voice data and
parses it into an intent
(action to be done)
and slot (object to be
acted upon).
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Parsed data to Skill adapter
Intent: “Turn on”
Slot: “Bedroom light”
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Skill dapter code processes
the intent and publishes a
message to Pubnub network
on channel named
‘Alexa_World’. This message
contains command as
‘TURN_ON’ and gadget as
‘bedroom light’.
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Parsed data to Skill adapter
Intent: “Turn on”
Slot: “Bedroom light”
Publish message to
channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Skill adapter also sends an
ACK to voice service which is
passed back to the alexa app
running on pi. This can
contain a voice feedback
such as “Ok”
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Parsed data to Skill adapter
Intent: “Turn on”
Slot: “Bedroom light”
Publish message to
channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
“Ok”
(Voice
feedback)
ACK from
skill adapter
(with voice
feedback)
https://abszeroblog.wordpress.com/
Pubnub network sends out
the same message to all
devices subscribed to
channel ‘Alexa_World’. In
this case, the beaglebone is
subscribed to this channel
and hence receives the
message.
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Parsed data to Skill adapter
Intent: “Turn on”
Slot: “Bedroom light”
Publish message to
channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Send message to subscribers
of channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Audio
•Alexa Skill adapter
Lambda function
Publish /
Subscribe
architecture
Alexa, ask
My Home
to turn on
bedroom
light
Parsed data to Skill adapter
Intent: “Turn on”
Slot: “Bedroom light”
Publish message to
channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Send message to subscribers
of channel ‘Alexa_World’:
Command: “TURN_ON”
Gadget: “bedroom light”
Running Alexa app
with wakeword agent
Subscribed to Pubnub
channel ‘Alexa_World’
Internet
Internet
•Alexa voice service
•Alexa Skill (‘My home’)
https://abszeroblog.wordpress.com/
Beaglebone then processes
received message and turns
on the GPIO corresponding
to ‘bedroom light’.

More Related Content

Viewers also liked

Home Automation using Android Phones-Project first phase
Home Automation using Android Phones-Project first phaseHome Automation using Android Phones-Project first phase
Home Automation using Android Phones-Project first phasethrishma reddy
 
advanced low cost voice recognition based smart home automation using android
advanced low cost voice recognition based smart home automation using androidadvanced low cost voice recognition based smart home automation using android
advanced low cost voice recognition based smart home automation using androidkiranrocks
 
205044990 M Mphego Presentation
205044990 M Mphego Presentation205044990 M Mphego Presentation
205044990 M Mphego PresentationMpho Mphego
 
DTMF (Mobile) Based Automation
DTMF (Mobile) Based AutomationDTMF (Mobile) Based Automation
DTMF (Mobile) Based AutomationYogesh Kumar
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOEklavya Sharma
 
voice recognition based home automation system using arm-7
voice recognition based home automation system using arm-7voice recognition based home automation system using arm-7
voice recognition based home automation system using arm-7Ajesh Kumar
 
Smart home Environment using iot
Smart home Environment using iotSmart home Environment using iot
Smart home Environment using iotparvathy s m
 
10 internet-of-things-iot-applications
10 internet-of-things-iot-applications10 internet-of-things-iot-applications
10 internet-of-things-iot-applicationsJohn Soldatos
 
IoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOIoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOAYSHA S KABEER
 
A new experience model for the smart home and consumer IoT [Endeavour Partners]
A new experience model for the smart home and consumer IoT [Endeavour Partners]A new experience model for the smart home and consumer IoT [Endeavour Partners]
A new experience model for the smart home and consumer IoT [Endeavour Partners]Nalani Genser
 
Android Based Home Automation Control
Android Based Home Automation ControlAndroid Based Home Automation Control
Android Based Home Automation ControlVivek Porwal
 
Mozilla iot smart home dwika v5
Mozilla iot smart home dwika v5Mozilla iot smart home dwika v5
Mozilla iot smart home dwika v5Dwika Sudrajat
 
Diy smart-home-codetalks-2017
Diy smart-home-codetalks-2017Diy smart-home-codetalks-2017
Diy smart-home-codetalks-2017Niklas Grebe
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home SkillJun Ichikawa
 
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickeln
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickelnIPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickeln
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickelnRalf Eggert
 
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart Home
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart HomeWebinar | Wi-Fi for IoT: How Home Networking is Changing the Smart Home
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart HomeCirrent
 
Thesis - Voice Control Home Automation
Thesis - Voice Control Home AutomationThesis - Voice Control Home Automation
Thesis - Voice Control Home AutomationAbhishek Neb
 
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...Uofa_Unsada
 
Friendly Technologies - TR-069, IoT Management, Smart Home Service Delivery
Friendly Technologies - TR-069, IoT Management, Smart Home Service DeliveryFriendly Technologies - TR-069, IoT Management, Smart Home Service Delivery
Friendly Technologies - TR-069, IoT Management, Smart Home Service DeliveryFriendly Technologies
 

Viewers also liked (19)

Home Automation using Android Phones-Project first phase
Home Automation using Android Phones-Project first phaseHome Automation using Android Phones-Project first phase
Home Automation using Android Phones-Project first phase
 
advanced low cost voice recognition based smart home automation using android
advanced low cost voice recognition based smart home automation using androidadvanced low cost voice recognition based smart home automation using android
advanced low cost voice recognition based smart home automation using android
 
205044990 M Mphego Presentation
205044990 M Mphego Presentation205044990 M Mphego Presentation
205044990 M Mphego Presentation
 
DTMF (Mobile) Based Automation
DTMF (Mobile) Based AutomationDTMF (Mobile) Based Automation
DTMF (Mobile) Based Automation
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINO
 
voice recognition based home automation system using arm-7
voice recognition based home automation system using arm-7voice recognition based home automation system using arm-7
voice recognition based home automation system using arm-7
 
Smart home Environment using iot
Smart home Environment using iotSmart home Environment using iot
Smart home Environment using iot
 
10 internet-of-things-iot-applications
10 internet-of-things-iot-applications10 internet-of-things-iot-applications
10 internet-of-things-iot-applications
 
IoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOIoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINO
 
A new experience model for the smart home and consumer IoT [Endeavour Partners]
A new experience model for the smart home and consumer IoT [Endeavour Partners]A new experience model for the smart home and consumer IoT [Endeavour Partners]
A new experience model for the smart home and consumer IoT [Endeavour Partners]
 
Android Based Home Automation Control
Android Based Home Automation ControlAndroid Based Home Automation Control
Android Based Home Automation Control
 
Mozilla iot smart home dwika v5
Mozilla iot smart home dwika v5Mozilla iot smart home dwika v5
Mozilla iot smart home dwika v5
 
Diy smart-home-codetalks-2017
Diy smart-home-codetalks-2017Diy smart-home-codetalks-2017
Diy smart-home-codetalks-2017
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home Skill
 
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickeln
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickelnIPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickeln
IPC 2017 - Alexa Skills für Amazon Echo mit PHP entwickeln
 
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart Home
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart HomeWebinar | Wi-Fi for IoT: How Home Networking is Changing the Smart Home
Webinar | Wi-Fi for IoT: How Home Networking is Changing the Smart Home
 
Thesis - Voice Control Home Automation
Thesis - Voice Control Home AutomationThesis - Voice Control Home Automation
Thesis - Voice Control Home Automation
 
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...
PROTOTYPE SMART HOME DENGAN KONSEP INTERNET OF THING (IOT) MENGGUNAKAN ARDUIN...
 
Friendly Technologies - TR-069, IoT Management, Smart Home Service Delivery
Friendly Technologies - TR-069, IoT Management, Smart Home Service DeliveryFriendly Technologies - TR-069, IoT Management, Smart Home Service Delivery
Friendly Technologies - TR-069, IoT Management, Smart Home Service Delivery
 

Recently uploaded

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Voice controlled home automation

  • 1. Voice controlled Home Automation Using Amazon Alexa and Pubnub
  • 2. This is the basic hardware setup. Raspberry Pi 3 with a USB Microphone, speakers. HDMI connection, keyboard/mouse are not shown for simplicity. A beaglebone black with an LED connected on a GPIO. Both boards connected to Internet. Internet Internet https://abszeroblog.wordpress.com/
  • 3. We also need accounts on Amazon developer, AWS and Pubnub. Amazon hosts Alexa voice service and our skill. AWS hosts our skill adapter code. Pubnub is used for message passing from skill adapter to beaglebone. •Alexa Skill adapter Lambda function Publish / Subscribe architecture Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/
  • 4. Subscribed to Pubnub channel ‘Alexa_World’ •Alexa Skill adapter Lambda function Publish / Subscribe architecture Running Alexa app with wakeword agent Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/ Run the Alexa app on Raspberry Pi. Run the Pubnub subscribing and GPIO controller code on beaglebone.
  • 5. Alexa app is continuously listening for the keyword ‘Alexa’. When user speaks the keyword, the app listens to the voice until a pause. In this case it is the sentence ‘Alexa, ask my home to turn on bedroom light’. •Alexa voice service •Alexa Skill (‘My home’) •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet https://abszeroblog.wordpress.com/
  • 6. Alexa app sends the audio to Alexa voice service running in Amazon cloud (developer.amazon.com) along with device authentication details and other metadata. Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/
  • 7. In this case, the intent is to ‘turn on’ something and the slot is ‘bedroom light’. This data is then passed on to an AWS endpoint running skill adapter code. Alexa voice service interprets the voice and determines that this is a request for the skill ‘My home’. It then further decodes the voice data and parses it into an intent (action to be done) and slot (object to be acted upon). Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Parsed data to Skill adapter Intent: “Turn on” Slot: “Bedroom light” Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/
  • 8. Skill dapter code processes the intent and publishes a message to Pubnub network on channel named ‘Alexa_World’. This message contains command as ‘TURN_ON’ and gadget as ‘bedroom light’. Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Parsed data to Skill adapter Intent: “Turn on” Slot: “Bedroom light” Publish message to channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/
  • 9. Skill adapter also sends an ACK to voice service which is passed back to the alexa app running on pi. This can contain a voice feedback such as “Ok” Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Parsed data to Skill adapter Intent: “Turn on” Slot: “Bedroom light” Publish message to channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) “Ok” (Voice feedback) ACK from skill adapter (with voice feedback) https://abszeroblog.wordpress.com/
  • 10. Pubnub network sends out the same message to all devices subscribed to channel ‘Alexa_World’. In this case, the beaglebone is subscribed to this channel and hence receives the message. Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Parsed data to Skill adapter Intent: “Turn on” Slot: “Bedroom light” Publish message to channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Send message to subscribers of channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/
  • 11. Audio •Alexa Skill adapter Lambda function Publish / Subscribe architecture Alexa, ask My Home to turn on bedroom light Parsed data to Skill adapter Intent: “Turn on” Slot: “Bedroom light” Publish message to channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Send message to subscribers of channel ‘Alexa_World’: Command: “TURN_ON” Gadget: “bedroom light” Running Alexa app with wakeword agent Subscribed to Pubnub channel ‘Alexa_World’ Internet Internet •Alexa voice service •Alexa Skill (‘My home’) https://abszeroblog.wordpress.com/ Beaglebone then processes received message and turns on the GPIO corresponding to ‘bedroom light’.

Editor's Notes

  1. This is the basic hardware setup needed. Raspberry Pi 3 with a USB Microphone, speakers. HDMI connection, keyboard/mouse are not shown for simplicity. A beaglebone black with an LED connected on a GPIO. Both boards connected to Internet.
  2. We also need accounts on Amazon developer site, AWS and Pubnub. Amazon hosts the Alexa voice service and our skill. AWS hosts the skill adapter code. Pubnub is used for message passing between skill adapter and beaglebone.
  3. Run the Alexa app on Raspberry Pi. Run the Pubnub subscribing and GPIO controller code on beaglebone.
  4. Alexa app is continuously looking for the keyword ‘Alexa’. When the user speaks with the keyword, the app listens to the voice until a pause. In this case it is the sentence ‘Alexa, ask my home to turn on bedroom light’.
  5. Alexa app sends the audio to Alexa voice service running in Amazon cloud (developer.amazon.com) along with device authentication details and other metadata required.
  6. Alexa voice service interprets the voice and finds out that this is a voice data meant for the skill ‘My home’. It then further decodes the voice data and parses it into an intent (action to be done) and a slot (object to be acted upon). In this case, the intent is to ‘turn on’ something and the slot is ‘bedroom light’. This data is then passed on to and AWS endpoint running the skill adapter code called as Lambda function.
  7. The adapter Lambda function processes this intent and publishes a message to the Pubnub network on a particular channel named ‘Alexa_World’. This message contains data with the command as ‘TURN_ON’ and gadget as ‘bedroom light’.
  8. Simultaneously the skill adapter also sends back an acknowledgment to the voice service which is passed on back to the alexa app running on pi. This ack contains a voice feedback such as “Ok” which the user hears from speakers.
  9. Pubnub network then sends out the same message to all devices who are subscribed to channel ‘Alexa_World’. In this case, the beaglebone is subscribed to this channel and hence receives the message.
  10. Beaglebone then processes received message and turns on the GPIO corresponding to ‘bedroom light’.