Difference between revisions of "Amazon Alexa & IoT"

From csn
Jump to navigation Jump to search
Line 2: Line 2:
 
IFTTT allows us to link together devices and easily setup basic flows, allowing one action or trigger to then cause something else to happen.
 
IFTTT allows us to link together devices and easily setup basic flows, allowing one action or trigger to then cause something else to happen.
  
In our example, we are going to set up an IoT platform for elderly members of our community that are still living at home.
+
In our example, we are going to set up an IoT platform for users to tell family members that dinner is ready.
The idea is we can use something like an amazon echo a speaker that can be left in the home for the final product.
+
Alexa runs on multiple devices like the amazon echo, a speaker with a voice assistant.
 
Today we will create a prototype on a mobile phone to start with.
 
Today we will create a prototype on a mobile phone to start with.
  
Line 25: Line 25:
 
Maybe "Alexa tell me a joke" or "Alexa I am hungry"
 
Maybe "Alexa tell me a joke" or "Alexa I am hungry"
  
for the prototype you will need to link Alexa with IFTT.
+
for the prototype, you will need to link Alexa with IFTT.
  
 
===IFTTT===
 
===IFTTT===
Line 53: Line 53:
 
then selecting Say a specific phrase
 
then selecting Say a specific phrase
  
for the prototype we are going to create an alert for a fall, so in the phrase, area write "fall help".
+
for the prototype, we are going to create an alert that dinner is ready, so in the phrase, area write "dinner ready".
  
 
click create trigger
 
click create trigger
Line 59: Line 59:
 
=====then that=====
 
=====then that=====
  
In our example we will get this alert to send an email, this could also be a phone call or text message (android only)
+
In our example we will get this alert to send a text message, this could also be a phone call or email.
  
search email, select send an email.
+
search ClickSend, select send an ClickSend SMS.
  
for the subject write "IoT fall alert", and in the body "testing fall alert".
+
Click Signup, and fill out all the requirements.
  
then click create and finally finish.
+
You should then get a confirmation text, type in the four numbers.
 +
 
 +
Once ClickSend logs in, click the cross and select connect in the IFTTT page.
 +
 
 +
Click allow.
 +
 
 +
 
 +
 
 +
fill out the phone number you would like the text message to be sent to and the from number, and the message e.g dinner is ready
 +
 
 +
then click create action.
  
 
===Testing our Voice command ===
 
===Testing our Voice command ===
Line 71: Line 81:
 
Now open up the Alexa app on your mobile phone.
 
Now open up the Alexa app on your mobile phone.
  
say "Alexa trigger fall help"
+
say "Alexa trigger dinner ready"
  
You should get an email saying that fall help has been triggered.
+
You should get a text message telling you dinner is ready.
(check your junk mail folder)
 
  
 
you have now created a custom trigger for Alexa.
 
you have now created a custom trigger for Alexa.
Line 82: Line 91:
  
  
"dinner is ready"
+
"dinner is ready in 10"
  
alerts everyone in the house to come to dinner
+
alerts everyone in the house that dinner will be ready in 10
  
  

Revision as of 13:03, 28 May 2020

In this activity we will use IFTTT or If This Then That to allow us to trigger an action. IFTTT allows us to link together devices and easily setup basic flows, allowing one action or trigger to then cause something else to happen.

In our example, we are going to set up an IoT platform for users to tell family members that dinner is ready. Alexa runs on multiple devices like the amazon echo, a speaker with a voice assistant. Today we will create a prototype on a mobile phone to start with.

Home Help:

In this exercise, we will download the Amazon Alexa app to your Apple or Android mobile phone.

iOS:

Teach Alexa your voice

the iOS Amazon Alexa app can be found here https://apps.apple.com/au/app/amazon-alexa/id944011620

Android:

the Android Amazon Alexa app can be found here https://play.google.com/store/apps/details?id=com.amazon.dee.app

Signing in / Creating Amazon account:

Once the app is downloaded you will need to create an account if you do not have one. On the sign in you will get prompted for Alexa to learn your voice saying a few phrases like "Alexa how is the weather"

After you have done this ask Alexa a few questions and get a feel for how the app works. Maybe "Alexa tell me a joke" or "Alexa I am hungry"

for the prototype, you will need to link Alexa with IFTT.

IFTTT

Sign in to the IFTT account https://ifttt.com/ that you set up in the previous lab.

Linking devices together that run on different platforms is one of the reasons IFTTT is such a useful service.

To add the Amazon Alexa service in Explore area search for "alexa" then click services.

Connecting Alexa to IFTTT

Click on Amazon Alexa and select "Connect".

This should take you to an Amazon sign-in page, use the username and password that you created/used on the Alexa app on your mobile device.

you should then get "Service connected successfully!" shown at the top of the page.

If you get an error, try to connect again.

Creating the IFTTT function

Click Explore and then create.

if this

for this section, we will be searching for Alexa then selecting Say a specific phrase

for the prototype, we are going to create an alert that dinner is ready, so in the phrase, area write "dinner ready".

click create trigger

then that

In our example we will get this alert to send a text message, this could also be a phone call or email.

search ClickSend, select send an ClickSend SMS.

Click Signup, and fill out all the requirements.

You should then get a confirmation text, type in the four numbers.

Once ClickSend logs in, click the cross and select connect in the IFTTT page.

Click allow.


fill out the phone number you would like the text message to be sent to and the from number, and the message e.g dinner is ready

then click create action.

Testing our Voice command

Now open up the Alexa app on your mobile phone.

say "Alexa trigger dinner ready"

You should get a text message telling you dinner is ready.

you have now created a custom trigger for Alexa.


Try out some more some ideas to get you started

"dinner is ready in 10"

alerts everyone in the house that dinner will be ready in 10


"going on holiday"

turns off all IoT power points (like TP-Link power points)


"find my phone"

IFTTT rings your phone to help you find it