2023-12-21

Smart Plug from Ikea

In my recent shopping tour to Ikea I bought a couple of new devices to extend my smart home zoo: smart socket and a couple of smart bulbs TRADFRI. Smart socket I connected to towel dryer in the bathroom and smart bulbs put to the light spots under the bath mirror.

Before the towel dryer was connected through some no name chinese smart plug which could be controlled through WiFi. From time to time there were problems with this smart plug since it was an online device that was dependent on some unknown Chinese servers located somewhere. When there was no internet in my apartment or these servers were unavailable the smart plug could not switch off or switch on. If the towel dryer was off for some time it was causing just stinky musty towels. If the towel dryer was on for some time it would turn my small bathroom into a small nice sauna. Also I had no idea how to integrate this device to my smart home setup so I decided to replace it with the more predictable device. My choice has fallen to the Ikea model E1702 which can work as a zigbee router which can amplify a signal of my DIY zigbee2mqtt hub and has a price just 10 euro which is much cheaper than most competitors.

Smart Plug was automatically recognized and automatically integrated to my zigbee2mqtt system but light bulbs could not join by some reason. The model LED2104R3 is too new and there is still no configuration for this device available yet. I will investigate how I can fix it later.

The first task that I had to solve was how to switch on and off my towel dryer at specific times as it was done before with an old smart plug. The zigbee2mqtt can control devices in real time but it is all that it can do. There is no event scheduler to switch devices on and off at specific times. The simplest way is just send control events to the MQTT bus from cron, but I decided that it would be too low level of a solution. There are plenty of Open Source No code solutions that can be suitable for this job. My favorite is Node Red since it is very lightweight and can run on any device event on Parpberry Pi Sero W! Since I already had the Node Red application installed to Raspberry Pi Zero W, I decided to use it to do the job.

Fortunately this is very easy and does not require many steps. First, I had to install an extension node-red-contrib-zigbee2mqtt-devices. This can be done through the web interface. Once the extension was installed all that is left just to put some elements to the workflow and wire them together.

There is the final schema that works for me:

Now my towel dryer is turning on for some time twice a day in the morning and evening which is just enough to keep towels dry and does not cause high electric bills. Additionally it can be contolled using a web page. It doesn't require an internet connection, all it needs just an internal WiFi because Node Red and zigbee2mqtt are installed on two different Raspberry Pi Zero W devices.

Let's see how well it will work in the long run.

 

комментарии:

 

Для того чтобы каждый раз не представляться можно войти как зарегистрированный пользователь.

Имя*

разрешены только теги br, font, span, p, strong, u, p, blockquote, a, div, img - остальные будут безжалостно удаляться