A small Zigbee smart plug with power measurement – is the best smart plug for ZHA from Aqara?
Smart plugs allow you to measure power usage and turn pretty much every electricity powered device smart(er). Which is the best one? The Aqara smart plug makes a pretty good case for joining your Home Assistant and ZHA DIY smart home with its small and sleek design and the included power measurement.
What do you need a smart plug for?
There are many dedicated smart versions of all kinds of household devices. You can buy smart light bulbs and LED strip (controllers) for your smart light system, smart switches, smart vacuum robots and even smart appliances. If your device is not smart but plugged into the wall then you can still make it somewhat smart with a smart plug. It allows you to turn the device on or off remotely.
Remote control can be quite useful – I use Sonoff plugs with Tasmota to control some old floor lamps. Some of the real power of smart plugs comes only with a second functionality though: power measurement. Not only is it great to know the power consumption of a device in times of rising energy costs, it can also be used for neat little automations.
The Aqara Zigbee smart plug
There are quite a few options for smart plugs. The Sonoff S20 I used in the past uses Wifi and works very reliably. You do need to flash Tasmota though for fully local control and it has no power measurement. Recently I started looking for a good alternative and found a great Zigbee device: the Aqara smart plug.
I already use a lot of Zigbee devices in my ZHA based smart home, many of them from Aqara (like the awesome motion sensors) so using another Zigbee powered devices, especially one extending then network, is an easy choice.
The plug looks quite sleek with its white plastic and is as small as it gets with these devices. It definitely takes less space than the S20 or similar Wifi plugs I used in the past. There are not many inputs: one big button on the top (or bottom) turns the power on or off and an integrated LED can show the current status.
If you are looking to buy a smart plug consider doing so via these affiliate links to support the blog
Aqara Zigbee smart plug
newer S26 Sonoff smart plug (now also with Zigbee)
The Aqara smart plug supports devices using up to 2300W which should be enough for all normal household devices and is even (barely) enough for some higher power devices like a dishwasher or washing machine. The bonus here is that the plug can not only power these devices but also measure the power draw. More on this in a second.
Adding the Aqara smart plug to ZHA
Of course I use my own smart home server running, among other software, Home Assistant to control my smart home. All Zigbee devices are currently connected via the TubesZB coordinator (connected to the Pi via USB) and the ZHA integration for Home Assistant.
Adding the smart plug to ZHA is very easy – if you use at least version 2022.10.5 of Home Assistant. Otherwise you need to install a custom quirk. I run a newer version so the installation process was simple as always: go to the ZHA integration and click the “Add device” button, then long press the button on the smart plug until it starts blinking.
A short time later the Aqara smart plug shows up in Home Assistant as a new device with a switch control and several sensors showing the current power consumption as well as the current temperature. The temperature can be a very important indicator for failure.
Home Assistant automations with the Aqara smart plug
Of course whenever I add a new device to my smart home I always try to use it for some (more or less) useful automations. This is where the power measurement sensor comes in very handy as it allows you to check if the device connected to the smart plug is actually running.
There are dozens of ways to use the smart plug for automations but for now I decided to plug my dishwasher into the plug. I let it run once and checked the power draw while running and afterwards. It turns out the power draw is less than 2W if its not running and there is a big power spike near the end of its run (probably when using the heater to dry the dishes).
I used this information to write a small automation that constantly checks the power draw and triggers half an hour after the power draw falls below the idle power of 2W. This means the dishwasher is done so I send myself a notification via Pushover to my phone to empty it.
alias: Dishwasher done
description: ""
trigger:
- type: power
platform: device
device_id: a32490b19b2e6f78b278827ccfcf3165
entity_id: sensor.lumi_lumi_plug_maeu01_active_power
domain: sensor
below: 2
for:
hours: 0
minutes: 30
seconds: 0
condition: []
action:
- service: notify.pushover
data:
title: Dishwasher done
message: The dishwasher seems to be done. Go ahead and empty it!
mode: single
The same thing could be used for a washing machine and even be combined with a door/window sensor to keep reminding me until I actually open the machines door.
Another good automation (I might implement in the future) is to use the smart plug to automatically turn off dangerous devices after some time. I once forgot to turn off my soldering iron and only notices an hour later. The power measurement could be used to detect the device running and automatically cut power after a certain time (maybe unless I press some button to keep it running).
Bonus: monitoring with Grafana
As mentioned above the smart plug does expose several sensors to Home Assistant including temperature and power draw. I have set up my Home Assistant instance to automatically save all sensor data to InfluxDB so I can use them in Grafana. In this case it only took me a minute to add two new stats there showing the power draw and temperature.
You can easily see where I turned on the dishwasher once here with two spikes in power consumption. I think they are the initial power needed to heat up water and later to dry everything. The temperature of the plug also rises at the same time but to no dangerous levels.
Is the Aqara smart plug the right device for your smart home?
If you are running a Zigbee network anyways the Aqara smart plug is a great addition. Its small, nice looking, measures power and even extends your Zigbee networks range as a router. Integration with (newer versions of) Home Assistant and ZHA is super easy and allows you to build some interesting automations.
At around 25€ in my case the price could be cheaper (like the Sonoff S20) but is also reflected in the sleek design and nice features. For me its a great buy and I will most likely get more in the future.