Automation of light in the living room in a smart home
One of the first automation I did in a smart home was to automate the control of the light in the living room, or rather, it's a living room-kitchen combined, and since people are constantly walking around there, constantly forgetting to turn off the light, I would like to make it turn on automatically, but also turn off automatically if anyone"I left it there."
In principle, there are a lot of control options used, I have a night light made there, it is essentially made on the basis of a gateway from Xiaomi, it is a redesigned gateway from Xiaomi, and you can do different lighting there, that is, you can simply turn it on/off, do white light or turn on color mode, that is, different ways of informing or lighting can be used, I also made it so that three different lamps and three chandeliers are used on the ceiling, and this can also be turned on all at once or separately, and this can also be done in different scenarios, I also made an additional lamp that is remotely controlled, it is an LED lamp, but since it was spot-on, it was not very convenient to turn it on in such a large room, that is, the lighting was not uniform enough, and I am not using it yet, but maybe I will also install it back.
I also use different sensors, there is a motion sensor, which is a regular infrared passive motion sensor from Xiaomi, in principle they work quite well, they work well, I have one in my room, but plus the same sensors are in other places, that is, I have the same one in the hallway, and if movement is detected either in the hallway or in the kitchen-living room, then the night light turns on, it always turns on, but in different modes, that is, if it is light outside, and depending on the time of day, I determine whether it is day or night, and accordingly if it is day, then it turns on in a small brightness mode, which I need in order to understand in principle whether it works or not, because sometimes it raises questions, suddenly everything has already fallen off and stopped working, but if it's dark outside, respectively, it's night time, then it turns on bright enough and it's not enough to in order to see in the room and therefore not have to turn on a large light.
Also, this night light turns on if the door opens and the bathroom or toilet light turns off, this is done so that if I leave the toilet or bathroom at night, the light turns off automatically and, in principle, it gets dark enough, so I turn on this night light and it also illuminates the kitchen and the living room, and still quite well it shines into the hallway, which is basically enough to provide comfortable lighting in general.
Since there are people in the living room quite often and, in principle, no one sleeps there, then of course you can provide different scenarios with an assessment of whether there are people there or not, for this I bought a presence sensor, this is a sensor from Aqara, it is basically quite good, in the native application of course it has more possibilities, it can even be there to determine where exactly is the person, in which place of the room, but without this application in the smart home system, it doesn't work for me, basically it just shows that the person is either in or out of the room, or he is moving around the room, that is, approaching the sensor or moving away from the sensor, it is also possible to determine whether it has appeared in the sensor's range or has left the sensor's range, or is moving from left to right or from right to left, these are different modes, that is, they cannot be turned on simultaneously, that is, either I determine that a person enters and exits, or I determine that it moves from left to right, the sensor has good sensitivity, so in fact it is called a presence sensor, there are also the same sensors, this is a microwave sensor, but they are cheaper and they cannot detect the presence, presence is determined by the slightest movement of a person, in principle, in order for the sensor to work, it is enough just to breathe or move your hand there, it will already be enough for him to determine, but his range is limited, firstly, he cannot determine presence further than 5 meters, that is, he can see movement, but he is no longer present it will determine, and then, of course, it turns out that the smart home system receives a signal that the presence has stopped, and of course this is often wrong, and it also has a limited viewing angle, that is, accordingly, if you are close enough to it, and it is installed at the top of the kitchen on the cabinet, that is, of course, then it turns out that it does not see that there is a person under it and does not work, it turns off the presence, then the scenario starts that there is no one and based on this information I start turning off the light in the kitchen At first, I did it so that it turned on immediately, after this sensor sends a signal, it sends information about 15 seconds after the movement stops, but of course it's very fast and sometimes, in principle, you can sit still for 15 seconds and not even breathe, so I made it so that I had to use an additional timer, and turns off the light only after a minute, when the movement has definitely stopped, but I also made it so that the sensors still inform that if it I determined that the presence was over, and he turned off one of my lights so that it was clear that I needed to move, otherwise the lights would turn off altogether.
Of course, in order for the light not to turn off if a person is in the room or not to turn on, for example, if it is not necessary, it is also done so that if, in principle, do not move and turn off the light, then he understands the presence anyway, that is, do not move around the room, and then he will not additionally send a command that the presence it appeared again, and I check if no one was there at first, and then someone appeared, only in this case I turn on, if there was a continuous flow of information that someone was present, then in this case I do not turn on the light, but I made it so that if a person moves and when he gets closer to the sensor, the sensor sends a signal to turn on another lamp that is close to him, and because of this it turns out that the light actually turns on again.
In order to avoid all these inconveniences, I made it so that it is possible to simply turn off this script so that it does not work for a while, it is divided so that I can use the infrared remote control from the TV to press a certain button, and then the system will switch to do not detect presence mode, do not control the lighting in this room before a certain event, and at the same time informs people not to forget to turn off the light if they leave the room, because in this case the light itself will not turn off, well, after a while, or when I press a certain button on the switch, this mode turns off, and the system starts working normally again.
Well, since I set up this whole system with a light sensor in winter, when it's always dark, I didn't need to somehow track when there was enough lighting, but now it's closer to summer, when it happens that it's very bright during the day, of course, turning on the light may be unnecessary and this scenario will need to be changed now, rewrite it anew, and provide for a work option based either on the time of day or simply on the illumination in the room, and based on this, make a decision to turn it on or off.
But by and large, of course, this is not very convenient, because if you are already getting used to some scenario and how it works, then when it starts to change its working conditions and installations in some other way, for example, you go in and it turns on, it becomes not very convenient, for example, now I it is for this reason that I made it so that even at night when you go in, it does not stay off so as not to dazzle, but still it turns on, otherwise it is not entirely clear, either it simply does not work, or the automatic operation mode of this sensor and lighting is turned off, respectively, or some other problem has happened, and of course sometimes it's not very convenient, it would be nice to use some kind of dimmer, of course, in order to turn on less light at night, more light during the day, but now there are practically no such switches on sale that allow us to adjust the operation of the switch normally, well, The LED bulbs themselves should also be special, which support this mode, of course, they will not be adjusted very much in a large range, but in principle it will also be a rather interesting solution for controlling the light in this room.
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.