I want to talk to you about sore. On a topic that has been very popular lately and has become partly subject to speculation, omissions and often outright deception. I want to talk about smart homes.
What is a "smart home"? Contrary to the assurances of some manufacturers, it is not at all "the ability to turn off the light from the phone." A smart home is something that removes a headache from those who live in it. What is the ability to turn off the light from the smartphone? For the user, this is just another switch, the same as the wall switch, only a touchscreen and usually lies in a pocket. If to turn on the light in the room, the user still needs to realize the fact “you have to turn on the light”, understand-find where the switch is, and only then poke it - then there’s not a damn in the house. And there is no longer any difference where exactly the switch is located, which should be poked - on the wall, hanging on the keys as a keychain, or lying as a smartphone in your pocket.
Not. “Cleverness” at home is when a person does not even need to think about turning on the light, but he turns on himself.
When you do not need to remember that when leaving the house, you need to lower the temperature of the heating and turn off all the lights. When the air conditioner in the summer and the heater in the winter itself turns on shortly before returning home. When at night on the way to the toilet the light itself turns on with low brightness, so as not to hit the eyes. When all this is controlled from a single interface ... stop. It seems I ran a little ahead. Let's talk a little bit about how you can roughly determine how smart your house is.
Conventionally, the technology of smart home can be divided into several "stages". I will say in advance that such a distinction is not used anywhere except in this article, and serves only to demonstrate the differences between different systems.
â–ş First stage
The first stage is a completely "stupid" system, when the switch controls the device directly. Level "zero". The maximum that can be done here is any clever, these are
through switches , with the help of which you can do an insanely cool thing - passing along the corridor, turn on the light with the switch at the beginning, and then turn it off at the end. Sarcasm fashion off.
The main criterion by which the system can be attributed to this conditional "first stage" - each device has a switch that controls it. Devices can manage only by themselves, based on internal logic (like a refrigerator, it automatically turns on and off, maintaining the desired temperature).
')
â–ş Second stage
The second stage can be called a circuit on different
relays . Here it is already possible to make the logic more difficult, for example, the buttons “Enable all” and “Turn off all”. Here you can also include lamps with motion sensors, or, for example, a garage door with a radio remote control.
The criterion for this stage is a separate control of each type of device. If it is a light switch, then it controls only the light. If there is a motion sensor in the lamp, then it controls only this lamp, and nothing more. You want the air freshener to work only when there is no one in the toilet - you have to buy an air freshener with a motion sensor, and they will work with the lamp independently of each other. Pultikom from the garage door, you can control only the garage door, if you want to turn off the lights remotely, then you will need a second console for the light. If you have two air conditioners in the house - you will have to control them separately.
Using, for example,
PLC , you can do something like 2.1 - with simple logic and timers, but there won't be a single system anyway.
â–ş Third Stage
The third stage of “cleverness” of houses - houses built (completely or partially) on different tires - for example, DALI, KNX, MODBUS, CAN and so on (although, I have never seen smart houses on MODBUS and CAN - these are industrial protocols, sharpened a little under the other). These are already much smarter systems - due to the fact that all devices have a single interface and communication standard, they can already communicate with each other much more.
For example, you can connect switches, lights, blind controllers, gate controllers, air conditioning, and irrigation automation to the KNX bus simultaneously.
The main feature of this generation is universal control. Devices can already control other devices. There is no longer a concept of "light switch", there is just a "switch". With the same wall console, with equal success, both the chandeliers in the living room can be controlled, and the temperature of the air conditioner or the heated floor can be adjusted. The same remote control can be used to adjust the volume of the speakers and open the garage door - it all depends on what addresses to control are entered into the console when setting up. And not only the console can control the devices - the same motion sensor can send the same “turn on the light” command.
By the way, the motion sensor, in this case, will need only one, and all other devices will be able to use its data, since they sit on the same bus with it. The disadvantage of such a system is that it is not very expandable - the addresses of the consoles and actuators are hard-coded into the memory of each device, and without knowledge of the system and specific software for setting you cannot easily change the system configuration. If you do not understand this, then in order to change the function of the switch, you will have to call the installers of your smart home system.
Another disadvantage is that such systems are usually fragmented - each device knows only what it needs. The thermostat, for example, knows about the temperature outside, about the humidity of the house, but is completely unaware of the current energy consumption of the apartment and whether the stove is turned on in the kitchen.
It would seem, why the thermostat to know whether the stove is turned on in the kitchen? But there is no, in the case of a large house with several air conditioners, a situation may arise where switching on three air conditioners, a kettle, a pump and a tile will simply knock out the machine at the entrance to the house. Therefore, before turning on the next powerful consumer of energy, it would be nice to find out what current all other devices already consume, and either turn off something unimportant or wait.
The disadvantages of this system include the fact that for any new functional it is necessary to add additional blocks to it. We want to turn on the light according to a complex timer - we buy, install and configure the timer. We want control from the phone - we need an additional block for interfacing the bus with some network protocol - Ethernet or WiFi.
Thus, we smoothly proceed to the fourth stage of smart systems - a system with a central controller. Of course, such a division is very conditional, because in life, as I said, there are most often hybrids of the above options. For example, when the switches, lighting and curtain controllers in the same room are connected to the KNX, there is a light in the kitchen controlled from a smartphone, a PLC and a small relay relay controls the boiler in the basement, and the light on the porch is switched on by a switch. I don’t know where to put such a hybrid.
So, a system with a central controller.
â–ş Fourth Stage
How to recognize them is clear by name - they are distinguished by some hub, a central device that contains all the logic. Switches on the walls no longer supply power to the light bulb, and they don’t even send the command “light up” to the light bulb. They tell the controller "Pressing the button on the switch №1", and the controller, receiving this message, checks its logic, and sends the command directly to the device: "power supply №2, light the lamp №1".
And of course, the logic of the controller is not limited to the primitive comparison "button number 1 - light bulb number 3". It may include as many complex scripts as it processes information from sensors, for example, “IF a button is pressed, And the sensor on the street says it's dark, then light up in the corridor and on the street. IF the button is pressed, And the sensor on the street says that it is light there, turn on the light only in the corridor. Turn off all the lights in five minutes. ”
In general, the controller can simply get all the outputs and all the inputs, and then just write any logic:
1) Processing data from motion sensors. When there is no one at home - security features. When the house is disarmed - automatically turn on the lights in the toilet and corridor.
2) Receive data from temperature sensors and control the boiler heating and warm floor. With information from motion sensors, the controller knows if there are people at home, and if there are none, it lowers the temperature to save fuel. And if the boiler breaks down, he notices a sharp decrease in temperature and notifies the owner, preventing the heating system from defrosting. In the summer, the same controller turns on the air conditioner an hour before the owner arrives, on the one hand saving energy, and on the other hand ensuring the coolness of the house.
In addition, the controller makes it easier (and cheaper) to dock different systems - for example, sensors can work on Z-Wave, buttons on the walls on EnOcean, data from user devices can be collected on BLE, and lamps can be controlled on DALI.
The only disadvantage of this system is that if the central controller turns off, the house does not just become stupid, it becomes impossible to live in it. Therefore, the stability of the work becomes quite an important factor in choosing a controller. By work stability, I mean both the smoothness of the program part and the design of hardware for constant uninterrupted operation for many years without the need to check and maintain.
Of course, various tricks can avoid the situation “the controller has died, and now we can neither turn on the light nor open the water (because the leakage sensor is also tied to the controller)”. The simplest solution is to add “manual” switches to the system, which will send commands to the systems, bypassing the controller. They will not be used in normal life, but in a problem situation, you can always open the flap and turn on the light.
Real life example:
The solution is at the Mail.ru office, where a system with a central controller is used for lighting control: the luminaires on the DALI bus are controlled from wall-mounted tablets, the interface for which is implemented by the Logic Machine 2 controller.
In the "iron" it looks like this:
The blue arrow is the controller itself, the green arrow is the Modbus-DALI gateway, the yellow one is the DALI transmitter programmed for the “turn on light” and “turn off the light” commands, the blue one is the button connected to the transmitter.
Thus, in case of a breakdown of the controller, network or wall consoles, the system continues its work, albeit in a somewhat truncated mode. It is still possible to turn the light on and off, but only with buttons. Here these buttons are located in the server's panel, however, nothing prevents to connect DALI-transmitters, for example, to ordinary wall switches.
If you do this, you get a hybrid system. The light switch sends the command not to the controller, as well as to the lamp. The difference is that the controller still sees this command and knows when it was filed, and whether the lamp in the living room is on. This allows you to do complex logic, but the system still remains operational after turning off the controller. The minus is the same as in systems with a common bus: it is no longer possible to change the switch assignment with two commands.
â–ş What we do
Actually, it's time to introduce yourself. We are an Embedded Systems company that develops controllers for automation and smart homes, known in the market under the brand Logic Machine.
Logic Machine Re: actor 3 controller
We have been doing this for 18 years, and we dare to hope that we have gained much experience in understanding what devices the market and users need and in the development of embedded systems.
Now we want to tell you about our new project - Logic Machine Wall, the controller for "small" home automation.
Unlike older brothers, it is more focused on wireless protocols - Z-wave, BLE, EnOcean, and from wire has only OneWire and Ethernet. Due to the abandonment of industrial protocols (KNX, Dali, Modbus), its cost has decreased (if compared with "older" controllers, almost ten times), and has become available to any enthusiast of the smart home.
What can our controller oppose to competitors - hubs from Archos,
Z-Wave.Me , Prestigio, Wink, SmartThings, Iris and so on?
â–ş First, the elegant solution for data transfer within the system is the technology of objects taken from the industrial KNX protocol. There are no variables, direct access databases, files to save state between reboots, nothing to watch for. But at the same time, flexibility and convenience.
Objects, to put it simply, are such globally-system variables that have an address, a name, a data type, a content, and several more settings.
Example: Object page in the control panel of my home LM
What is important: objects have strictly defined types (for example, boolean, 2 bit, scale, angle, RGB color, 3 byte date, and so on), which partially determine what can be done with this object: if it is a boolean, then it can switch, if scale - then set the value from 1 to 100, if RGB color, then choose a color. This allows you to very quickly and easily create and modify visualizations, as well as transmit data within the system, without being distracted by creating your own standards.
â–ş Secondly, a very flexible solution for creating custom logic is a system of scripts. Scripts are programs in the
Lua language , which is quite simple, and has already managed to earn recognition in various fields - from embedded systems to game engines.
Example: Part of a script that processes the light-on logic in my home
On the one hand, this method of programming logic is more difficult to master than choosing from the menu, such as described
here . But on the other hand, full-fledged scripts provide very great flexibility in building logic - in a single script you can collect a dozen parameters, request an external server, immediately calculate everything, and turn on the light or heating.
â–ş Thirdly, the system for creating visualizations. Due to interesting solutions (which I will definitely discuss later), it is both simple and flexible. The simplest visualization can be done in literally 5 minutes, and it will look good on both the computer and the phone. To do this, it is enough just to indicate which objects should be present in it, and the system will do the rest.
Example: The so-called “touch visualization”, which took about 10 minutes to create.
A level above, you are provided with a field where you can place pictures, objects, text, external links, mjpeg streams from surveillance cameras, frames, and so on.
Example: complex custom visualization
Well, finally, if you need something more, you can generate HTML pages manually using the same Lua language, and managing their content as you like, up to complex multi-user Ajax sites.
â–ş Fourthly, there is a universal driver interface for connecting external devices, which allows (using Lua, too) to easily write interfaces for interacting with other systems and devices connecting via BLE, TCP, HTTP, and other protocols. We will also look at it in the following articles.
Summarizing the above, it is possible to present the “smart” home system in a very simplified form with the following scheme:
We see here several diverse tasks, which are easily solved with the help of LM. The first is the integration of different protocols. The light sensor is connected via Z-Wave, and the wireless dimmer is connected via BLE. The external statistics / monitoring server receives data via TCP, and the visualization for connected devices works via HTTP. And at the lowest level everything turns into universal objects with which you can do anything.
Finally, I left a few more "chips" of our company, which, I think, will be of interest to potential users of our system:
â–ş Industrial Solutions
Initially, we came to this market with industrial solutions, and for us one of the very important characteristics of devices is reliability of operation. In conditions when the light, access control systems and life support systems of buildings work on your equipment, equipment failure results in idle power (whether it is a plant that the ventilation system failed, or an office with no lighting). Any serious downtime is a complaint to the installer / integrator that automatically reduces the credibility of the manufacturer’s devices.
In such conditions, any manufacturer or learns to make reliable decisions, or leaves the market and dies. We are still alive.
Of course, for home use, reliability no longer plays such a role as for, for example, a plant. If the controller breaks in your home, there is almost always time to replace or purchase a new one. However, you see, it is much more pleasant to realize that the equipment in your home is guaranteed to live 10 years than to think about planned obsolescence.
In addition, the concept of reliability implies not only the reliability of iron itself, but also the ability to quickly restore the system in case of any problems. Including this means backup / recovery tools that allow you to quickly put into operation a replacement for the dead or killed equipment.
â–ş Local support
One of the most important things to learn about new technology is documentation and support. And with that, and with another we are fine: there are enough detailed guides for programmers and developers, a library of code samples and developed solutions, and the key points of the documentation exist in Russian.
Our local documentation wiki (soon to be shared)
Moreover, the key developers are Russian-speaking or understand the Russian language, which has a very positive effect on the speed of reaction to really complex issues or to bug reports.
â–ş Not a product, but a platform
And we are not limited to just the production of a custom product. We create a platform, an ecosystem in which developers can create projects using our controllers. We will never say "here's the user interface, and all that is deeper is impossible to touch." We are attentive to the needs of each developer and are ready to accept offers, help, train, and make customized decisions (both in software and hardware) to the needs of clients. We want to give developers a tool that would allow them to earn money by creating smart homes for clients on our solutions - in fact, turn interested people into mini-installers who can make interesting automation projects and smart homes. Fortunately (as we show in the following articles), it is not at all difficult.
â–ş Better Call Saul
If you are an iron developer for a smart home, and your piece of hardware is already for sale, write me the owl at vvzvlad@gmail.com. As part of our ompanion & ompatible program, we enter into partnerships with manufacturers and suppliers of smart home devices, providing API and SDK for writing drivers, advising in the process of writing drivers, and after completing work we add the driver to the standard controller supply and your devices to the list of compatible ones. After that, you can also put a label "Compatible with LM" on your products.
If you have a development of devices for a smart home only in the plans, then also write to me at vvzvlad@gmail.com. Let us tell you how to make devices with maximum functionality, help with advice, show answers to burning questions, so that
such devices do not work out :)
If you are an installer or plan to become one ... yes, you guessed it. Write! We have courses on LM programming, where you can learn and practice in development.
If you are interested in the topics of Internet devices and smart home, welcome to the channel in the telegraph:
telegram.me/IOTandSmarthome