Alexa IoT Integration
Since different years, Amazon released on the market an AI voice interaction manager named: "Alexa".
To expand the product, Amazon decided to give developers the possibility to customize its behaviour giving them the capability to use a set of API to create
specific applications, known as "skills", with the ability to let your specific functions to interact with the voice recognition manager built by Amazon.
This new technology allows developers to build specific Alexa IoT projects considering the interaction with the voice system as a way to exchange data and information with internet based devices.
For this reason I decided to learn how to build an Alexa skill to give you the possibility to interact with the miniservice infrastructure also using your voice instead of applications like the BVIotManager
web app or applications written using the SDK
In this page I will describe you how to configure your Miniserivice IoT objects
and how to controll them using your voice and an Alexa device (Don't forget that the alexa software doesn't specifically requires an Amazon module, you can run the Alexa software on your mobile or on different other devices. You can run the software also from a Raspberry device).
The first thing to do is to open the Amazon app store and Download the skill named "Miniservices" (if available in your country).
Every time you install a skill on your Amazon device the system assign you a specific user ID.
Even if you are connected to Alexa using your Amazon account that is always the same, this ID changes every time you install the skill. This means that the following "association activity" will need to be done every time you will install the skill on a new Alexa device or on the same device (For example, in case you remove it and then reinstall it on the same Alexa module).
This specific user ID must be associated with a Miniservice Alexa UID.
In order to create your Miniservice Alexa UID you need to open the BVIotManager
web app. If you do not have access to the Web app follow these instructions
to activate your account.
Once you are in the main page (after the login), if you have never requested this code, you will see a screen similar to the one in the following page:
As you can see, the page at the top doesn't report any alexa code. Using the button at the bottom you will, automatically, request a code.
After the button has been pressed you will see a message like the following one:
Once the code has been created you will receive an email with the confirmation and the code will appear in the main page every time you login into the Web App. Also the button will disappear and will be no longer available.
Now that you have the code available you need to associate it with the skill you installed in your Alexa device. To do this simply talk with Alexa and say:
Configura utente (1st number, 2nd number, 3rd number 4th number)
if you are using an Italian device and
Configure user (1st number, 2nd number, 3rd number 4th number)
if you are using a device configured in a country where english is the default language
At the end of the configuration you will hear alexa answering that the action has been properly executed. This means that your Amazon device is now associated with your Miniservice infrastructure.
From now on you will be able to associate all your Miniservice (Powerplug) devices with your specific Alexa module. You will be able to associate or not a device using the check Box that will be (from now on) available in the Miniservice Web App.
As you can see from the picture, every device has a description entered by you at configuration level (remember that you can change this description every time you want) and a check box named "Alexa". Selecting or de-selecting this checkbox will allow you to associate or not this specific device to your Alexa.
Remember that this is possible (for now) only for power plug devices and that the description used must be in your local language (in this case it is in Italian because I am Italian and I am using an Alexa device configured for the Italian language).
Once the device is properly configured you will be able to controll it, simply via your voice using Alexa. You will be able to say:
Alexa ... turn on (device1)
Alexa ... switch on (device 2)
and so on ...
or, in case you are italian, like me, you will be able to say:
Alexa ... accendi (device 1)
Alexa ... attiva (device 2)
and so on ...
Don't forget to use your configured language and to use the description you entered for that device in the "description" field.
Once the object has been turned on or off you should receive a confirmation message from your Alexa device.