Difference between revisions of "Amazon Alexa & IoT"

From csn
Jump to navigation Jump to search
Line 9: Line 9:
 
====iOS:====  
 
====iOS:====  
 
[[File:Alexa-app.png|right|thumbnail| Teach Alexa your voice]]
 
[[File:Alexa-app.png|right|thumbnail| Teach Alexa your voice]]
the iOS Amazon Alexa app can be found here
+
The iOS Amazon Alexa app can be found here
 
https://apps.apple.com/au/app/amazon-alexa/id944011620
 
https://apps.apple.com/au/app/amazon-alexa/id944011620
 
====Android:====  
 
====Android:====  
the Android Amazon Alexa app can be found here
+
The Android Amazon Alexa app can be found here
 
https://play.google.com/store/apps/details?id=com.amazon.dee.app
 
https://play.google.com/store/apps/details?id=com.amazon.dee.app
  
 
===Signing in / Creating Amazon account:===
 
===Signing in / Creating Amazon account:===
 
Once the app is downloaded you will need to create an account if you do not have one.
 
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"
+
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. Try:
 
After you have done this ask Alexa a few questions and get a feel for how the app works. Try:
Line 36: Line 36:
 
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.
 
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.
+
You should then get "Service connected successfully!" shown at the top of the page.
  
 
If you get an error, try to connect again.
 
If you get an error, try to connect again.
Line 43: Line 43:
 
Click Explore and then create.
 
Click Explore and then create.
  
=====if this =====
+
===== If This =====
  
for this section, we will be searching for Alexa
+
For this section, we will be searching for Alexa
 
then selecting Say a specific phrase
 
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".
+
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.
  
=====then that=====
+
=====Then That=====
  
 
In our example we will get this alert to send a text message, this could also be a phone call or email. Click on That and search ClickSend, select send a ClickSend SMS.
 
In our example we will get this alert to send a text message, this could also be a phone call or email. Click on That and search ClickSend, select send a ClickSend SMS.

Revision as of 00:42, 22 June 2020

In this activity we will use IFTTT or If This Then That to trigger an action. IFTTT can link together devices and easily setup basic flows, allowing one action or trigger to cause another action. In this example, we will set up an IoT platform for users to tell family members that dinner is ready. Picture a large family with some members finishing up at work, some finishing sporting/music after school et cetera. To do this we will use Amazon Alexa, as a trigger for the notification that dinner is ready.

Alexa runs on multiple devices like, an iOS or Android-based phone, Amazon Echo dot, Sonos Speakers et cetera. It is just another voice assistant similar to Apple's Siri or Google's Assistant. After completing this lab with Amazon's Alexa, you may wish to try another voice assistant as the trigger. In this example use Amazon Alexa on your mobile phone, as it is something that most people have.

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. Try:

  • "Alex, tell me a joke"
  • "Alexa, I am hungry"
  • "Alexa, do you like pizza?"

For the prototype, you will need to link Alexa with IFTTT.

IFTTT

On your computer, sign in to your IFTTT account https://ifttt.com/ or setup an account. 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. Click on That and search ClickSend, select send a 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 will be served in 30 mins". Finally, click the create action.

Consider that we could send this to multiple different phone numbers.

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. If this has worked then you have now created a custom trigger for Alexa and a subsequent action

Experimenting.
  • Add another trigger and action: "dinner is ready in 10"
  • Could you create a fall detection mechanism, for the elderly? With a Amazon echo dot, someone could say "Alexa, trigger fall" and this could notify other family members that someone had fallen.
  • Can you get Alexa to call/find you phone?