Everything will be difficult in a smart home

The more devices appear in a smart home, the more complexity increases exponentially, each sensor can be used in hundreds of different scenarios, each device can be used in hundreds of automation, also the algorithms of the devices can also be constantly improved and complicated, which only increases the complexity, and, of course, it will be necessary to remember how it is configured, where it is configured and how it generally works, and how it should work better.

In case of any failures, you constantly have to look for the source of this error, maybe the source is data errors, when some data either old came into the smart home system, or for example, the smart home system was rebooted, and it also loads some outdated data, or Wi-Fi was turned off, for example, and then some devices also send old data, they also need to be processed somehow, and so that the scripts do not work incorrectly, but there may be errors in the scripts themselves all the time, because other scenarios may change, some parameters are not used or different sensors can be moved or be in other modes with other restrictions, and when the only thing I reconfigure, I can change some basic parameter, and then it turns out that this parameter was important, and in another scenario it stopped working as expected, but also often, the sensors themselves begin to send some incorrect parameters, this may be caused by various reasons, that is, it may simply have been a sensor failure.

For example, at one time, more precisely, the Xiaomi sensor failed once, when it started sending the wrong value at all, from the wrong ranges, and the same ones, and, of course, the smart home system could not understand that this was incorrect data, the only thing I did then there are additional restrictions on the range, it was a temperature and humidity sensor, respectively, the humidity was 55 percent, but this is normal, in principle, this is realistic humidity, it really can occur at some time in the room, but the temperature is 55 degrees, which was also sent, of course, this cannot be, and, of course, I had to check and exclude this, and I set it up so that if the value falls out of this range, then, firstly, I am informed via Telegram that some sensor starts working incorrectly, and sends incorrect values, and in general, of course, I do not write down such a value and do not use it either in the script or in any automations.

I also have a lot of sensors that are quite old, work on old exchange and communication protocols, it's at a frequency of 433 megahertz, all these homemade sensors, for various reasons they can also transmit a low-quality signal, for example, the battery runs out, or there was just interference, then you also have to monitor the values, which they came from the correct ranges, of course, some version of parity control and transmitted parameters is used there, in fact, I even did it easier, besides this, I also use an algorithm, what if two consecutive signals came the same, then in this case I save them, process them, if the signals are different, then, of course, it means that one of them was erroneous, and I no longer use such a signal in a smart home system, and if, for example, I use either a sensor, who considers the flow rate of hot or cold water, then, of course, when he sends me an incorrect value, I can submit such a value, and I will have to pay a lot for such incorrect data, and, of course, firstly, when I enter these parameters, I submit, then, of course, it shows how much the flow rate is per month, for example, and I carefully look so that there are not some 50 cubic meters there, and in general, of course, due to the fact that I track the input data from these sensors, then, of course, I do not save various incorrect values into the smart home system, well, sometimes there are such that they pass, which-there is a slight spike, a slight deviation, but it is not impossible to detect it, and such a value, of course, can persist, so I try to make myself an alert in Telegram, save them in order to be able to analyze them.

But sometimes there are so many failures, of course, that it just starts to flood with spam and it's not always possible to quickly run to the smart home system and turn it off, even I once had to just turn off the entire server, because it just endlessly started sending several messages per second there and I was afraid that I might be blocked, Telegram bot, and in general, I just had to turn it off so that the whole smart home system wouldn't go crazy at all.

There are a lot of cases when there is parallel execution and sending of commands, and of course I use the MQTT broker to interact between different applications and different ecosystems, but for example, when a door opens at the same time and a motion sensor and an opening sensor are triggered, then of course it is quite difficult to determine what happened ahead, it happens that the difference is there in nanoseconds of some kind, and of course it is not always clear, that is, in principle, my system executes these commands in parallel, because if we take sequential execution, it happens that there is a very long delay until one command, the first value, is processed, then the analysis will take place, the second one will be processed for a very long time and sometimes it is unacceptable, so you have to do parallel execution and it happens that two actions can work, one for example, opening and then the value can come, in principle about the closure or the movement or the cessation of movement, or else it may be that the lights were turned on in parallel, but this data has not yet been updated in the database, respectively, I do not know the previous value, and of course there are a lot of such difficulties and you have to take into account the response time, make sure that there are some time lags so that you can track, for example, that if I opened the door and turned on the light, then for some time, two seconds or 5 seconds, do not react to any actions, because it can it's just a re-triggering, and it's very difficult to follow, it greatly complicates the scenarios themselves, that is, in some simple systems or applications, such a scenario is basically impossible to earn, such features in response time, by the time these values arrive, it will not be possible to process them, and of course when some one ecosystem or one smart home system is used, then you can still figure out how it works, but for example I use Home Assistant and OpenHAB, and Yandex Smart Home, and I also use NodeRed as a writing system some scripts are also used, so sometimes it happens that in some systems some part of the script or automation is first processed in one system, then it is transferred to another system, for example through MQTT or in another way, and then it is processed in that system and into the third system.

For example, it happens when all different systems and different devices, for example, a switch of one company, some kind of wireless, and an executive device or a wired switch or a lamp of another ecosystem, and accordingly it will be necessary to transfer from one system to another, this is a very long chain and somewhere it may still work incorrectly and you will need to remember in which ecosystem, in which script, in which script, in which file did this happen and in fact, some kind of documentation will not even help here, because after all, this is an amateur system and of course it is impossible to keep detailed documentation there, which becomes outdated very quickly and simply, that is, it is easier to always find where if something does not work, take and rewrite, redo, reconfigure, than to try to fully document and understand exactly how it is configured, it is easier break large complex scenarios into many small and simple ones, but again, if there are many scenarios and the device is used in several scenarios, then, for example, in the case of replacing a device or sensor, the scenarios will have to be redone, reconfigure, double-check that they really work like this, because new sensors can send other values, for example, it happens that they send values from other ranges, for example, the temperature can come as a value with decimals, it can come as hundredths, or it can come as multiplied by 10 and then it will also need to be processed correctly.

Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.

You may also watch

Article By Alex

If you have any ideas on how to improve automation, make it more reliable, fast and useful, then you can leave a comment below. I will try to implement the proposals and tell you in the following videos.