Power Plug H2 UK & EU RGB with Zigbee2MQTT and Home Assistant

Linked below are Zigbee2MQTT converters for the Aqara Power Plug H2 RGB UK & EU versions.

These took a bit of playing around with to get working nicely in Home Assistant where the light entity card for the LED indicator doesn’t turn the switch relay off when the brightness is set to zero or the light toggle is set.

The full Zigbee features are supported:

  • Replay On/Off
  • Power On behaviour
  • Active power metering
  • Energy consumption metering
  • Current ampage measument
  • Overload protection
  • Child lock
  • Charging protection
  • Indicator light on/off
  • Indicator light status flip
  • Incidcator light colour mode (fixed/power consumption/power per day/power per month)
  • Power consumption for indicator light colour gradient range
  • Accumulated power for indicator light colour gradient range
  • Indicator light fixed colour temp & XY controls
  • Indentify
  • Power outage count
  • OTA updates

It should be noted that I have the UK version, and the the EU converter version is untested, but I’m guessing the only difference should be the max values in the power consumption measurement for the indicator light range, and the overload protection.

Making a converter for the non-RGB models should just be a case of removing some of the LED light controls, but again I don’t have a device to test it on.

Installation

For Power Plug H2 UK (RGB) - use aeu009.mjs

For Power Plug H2 EU (RGB) - use aeu005.mjs

In Zigbee2MQTT go to settingsdev consoleexternal converters, create a new converter named aeu009.mjs and paste in the contents of the file. Click save then restart Zigbee2MQTT via settingstools

Alternatively place the file aeu009.mjs in the folder zigbee2mqtt/data/external_converters and restart Zigbee2MQTT.

If an external converter is active for a device a cyan icon with “Supported: external” will be displayed under the device name in Zigbee2MQTT.


3 Likes

Great sharing!