Given: Z-Wave systems control center - Vera controller, OS X El Capitan or macOS Sierra, iOS 8.1 and higher.

Task: get Siri to control your smart home.

It’s strange that Vera doesn’t know anything about HomeKit, although it would seem... some kind of proxy element would be required to emulate the Apple API.

Let's take the NodeJS server as a bridge Homebridge with plugin VeraLink .

Let's launch Terminal.app and let's start planting a garden :)

Now there will be a guide for “beginners”.

Download the current version of Node.js (on this moment - 6.2.2),

$ curl -o ~/Downloads/node-v6.2.2.pkg https://nodejs.org/dist/v6.2.2/node-v6.2.2.pkg

install

$ sudo installer -pkg ~/Downloads/node-v6.2.2.pkg -target / $ node -v

if you received the answer: “v6.2.2”, then everything is fine, we move on.

Through node package manager install Homebridge,

$ sudo npm install -g homebridge

VeraLink plugin,

$ sudo npm install -g homebridge-vera

create a configuration file for Homebridge

$ mkdir ~/.homebridge

$ touch ~/.homebridge/config.json

and add to it

$ nano ~/.homebridge/config.json

roughly the following content:

{

"name": "Homebridge",

"pin": "000-00-000",

"username": "CC:22:3D:E3:CE:30"

"platform": "Vera",

"veraIP": "192.168.1.2",

"includesensor": true,

"ignorerooms": ,

"securitypoll": 2000,

"dimmertest": true

VeraIP: current ip of your Vera

Includesensor, dimmertest: with the value “true” allows the system to work with sensors and dimmers.

Pincode: Global pin code for all devices, must be in the format ###-##-### and should not be 111-11-111 or 123-45-678.

Securitypoll: Time in milliseconds to update your sensors.

Let's check...

$homebridge

If there are no errors, you should see a PIN code, a list of rooms and a list of devices that are registered in the controller.

Let's remember this rectangle, it will be useful to us later.

OK. Jamming the server - CTRL+C.

All that remains is to add this whole thing to “autoload”.

Create a plist

$ nano ~/Library/LaunchAgents/com.homebridge.server.plist

with approximately the following content:


RunAtLoad

KeepAlive

Label
com.homebridge.server
ProgramArguments

/usr/local/bin/homebridge
-I

EnvironmentVariables

PATH
/usr/local/bin/:$PATH

Now the server will rise automatically provided that the current user logs in after rebooting the system.
Back-end is ready. Launching Homebridge...

$ launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist

For Siri to start monitoring the network for smart devices, in iOS 10 you just need to add the Homebridge device in the Home app. Open the application and click “Add accessory” (plus sign in the upper right corner).

When we find our server, we need to add it as a device. For this, we will need the pin code that we saw above. The HomeKit program will prompt us to simply scan it, or enter it manually.
After which everything connected to the Vera controller will be pulled up. For iOS 8 and 9 you need to download any HomeKit Hub from the App Store, for example, Insteon+ and add the Homebridge device through it, according to the above scheme.
As a result, we get a very nice application with the ability to specify a Tag for Siri, that is, with the help of which command we will control a specific device.
For Russian Siri, the names of rooms, devices, scenes must be written in Cyrillic, otherwise it will not understand.

May 3, 2016 at 2:07 pm

Voice control of a smart home on Z-wave via Siri

  • Development for the Internet of Things

The idea of ​​controlling a smart home using voice commands has been around for a long time. And in some systems this is implemented one way or another. Siri is a good and convenient voice assistant for iPhone owners. Understands human speech and is comfortable. But due to the closed protocol, it is not used for voice control of “smart” devices. It’s good that Apple has HomeKit - a kind of “tunnel” for smart devices to receive commands from Siri.

In this article, I will describe the process of installing and configuring a gateway for Siri to interact with home automation devices and talk about some of the features of different versions.
My main smart home controller is Vera3. Controls, respectively, any Audio/Video components and Z-wave devices. Well and " with a magic wand" will be a Node-JS application VeraHomeKitBridge. Below I will write why I chose this application.
Download the archive from GitHub. All this needs to be deployed somewhere. I have a virtual machine for this. If you don't have a server at home, you can use Raspberry Pi for this purpose.

Installation process
A short installation manual is available on the project page. I recommend additionally using the instructions of the neighboring project on GitHub (in my opinion, they are more understandable).
I will not completely copy the commands here. I'll go through the points:

  1. Install the necessary packages: nodejs, npm, git-core, libnss-mdns, libavahi-compat-libdnssd-dev.
  2. We copy HAP-NodeJS itself into lib/. Download it as a separate archive from here.
  3. We install plugins to work with the application.
  4. Editing config.json. We enter the IP address of the Vera controller, and you can also change the PIN code to your own.
  5. We are trying to launch the application using the node app.js command
It is advisable to install immediately latest version nodejs. I installed version 0.10.29 from the standard Debian repositories. Because of this, the error “error: ‘REPLACE_INVALID_UTF8’ is not a member of...” something there. We connect another repository and install from there.

Curl -sL https://deb.nodesource.com/setup | sudo bash - apt-get install nodejs
after that the version should be 0.10.44.

Even during the launch process, errors about missing plugins will appear. We put:
npm install package_name
The error “...invalid ELF header” may also occur. To make it work, you need to go to lib/HAP-NodeJS and do
npm rebuild
As a result, it should: successfully start the Homekit for Vera and automatically pick up the scenes and switches that the controller sees. If this happens, half the battle is done.
In the future, if there are no errors, you can run the application in background command:
forever start app.js
after installing the plugin
npm install forever
You need to do this, of course, making sure that you are in the directory VeraHomeKitBridge.

Now we set up HomeKit on iPhone
Install the Insteon+ application. You can choose others if you wish. paid analogues. The main thing is that they work with HomeKit.
We include in Settings -> Privacy -> HomeKit the program that you installed.
You need to create a keychain in iCloud settings.
Go to the Insteon+ program. Let's do Add Device. Next, she looks for a HomeKit-compatible accessory. We have this running service with HAP-NodeJS running, which should be in the same local network same as the iPhone. We find one accessory and add it. Enter the PIN code that you specified in config.json. The first time adding takes about a minute. If everything went well, then all actuators and scenes from Vera will be visible in Insteon+ and will even work when pressed.
But I have an application from Vera. I can turn it off there too. Insteon+ is needed for voice control. To do this, select Edit Device in the application settings. Select the device and go to the “Siri control” field. There you need to enter the human name of the actuator or script. For example, if this is a lighting relay, then call it “light bulb” or “light”. In general, “light” - Siri has more general concept. So try to do specific names: iron, kettle, TV, heated floor...
Having arranged the devices in the application by room, you can give commands: “Turn on the lights in the kitchen.” Siri “sees” the names of the rooms. You can also specify its type in the device settings. Now there are Light and Fan. Maybe other types will be added in the future. Now you can specify for the lighting relay that it is light. Then the device will respond to “Turn on the light in the kitchen” and will not respond if its type is Fan. I will demonstrate in the video below voice control. But I don't have enough devices to show all the voice control options. So far only the principle of operation. And then only with the expansion of devices and functionality of Insteon+.


As I wrote earlier, you can work through scenes. This gives us the ability to manage almost everything that is available in the Vera interface. Scenes are all visible in the application and are available when voice commands. Therefore, you can control the receiver or TV by creating 2 scenes - turning the receiver on and off. In Vera, scenes should be named Receiver - On and Receiver - Off. Then you can give commands to “Turn on the receiver” and “Turn off the receiver”, and not “Turn on the receiver” and “Turn on turning off the receiver”, respectively.

What else?
HomeKit opens the door to voice control of almost any home automation. There is a broader concept for this - homebridge. Where can you stuff automation from other manufacturers? Having rustled around the same GitHub, you can find control mechanisms for other controllers and platforms: WeMo, PhilipsHue... I came across the plugin for Vera almost a year ago, and during this time it has progressed for the better.
I will highlight some features: If you look at the code, you can see that the interaction occurs via the http protocol. Works faster than analogues. All devices are added at once as a single accessory. If desired, you can expand the entire system lengthwise and crosswise.

Some lyrics or translation difficulties
Here I’ll dwell a little on the commands for Siri. If you do not enter the name of the device explicitly, Siri accesses the Internet at your request, rather than giving a command to this device. And sometimes he understands commands differently. Sometimes you need to “Turn on...”, but “Turn off...” Otherwise, for the request “Turn off the heated floor,” for example, he will search the Internet for how to turn off the heated floor.
There are general commands such as “Turn on the lights in...”, “Turn on everything in...”, “Down the curtains.” There is a command for “Close”, “Open”. But in my case with hydrolocks, this command did not work. He described the device as both “water” and “faucet”. When he responds to the command “Close the tap in the toilet,” he stubbornly does not see the device. Although the “Toilet” defines the room. A slightly paradoxical situation: I call the hydrolock an “iron”, give the command “Turn on the iron” - it turns off the water. I call “water”, “tap” - he goes on the Internet to look for how to close the tap. In general, with closure, it seems to me that this combination only works with certain devices such as locks. But then it must be appropriately described in the device type. And then the command “Close front door"Siri gets it right.


The video shows the principle of operation. The water shutoff is powered by a relay, which HomeKit could not describe as a hydrolock or tap.

In general, use it, try how it works on other devices and improve voice control of home automation.

You can increasingly hear about smart lighting, smart sockets, smart locks, self-learning thermostats, water leakage sensors and smart CCTV cameras. It seems like every consumer electronics manufacturer has introduced smart home appliances over the past few years, but few consumers understand what these devices are or how to connect them to each other.

So many Smart Home systems have appeared, so many different smart devices, that a gigantic amount of confusion has arisen, discouraging people from understanding this new and interesting topic. The situation is further complicated by the fact that companies have appeared on the market that mislead us: they sell their devices without certification from Apple and Google, presenting their smart home systems as a modern and universal solution.

Some believe that the smart home is too “raw” and an innovative area, and that it will not appear in Russia any time soon. Others, on the contrary, would like to make their home more innovative and comfortable today, but do not know where to start. Still others call a smart home an expensive toy for the rich, the purchase of which will cost a million or more. It's time to dispel the myths and put everything into perspective. We tried to make this article understandable for everyone who is interested in a smart home.

What is Smart Home

A smart home is a system of interconnected devices that helps daily tasks in a house or apartment.

Many people mistakenly believe that a Smart House is a specially designed cottage with a complex electrical diagram and expensive unique home appliances. But in fact, a smart home is just a set of devices that can be controlled using a smartphone or even by voice. Moreover, it does not matter where these devices are located: in a house or apartment.

In a broader sense, a smart home (Smart Home) or home automation (Home Automation) is a system of interconnected devices that helps perform everyday tasks in a home/apartment. This system allows you to control and manage lighting, temperature, humidity, security and even household appliances such as a refrigerator, washing machine, microwave oven, and many other electrical appliances.

It is important to understand that not all devices are “smart”. An electrical appliance can be called “smart” if it can communicate with other devices via wireless communication.

All smart devices can be divided into 2 types:

  1. Sensors (sensors) - receive information from environment and transmit it to other devices. These include a motion sensor, water leakage sensor, temperature sensors, etc. Sensors also include devices with voice assistants that are capable of recognizing your speech and transmitting a signal to execute a command. But more on that later.
  2. Actuators are all those smart electrical devices that execute commands: light bulbs, switches, sockets, air conditioners, humidifiers, cameras, locks, garage doors and many others.

An attentive reader will say that based on these definitions, an ordinary incandescent lamp paired with a motion sensor (this scheme has been used everywhere for many years) can also be called an element of a Smart Home. Probably possible, but modern system A smart home provides much greater opportunities:

  1. Wireless communication between devices.
  2. Possibility to combine unified system devices from different manufacturers.
  3. The ability to control a smart home from a smartphone.
  4. Voice control support.
  5. Ability to create automation scripts.

A smart home system saves us from routine, repetitive actions.

The purpose of the Smart Home is to make our lives more comfortable and safer, to save us from routine, repetitive actions. In addition, an automated home significantly improves the quality of life of people with disabilities by helping them interact with the world around them.

Why do you need a smart home

One of the most common applications of a smart home system is smart lighting, which allows you to turn the light on and off with your voice, adjust the warmth of the light, and control the brightness. Smart light incredibly comfortable. Once you start controlling the lighting only with your voice, the usual switches will seem like an outdated method for people from the past, the 20th century. You no longer have to get out of bed to turn off the lights in the bedroom - just ask your voice assistant to do it.

Another frequently used smart home device is one that can be used immediately. Imagine: you left home or even went on vacation, and you remembered that you forgot to turn off the iron. Or you are worried and want to check. What does a person do without a smart home? Right! He begins to struggle to remember whether he turned off the iron, then tries to remember whether his iron has an auto-shut-off, and, finally, begins to go through everything in his head possible options developments of events. Some people can’t stand it and return home, others ask their loved ones to come and check the notorious iron. And if you have a smart plug, just go to the app and turn off the power with the press of one button. This is how easy it is to save your vacation. Or an apartment.


Management app smart plug TP-Link

Voice control - required characteristic for a modern Smart Home in 2018. Moreover, with technological advancements in voice control and artificial intelligence, the voice assistant is now the control center for an automated home.

A smart home controlled via a phone application, without a voice assistant, is, at best, a 2011 level. And in order to simply turn the light on or off, you need to find the phone, open the manufacturer’s application, find the corresponding device and only then perform required action. With a voice assistant, all you have to do is say, “Turn on the lights.”

At the moment, among the four voice assistants for smart homes, home control in Russian only works in Alice and Siri. Google Assistant speaks Russian, but you can't call commands at home yet, and Siri doesn't work in Russian on HomePod. Therefore, the assistant is most relevant for Russia now.


Voice assistants are already built into phones, watches, tablets, computers, TV set-top boxes and smart speakers. Over the next few years, smart assistants will permeate every device we use, including major home appliances.

The most popular device with a voice assistant today is the smartphone. The voice assistant is now available in almost all modern phones: iPhone has built-in Siri, smartphones have Android application Google Assistant. You can activate the assistant by pressing a button or using the start command if the assistant on your phone is in the “Always Listen” mode. So, if you have an iPhone, you need to say, “Hey Siri,” and then say a command.

The main device for controlling a Smart Home in 2018 is one with a built-in voice assistant. It is fundamentally new way interaction between a person and an apartment. Each IT giant has already released its own smart speaker or a whole line of speakers: Amazon has Amazon Echo and Amazon Echo Dot, Google has and, Apple has, Yandex has and Irbis A.

Controlling your home through a speaker has a number of advantages:

  • The speaker is always connected to power; it cannot discharge.
  • The speaker always listens to you, no need to carry your phone/tablet/watch around the house.
  • Each family member does not need their own expensive phone.
  • The speaker can be used as a home audio system with high sound quality, especially if we are talking about HomePod or Amazon Echo.

Smart speaker allows you to give commands voice assistant on distance

Controlling a modern smart home is not only an application on your phone with icons of connected devices, but also a full-fledged dialogue with your virtual “butler”, from whom you can find out about the weather and traffic jams, ask for information last news, ask to fulfill some request and receive an answer from him in the most familiar form to a person - in his voice, in his native language. At the same time, the personal assistant is never in a bad mood, he will always be happy to see you, and will always be ready to help, as soon as you say “Hello, Alice” or “Hey, Google”.

How to choose a Smart Home system

Today we can say with confidence that the present and future of the Smart Home lies entirely with the largest IT companies, primarily Apple, Google, Amazon, and in Russia Yandex. And such a clear dominance of leading technology corporations in the Smart Home market has an extremely positive effect on us, as consumers, at least for the following reasons:

  1. The cost of devices is constantly decreasing.
  2. Connecting and setting up smart devices is becoming easier.
  3. There is flexibility in using devices from different manufacturers.
  4. The software is constantly updated, which means your devices will become smarter and more useful in their work.

Various devices are available on our website for each platform with prices and detailed specifications.

If you liked this article, and you figured out what home automation is, and now you want to start adding smart devices to your apartment or cottage, subscribe to , telegram and youtube channel. We will tell and show where to start and how to build an inexpensive, advanced Smart Home system step by step.

KNX is a wired technology, a communication bus widely used for building automation. The KNX bus standard was a development of the earlier development of EIB (abbreviation for European Installation Bus, Russian European Installation Bus). EIB is an outdated designation, but continues to be used, especially in Europe. Sometimes the designation EIB/KNX is used.
KNX products were distributed under several trademarks. The most famous are Instabus, ABB i-Bus, Gira, Jung, Siemens, Merten, Tebis, Theben.

Z-Wave is a proprietary wireless communication protocol designed for home automation, particularly for monitoring and control in residential and commercial buildings. The technology uses low-power and miniature radio frequency modules that are embedded in consumer electronics and various devices, such as lighting, heating, access control devices, entertainment systems and household appliances.


The most prominent manufacturer of ZigBee smart home systems is Xiaomi company. Main Feature wireless technology ZigBee is that, with low power consumption, it supports not only simple network topologies (point-to-point, tree and star), but also a self-organizing and self-healing mesh topology with message relaying and routing. In addition, the ZigBee specification contains the ability to select a routing algorithm depending on application requirements and network conditions, an application standardization mechanism - application profiles, a library of standard clusters, endpoints, bindings, a flexible security mechanism, and also ensures ease of deployment, maintenance and upgrades.

ZigBee is a specification network protocols top level- application support sublayer (APS) and network layer NWK, - using services of lower levels - the level of access control to the MAC environment and physical level PHY, regulated by the IEEE 802.15.4 standard. ZigBee and IEEE 802.15.4 describe wireless personal computer networks(WPAN). The ZigBee specification is focused on applications that require guaranteed secure data transmission at relatively low speeds and the ability to operate for a long time network devices from autonomous power sources (batteries).

Crestron has been providing integrated automation solutions for over 40 years. engineering systems and the distribution of media content in the building, which simplify the use of technology and give users new opportunities in everyday life and work. Offering the broadest portfolio of software and hardware products, Crestron is the undisputed leader in centralized and global management, control and visibility into a single, integrated network.

By providing each customer with a solution tailored to their needs, Crestron not only provides touch screens and management systems, but also ensures the smooth functioning of educational institutions, offices, hospitals, hotels, government agencies and residential buildings around the world. These innovative new products demonstrate the incredible potential of Crestron's commitment to providing you with the solutions of today and tomorrow.

Control4 is an American manufacturer of affordable and functional equipment, smart home automation systems
for light control, energy saving, organization of multi-room multimedia entertainment systems. Control4
also supplies application software and additional services for compatible systems produced
other manufacturers. The company was founded in 2003; today its products are sold in more than 50 countries around the world.
In North America alone, the company cooperates with more than 1,600 official dealers.

Under the slogan “Everyday Easy”! (“Every day is easier”) Control4 equipment helps organize home theater with control
with one touch, distribute background music, organize advanced temperature control with “green” solutions for
ohm. It has adopted the Connected Home concept through the 4Sight system, which provides
modern management of your home system via the Web from anywhere on the planet.

In addition to the wide range of devices from other manufacturers that Control4 is able to integrate into a single system, the line
The company's own equipment is also worthy of attention. Touch panels(wall and tabletop) with diagonals 7″ and 10″,
home controllers, multi-tuners, audio switches, 16-channel amplifiers, media players, as well as a number of auxiliary
devices under the Control4 brand are well known all over the world, both to installers and users of home automation systems.

Establishing maximum comfort in an apartment is becoming cheaper and easier every month. In this step by step instructions I'll show you how easy it is to add voice control to your home! For voice control we need:

  1. RaZberry controller or any computer with Z-Way software
  2. A couple of Z-Wave devices, and for that matter, any WiFi bulbs will do
I use a Raspberry Pi B+, so what follows is a description of setting up voice control on it. Video of the work at the end of the article.

1) Install Z-Way software version older than 2.2.2:
wget -O - razberry.z-wave.me/install/v2.2.2-test-new-webserver-8-ga9cd319 | sudo bash Z-Way is a Hub for Z-Wave, Enocean devices, various WiFi bulbs, sockets, locks and other IoT controlled by HTTP and TCP requests. The web interface is available on port 8083.

