📜 ⬆️ ⬇️

From the light bulb to the vacuum cleaner and the drone - as we taught Alice to control hundreds of devices



What do you think is common between the Philips Hue bulb, iRobot Roomba 671 vacuum cleaner, Nest thermostat, General Electric microwave, Kenmore air conditioner, TP Link HS100 outlet, Sonoff devices, Smarter coffee maker and Aire drone?

As you have already guessed, they are united by the fact that they can be controlled by voice from Alice (and from Yandex.Station), as well as hundreds of other smart devices.
')
Moreover, any housewife can handle this setting.

Naturally, the question immediately arises - how is this possible?

Indeed, only recently Yandex announced its Yandex.Module for a smart home, but it will go on sale only in the fall and it is not yet known what devices will be part of such equipment (most likely proprietary).

In fairness it should also be noted that there are already skills for a smart home in Yandex.Dialogs, but they are sharpened on a specific vendor, i.e. other devices will not be supported. It is also worth mentioning software smart homes that have Alice’s management, but the problem here is that the number of supported devices is very small and quite advanced programmer skills are needed to make it all work.

And here - hundreds of devices (and new ones are constantly appearing) and easy setup, how?

It's very simple - we taught Alice and Yandex. The station to perform almost all the skills possessed by Alexa Echo from Amazon - the world leader in voice assistants.
First of all it concerns the management of all smart devices with which Alexa Echo can interact, of which a huge amount has recently appeared.
For home use, this means the following: you just have to buy almost any smart socket, switch, lamp (or go to the nearest store and buy it more expensive) for just a penny, connect and control these devices with your voice from Alice or Yandex.Station.

And not only with similar devices - you can control air conditioning, smart locks, garage doors, irrigation systems and even cars.

And the link between Alice and Alex is ... M1 Messenger .

A little background.

First, we added Alexa Echo support to the messenger.

Those. it became possible, without buying an Echo column, to manage smart things with a voice from a smartphone.
Then we thought that this was not enough and added control of the device with text messages - for example, for those who do not want to use the voice for one reason or another (silence must be observed, etc.).

Then we thought that people would probably be lazy typing the same commands each time with text and made custom buttons in which the user can register frequently used commands once and then call them by pressing, like a control panel.
And then the thought came - if we can control devices with text, then why not make an API for such commands?

And it turned out a certain analogue of the IFTTT service, which lives in the messenger on a smartphone and can combine different services.

And now for more details on how to do all this with a simple example.

So, the very first thing you need - of course, buy a smart device.

If you are going to do it on Aliexpress, then just look in the description of any device for the phrase - works with Alexa, all this will work out of the box.

If you plan to make a purchase in the store, then pay attention - not all sellers know that this or that device can work with Alexa - in this case you need to google this opportunity.

Consider the step-by-step process of connecting and configuring the example of a TP Link HS100 wifi outlet.

1. Configure the TP Link HS100 smart socket



There is nothing complicated here - download the Kasa application, register and follow the instructions.

The most important thing - remember the login-password for this application - it will be needed later.

2. Download and install M1 Messenger

Also, nothing complicated - download, register (without a phone number), then click the icon with the letter “a” - launch Alexa Echo in the messenger:



After the very first click on the icon "a" the application will open the page on
Amazon website with a suggestion or enter an existing username / password, or register an account:



Enter existing data or register and then you need to allow access to the application to access Alexa Voice Service:



After that, a screen with Alexa in the messenger will open and you can already communicate with the voice assistant from Amazon with voice or text:



3. Bind smart socket to your account on Alexa Amazon

Now we need to bind the smart socket to Alexa and assign an activation word to it, for example, Kitchen.

To do this, go to alexa.amazon.com

There are several lifehacks here.

Firstly, if you are in a country where Alexa Echo is not sold officially, then do not open this page on your mobile device - you will be transferred to the mobile store where you will be offered to download the application, but you will not be able to download the application - it will not be available in your country .

Therefore, open this page on the desktop.

Secondly, if you didn’t do point 2, that is, you didn’t download or install the M1 Messenger application, even if you have an account on Amazon, you’ll see this page:



This is not what we need - since there is an opportunity to configure only official products from Amazon, and we do not want to buy Echo.

Only after installing the M1 Messenger you will see this page:



Thus, if you see the phrase:

Welcome!

Amazon is one of the Mobile One Alexa Service.

That means you did everything right and you can attach smart devices.

Go to the section Skills.
In the search we type the name of the device vendor - in our case, this is TP Link Kasa:



Select the appropriate item and get to the section with the activation of this skill:



Click Enable and get to the next window (note that the opening will take place in a new window and you need to allow pop-ups to be shown if you have a blocker):



It is here that you will need to enter the login / password that you got as a result of setting up your Wi-Fi outlet in claim 1.

If you entered the correct data, the confirmation page will open:



Next, go to the section Smart Home and start the detection of devices (the socket at this time should be included in the network):



Then a page with the name of the device that you specified when registering the WiFi outlet in Kasa will open:



Next, go to the configuration of Smart Home:



Go to the Groups and prescribe an outlet called for example Kitchen:



Now, if you say in the messenger Turn kitchen On or Switch kitchen off,
then your outlet will turn on / off.

It should be noted that this is a general principle of attaching smart things to Alexa Echo - whether it is a smart outlet, a watering system or a car - you will need to do the exact same steps.

So, we set up Alex, connected the device, we can manage commands from the M1 Messenger , now we will teach Alice to do the same.

4. Teach Alice to perform Alexa Echo skills.

We start M1 Messenger and in the general menu we find the item Search on the M1 network:



We need to find the bot Alice and add to it:



It is important - after adding a bot, it will not be visible in the general chat list, but in the Business menu:



Write / memorize the code.
Next, open Alice or activate Yandex. Station and run the skill M1 Messenger:



After launching the skill, Alice will ask for the code that we received in the messenger - we say it, confirm the correctness and everything, now we can turn on the smart socket in the kitchen:



We have compiled a list of the most frequently used names for the smart home for Alice and in the backend doing the replacement of the phrase, pronounced in Russian, in the command in English for Alex:



Therefore, if you use any other names - tell us how you spelled it in English for Alex and what equivalent you would like to use in Russian - we will add this phrase to Alice’s dictionary and everything will work.

Thus, adding various devices according to the above example, you can control vacuum cleaning robots, refrigerators and cars using Alice or Yandex. Station

A few important points - we recommend using smartphones with support for Android, and not iOS, as such a kind of hub of a smart home with a messenger.

You also need to turn on any of the 3 modes in the messenger - Live TV or PTT or Users nearby, so that the application is always online.

I would also like to thank the YODE .pro team and Jan Safiullina for their help in implementing the skill.

Source: https://habr.com/ru/post/419467/


All Articles