Window voice control

Window voice control

If you own a voice assistant such as Google Home or Amazon Alexa, you can control SMARWI using voice commands

Icon tower google

By using API calls, it is possible to set an automatic shutdown of your windows in the IFTTT system when the forecast indicates rain.

How to set SMARWI to operate based on online weather forecast?

You must first register at IFTTT (https://ifttt.com). You can do it using your existing Google or FB account.

IFTTT is a portal and platform for services and applications that will allow you to connect devices supporting API calls with other services and features of various applications. It sounds complicated, but everything is based on the simple principle "if this then that".

Once you've signed up, download the IFTTT app (available for both AppStore and GooglePlay) on your phone and sign in with your account. In IFTTT app. find Weather Undergroud, create an account, and remember to set your geographic location to get accurate weather forecasting.

We have all registrations required and now we will show you in a few steps how to create an applet (simple script/set of rules for performing a task).

Our applet will do this: When you ask your assistant to close the window in the kitchen, he will pass over the IFTTT command to SMARWI to close the specified window.

IFTTT Google assistant 1a2 small

1) In the IFTTT application, select My Applets and create a new applet using the "+" button. We select "this", to define the condition "When this occurs"

2)  Search and select Google Assistant application.

IFTTT Google assistant 3a4 small

3) Select  option "Say a simple phrase"

4) Type the command you want to say, e.g. "Close window in the kitchen". 

IFTTT Google assistant 5a6 small

5) Now lets determine what should be done "do that" when our condition is met and choose "that"

6) Using the search we find an application called "Webhooks". Webhooks is used to execute weblinks-URLs. So he can call the API that closes our SMARWI. In Webhooks, choose Make a web request.

 IFTTT Google assistant 7a8 small

7) In the URL field, you need to enter an API address with correctly filled parameters so it calls the right SMARWI. The API syntax that controls SMARWI is as follows:

https://vektiva.online/api/<REMOTE_ID>/<API_KEY>/<DEVICE_ID>/<open|close|stop>.  Instructions on how to correctly create and test this command line using your own registration information from vektiva.online, see the online manual. Select the Post Method on the Webhooks page and choose "text / plain" as the Content Type.

8) Remember to save the applet with the Finish button. Alternatively, you can individually name it and decide if you want a notification in case the applet is activated.

Applet is still active within your IFTTT account on the Internet, regardless of our mobile phone. If the weather changes to rain in your location, the IFTTT automatically calls SMARWI using the Webhooks and closes the window. Once you have set this up and we can see the whole logic works in practice, setting the next condition is a matter of about a minute. This way you can create Applets to set temperature, open / close events based on another event, or control  SMARWI based on weather forecast.

Tags: smarwi, API, IFTTT, no sensors, voice

Stay in touch