Smart home concept from scratch 10 key points

I recommend this article for those who are experiencing a smart home for the first time and want to understand the main benefits of the system. In this article I will explain the concept of SmartESP and show you what controls a smart home will have. To save your time I will not list absolutely all the features, but will emphasize only on the features of the system.


First. Distributed system of controllers.

In SmartESP there is no concept of a main controller to which other modules or different sensors and devices are connected. Instead, it uses a number of inexpensive and equal controllers on which a module with ESP8266 chip is installed. Each of these controllers has its own set of sensors and devices connected to it.


Second. Segmentation of smart home by project.

In SmartESP, the entire smart home is segmented into separate projects. Each project is a separate task. For example, there is a "Climate Control" project and it deals with heating and ventilation. Usually it is some room. And let's say there is another project "Alarm" and it deals with control of fire sensors and sound notifications. There are other projects "Meteostation", "Greenhouse" and so on. All these projects are independent smart segments of your home, which can be assembled without a strictly defined sequence.


Third. Grouping controllers into projects.

Each project is a group of equal, but not necessarily identical controllers. Let's say I decided to heat an apartment. In the first room I will have three heaters installed in different places. Therefore, I will have three separate controllers near each heater.

In addition, I need to measure the temperature in the room and control the exhaust or fan. In this case, I have many options. I can connect only one temperature sensor to one of the controllers for the heater, or I can use three temperature sensors, connecting each to its own controller. Then I will get a more average and accurate temperature across the room.

The same is true for the fan. I can also connect it to one of the three controllers, since the Climate Control project includes control of not only the heater, but also the fan or a similar device. If it happens that the fan is far away from the heaters, I can add a fourth controller, which will control only this fan.

Of course, this applies not only to the devices, but also to the temperature sensors. If desired, I can add a fifth, sixth, seventh and so on controllers to which only the temperature sensors and no other devices will be connected.

I can combine all these controllers in one project as if it were one universal controller with all kinds of sensors and devices. For example here, several controllers are defined for one project and for each of them I can specify which devices are directly on each of them. When it comes to sensor readings, I can also define the function for processing them.

I can do the same when I move on to heating another room. I will create a separate project and add my own set of controllers to this group. As a result, I will have several separate projects for heating each room with its own set of controllers in each of them.

However, if I change my mind tomorrow and want to add or remove a heater or fan, I can simply add, remove or move controllers from one group to another. For example, you can merge projects if you want. Or on the contrary, I can put a separate heater in a room into a third separate project, which will work according to a special algorithm, different from the others.

What does it all give? First of all, we get high mobility and dynamism of projects. I can start a home heating project with one heater, gradually adding others as needed and as my capabilities allow. Plus, I can move devices around the room and do various controller regroupings. In short, I don't have to have a master project all at once where I have to max out everything and calculate everything. This is very convenient when you are engaged in gradual construction of a smart home without major renovation, simply automating individual functions as the priority need arises.


Fourth. Convenient and visible automation.

As you have already understood, each project has its own specialization and can combine many controllers of the same type. In addition, each project can set its own set of automation modes. Actually, for me personally, automation scenarios are the most important thing in a smart home. It is of little use to see just sensor readings and manually switch devices on and off. The primary task of the house is to become smart, namely to be able to achieve our goals.

And here the key feature of SmartESP is that it is built on the principle of specialized projects. For example, we have a specific project Climate-Control and accordingly for this project we have developed both specialized controller firmware and special forms in which specific tasks are conveniently and clearly created.

This is a very important point from my practice. Assembly and installation of controllers, their configuration and connection to the server and other complex procedures can be performed by technical specialists, but the smart home should be managed by the average user. And the user's capabilities should not be reduced to a minimum, like turning on and off or setting the temperature.

Frankly speaking, I am extremely annoyed by reviews, when during the demonstration of a smart house they show: here, look here you can change the temperature in the house! Are you serious? Who needs to manually change the temperature of the house back and forth? We all need first of all comfort and economy, and this cannot be achieved by constantly jerking the thermostat, albeit in a very convenient way.

Nor can you suggest that the user write home automation scripts, even if you use a visualization system to visualize them. This is complicated and can cause inexperience errors. That is why SmartESP has implemented the concept of specialized projects. In this case, the user gets ready-made complex algorithms for controlling devices, and most importantly sees understandable forms where human names of sensors and devices are displayed.

This form is called a task. Here I can define different indicators that need to be achieved or met. There can be several of these tasks, each for a corresponding moment in time.

For example, a heater can maintain a different temperature at different times of the day. In addition, a tactic of gradual temperature changes can be utilized to avoid the discomfort of overheated or drastically cold air. Not to mention, the complex mechanism of the heater can be determined to eliminate the inertia of its operation and temperature spikes.

In turn, the controls for each device are combined into Modes. You can create a number of Modes for each project. For example, it can be a normal mode, when the usual tasks of creating a comfortable climate in the room are performed, and another mode when you will be away for an extended period of time. In this case, the comfort tasks are changed to economy tasks.

As you have already realized, switching modes instantly changes the set of tasks for each device. This is really convenient and quick to do say through an app on a smartphone. Therefore, if someone offers you heating automation in the simple principle of turning the heater on and off based on the current temperature, beware! Home automation should be both functional and visual, so that the user can quickly understand it and manage primarily strategies, not indicators.


Fifth. Multi-level security.

SmartESP implements security at different levels. First of all, the most minimal level of security is embedded in each controller. That is, in fact, each controlled device has its own security node, which does not depend on communication with the server or one main controller.

For example, if you have three controllers for three heaters in your room, you can set a different autonomy mode for each of them. It will activate automatically when anything stops working: either the Wi-Fi network or router, or the cable to the router, or the ISP or the server or anything else.

