Zigbee wireless switches and smart home

I use a lot of wireless switches. I have switches that work on the zigbee protocol, there are switches that operate at a frequency of 433 megahertz.

In principle, I have quite a lot of them and use them in different scenarios. There are for example switches that duplicate the main switches in the room, for example, when you need to turn on the general light, turn on a separate sconce in the room, then I have for example in the bedroom there are bedside sconces and in order to control them, it is done as follows. There is a switch that is located at the entrance to the room and it is powered for all three lamps, that is, it is a central chandelier and, respectively, two sconces to the left and right of the bed.

Previously, I used to control these sconces from switches, too, which are located near the bed. This is a combined unit with an outlet and it is the same on the left and right, but now I had to redo the wiring inside a little bit because there are three lines used, when they made electrical wiring for the light, the electrician suggested that I immediately start both phase and zero in the sockets, which in principle turned out to be quite convenient, in fact also the ground in each sub-socket and so I just took these wires three pieces, redistributed them so that I have power from the central switch first to one wall lamp then goes to the next wall lamp, and so I made that I use one power line both to control one lamp and the second line, respectively, there is either ground or zero I use to control the second lamp.

There was a problem where to get all the same to me the second phase or zero already at the switch itself, but since I have this unit combined with the outlet, I just connected to the outlet and take zero, respectively, from the outlet.

In general, it turns out this scheme is very convenient, I have a switch at the entrance, which I can turn on and off all three lamps, that is, this is the central chandelier and each sconce. Also, accordingly, I made a wireless switch that connects through the smart home system and controls this central switch at the entrance. The central switch at the entrance works in zigbee format, and I made the bedside switches themselves using the 433 megahertz protocol, this is a radio frequency, respectively, I have a separate gateway that can receive them and process them.

With am, the signal is very simple for these switches, it is a sequence of signals 32-bit or 24-bit depends on the antiquity, so to speak, of the switch, because they used to do it really with a shorter packet, but modern ones are already 32-bit mostly, and I just check which signal came from the switch and pass the command to turn it on/turn off the wall lamp. In principle, it works quite quickly, there are no special delays, there may be a delay of about half a second, maybe a second, but no more.

I have quite interesting switches, they have the ability to handle several clicks at the same time, that is, if I use a 3-button switch, I can press one button that turns on my sconce on one side of the bed, the second button that turns on the sconce on the other side of the bed, and the third button or some combination that turns on the general light. But you can also, for example, press the first and second buttons at the same time and the signal will be slightly different-it will go from the switch and you can hang different signals on it.

For example, on the other hand, I have a two-button wireless switch installed by the bed and it has just such logic that when one button is one sconce turns on, when the second button is the second sconce, when two buttons simultaneously, it is the central light. They work in the switch mode, that is, in fact, of course these wireless switches do not have feedback and do not know what state the lamp is in, so they simply send a command to switch and, accordingly, you can visually assess whether the light has turned on or not.

For remote control, these switches themselves are not needed, because the control is carried out by a centralized switch that works and is already powered by constant mains power. Also, for example, I have a smart lamp from Yeelight on my balcony, it is used for general lighting in a chandelier, a lamp that descends from the ceiling, I put this light bulb there for general lighting purposes and to give an atmosphere, it can support several different color options and it also supports different white light options, that is warm or cold, but also can be dimmed.

In principle, this is quite convenient, but there is a catch that it can not be controlled from the switch, so I had to put a separate wireless switch that works through the script and, accordingly, this script controls this lamp, this lamp.

But here it is obvious that if the switch is even a three-button switch, then it is impossible to fully control the light bulb, because there are too many modes. And to do this, I use a switch that works over the zigbee protocol. This is a wireless switch powered by a CR2032 battery. This switch has the possibility of several different options for pressing the button, that is, it is a single tap, double tap and hold, so it turns out that in general the switch can handle 9 different combinations.

Of course, it is already quite convenient to manage, you can actually do this as a scenario, that is, I say, I click on a button I have a certain light on, and a certain brightness immediately, when you click on another button, for example, I have a light in the next room turned off, that is, it's on my balcony, the next room is I have a living room kitchen and there the light turns off or a certain mode of this light turns on, but in fact 9 combinations are also not always enough, because sometimes a certain scenario is not provided and you want to add brightness, for example, either turn down the brightness, or turn on a certain light or color, and accordingly you need a more interesting solution.

There are of course switches that also work on the Zigbee protocol, but they support much more clicks. I have such a switch, this is Aqara, which allows a lot of combinations this is a very interesting switch it actually has three keys, but each key can be pressed from each side, so it turns out to be 6 buttons in total, and each button can still work out several options, that is, it is a single press, double and triple press, as well as holding, and it still has the ability to fix the release, that is, in this way, in principle, you can make another action for a long hold, for example, for more than five seconds. In total, there are 24 combinations on this switch, which is quite difficult to even think of what scenarios to use and, in principle, it is difficult to remember which buttons are responsible for what, so here, for example, I approach very carefully to make settings in a uniform way, so that in principle I do not remember every time what is responsible for what.

For example, I use such a switch to control the player, it allows you to turn on and off the player, turn on different sources of this player and, accordingly, different channels that will be played on this player. And in general, for example, switching by single pressing, it switches the source or switches the output, that is, for example, it can be output to different speakers, and by double pressing, the channel is switched, for example, one music or another music.

Well, I also use the button from Xiaomi too. This button allows you to handle a lot of pressing options, this is an interesting enough solution, it has the ability to handle single pressing, double, triple, quarter, 5 and 6 clicks and also hold, and you can also fix the release of the button. But in principle, even 6 clicks is already a lot and it doesn't really become convenient to click so many times on the button and count each time how many you clicked. And you need to click quickly enough, otherwise it will already work as the final value.

Probably the only problem with zigbee is that you need to use some router, an outlet or a wired switch in order for the signal to be strong, because, for example, I have strong enough screens on my balcony and the signal does not always reach the smart home system.

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.