2) Install the latest version of Node.js
wget https://nodejs.org/dist/v4.4.5/node-v4.4.5-linux-armv6l.tar.xz tar -xvf node-v4.4.5-linux-armv6l.tar.xz cd node-v4.4.5 -linux-armv6l sudo cp -R * /usr/local/ Node.js is the platform to run JavaScript code on the server based on the Google V8 engine.

3) Install Homebridge and the Homebridge-zway plugin
sudo npm install -g homebridge sudo npm install -g homebridge-zway Homebridge implements Homekit support. Homebrige-zway is a plugin that adds improved Homekit support to Z-Way.

4) Create the Homebridge config /usr/local/lib/node_modules/homebridge/config.json
( "bridge": ( "name": "Homebridge", "username": "CC:22:3D:E3:CE:31", "port": 51826, "pin": "031-45-154" ) , "platforms": [ ( "platform": "ZWayServer", "url": "http://localhost:8083/", "login": "admin", "password": "admin" ) ] ) The last slash in the url is very important, it won't work without it.

5) Launch Z-Way and Homebridge
sudo /etc/init.d/z-way-server start sudo homebridge -U /usr/local/lib/node_modules/homebridge & If everything is correct, then in the log you will see the devices you can control and the PIN code.

6) Using Home applications on your phone or others (MyTouchHome, MyHome App, etc.) add Homekit devices.

7) Done! Now you can control your home using your voice! Comfortable management!