Each of these three heaters will work independently of each other and as long as power is applied to it. Yes, of course it will be an emergency mode of maintaining some temperature in a critical interval, but in any case - you will avoid disaster.

The next level of safety, is that each switching on and off of the device is almost always limited in time. Very often, when you create a task, there is a field "Maximum run time" in the same window. Thus, almost any switching on of the device can be limited by the maximum operation time in case further commands suddenly stop passing.

But that's not all. In SmartESP each project mode can contain its own set of notifications. As practice shows, it is important to receive timely and quick warnings on your smartphone about possible threshold values.

And finally, the most interesting level of smart home security is the ability of some controllers to monitor others and automatically change the modes of operation of each other.

As a matter of fact, this will be the sixth feature. It is called "Smart Grid". As you remember in the SmartESP project we are dealing with a set of specialized projects, not a single super controller designed to rule all.


Sixth. Smart network of controllers.

So, we gradually create project after project, and then when it comes time to unite them into something whole, so that they work in coordination with each other, we unite them through the "Smart Network". This unique feature gives you the ability to customize the relationships between projects. For example, I can set a special treatment for this project based on the performance of a completely different project. That is, if this set of conditions is met, the mode I need will be set automatically.

Again, another project, whose indicators we are checking, may have its own rules, which in turn switch the mode for it as well. Just imagine what a complex strategy of behavior of all projects you can create and step by step, adding quite specific and understandable bindings. In fact, you are creating your smart home neural network manually, pulling logical strings from each project to the others. As a result, a certain event can become a trigger that caused a chain of changes in the modes of projects, which would be very difficult to calculate and organize in the classical structural programming of scenarios.


Seventh. A single control panel for different homes.

What if you have several smart homes? Or, what if different projects of the same house, or even controllers of the same project are at a considerable distance from each other? An interesting feature of SmartESP is that if you use a cloud server, thanks to Routing, you can combine controllers that are in completely different networks and therefore locations.

For example, I have my travel controller that I often take when traveling. Even if I'm in a rented room, it's convenient for me to control some device when I'm out of the house. And I don't need a separate server or a separate account, everything is right there in one place and available to control from both my computer and smartphone.

Naturally, this can be especially handy when we are faced with a large automation facility where we lack a single router within a single facility.


Eighth. SmartESP Server Superposition

SmartESP smart home contains the concept of "Server". Consequently, all controllers of all projects are managed by one computer on which special software is installed. This is the main "brain" of the smart home, which sends "nerve impulses" once a minute and polls all controllers, sending them the necessary commands.

There is a plus side to this in that it doesn't require excessive server power, as it would if a broker was installed on it. With a broker, sensors and devices work in subscription mode and asynchronously, which means that the system designer needs to build in increased performance. This is done to support a large number of sockets or the case of all controllers accessing the server at the same time. Owners of such servers have to choose between inefficient costs or undesirable risks.

Besides, there is another fundamental question: where should this server be located? And the answer to this question will make everyone happy. SmartESP server can be located either in the cloud or at your home.

The first cloud option is more convenient and universal. It is perfect for a simple user who does not have enough knowledge to set up a home server or simply does not want to mess with it at the initial stage. That's why, with a cloud server, you can get your first smart home up and running very quickly and do some experiments.

On the other hand, the bigger and more critical your smart home becomes, the more often the question arises: who is actually controlling my home? Plus, doubts arise about the reliability of a distant cloud or internet provider. These are all understandable questions to me, so yes, you always have the option of installing a SmartESP server locally in your home.

Although, in principle for myself I chose two options at the same time. That is, as a rule I use a cloud service, but I also set up my local server on a small computer, which performs a number of other functions of a home server. For example, it also contains network storage, a PBX and of course, thanks to docker technology, it includes a SmartESP backup server.

What is also quite important is that thanks to the section "Maintenance" you can not only backup the Smart Home, but also quickly transfer all projects from one server to another. Accordingly, from the cloud server to the local server and from the local server to the cloud.

Ninth. Using the familiar Wi-Fi network.

SmartESP controllers are based on an inexpensive chip ESP 8266, which uses the popular Wi-Fi network, which most likely you already have at home. Yes, there are now alternatives to using Bluetooth controllers, but the reality is not all that clear-cut.

First, you will need to purchase a specialized gateway from a specific manufacturer that has limited compatibility with other devices and sensors.

Second, for stable operation, the distance between the devices and the gateway or intermediate repeater must be small. This immediately requires the purchase of multiple controllers to cover the distances.

Third, mini controllers use weak bluetooth because they are designed to run on batteries. On the one hand this is convenient, but in practice not always. When your smart home will be a medium size and you will have say fifty controllers, each of them will have a battery that lasts one year. It turns out if 365 days divided by 50 and if the devices will be discharged one by one, then every 7 days you will have to change the battery somewhere. Of course, it won't be like that, but you'll still have to change batteries several at a time and every month.

That's why SmartESP uses a more familiar and universal WiFi signal, powering the controllers from the mains. This scheme works well both in a one-room apartment and in a country house, where long autonomy is often needed.

The only thing that I recommend, if possible, not to use the home WiFi network of your router if there are consumers with high volumes of data transfer in it. In general, it is always better to connect such home devices as a TV or desktop computer via cable. If you don't have such a possibility, then an inexpensive and optimal solution is to use a separate router for Smart Home, which you just need to connect to the main one. Two separate WiFi networks, this is a more stable and professional solution.


Tenth. Open design documentation.

SmartESP provides open drawings for its projects. Thanks to this, you as a user always have a choice to build the controller yourself or buy a ready-made one from a master. Each option has its advantages and disadvantages, so I will not agitate you in favor of one or the other option, I will just say that you, as well as with SmartESP server, have the right to choose.