Editorial summary: Solid, well-scoped setup guide for the Xiaomi ZNCZ04LM Zigbee plug in Home Assistant via Zigbee2MQTT. The technical content is accurate and the consolidated “known bugs” section is genuinely useful — I verified all three Z2M issue references against the GitHub tracker: #13463 (energy counter reset after OTA), #23594 (wrong energy reading briefly after Z2M restart), and #14299 (energy entities null on Sonoff Dongle-E). The device identifier lumi.plug.mmeu01 and the entity set (power, energy, voltage, current, device_temperature, consumer_connected, auto_off, led night mode, power_outage_memory) are confirmed in the Z2M device page. OPSEC clean — generic VLAN/DNS examples only. No YMYL, no sensationalism, no AI-tells of note. Corrected one phrasing in the post-restart bug (the verified behavior is a transient wrong reading that settles, not specifically a “large” spike). Resolved all three INTERNAL_LINK markers to their published WP URLs (SP-EUC01 p=3747, hub-free pillar p=4094, single switch module p=4080). Affiliate disclosure present; note the two Amazon links are bare homepage URLs without an affiliate tag — disclosure intent is correct but link execution is weak (consistent with prior SP-EUC01 handling; flagged for Publisher/owner awareness, not a blocker). Score 8.5, ready_for_publish.
Xiaomi Smart Plug ZNCZ04LM: Zigbee2MQTT + Home Assistant Setup Guide
Affiliate disclosure: This article contains affiliate links to products mentioned. If you buy through these links, I may earn a small commission at no extra cost to you. I only link to products I’d actually recommend.
The Xiaomi Smart Plug ZNCZ04LM is one of those devices that tends to end up in your drawer before it ends up in your smart home. Maybe it came bundled with a Xiaomi kit, or you picked it up on AliExpress for a few euros before you realized you needed Zigbee2MQTT to make it actually useful. Either way: it’s a capable plug, it’s fully supported by Z2M, and once paired it gives you real energy monitoring data — all local, no cloud required.
This guide covers everything you need to get the ZNCZ04LM working properly in Home Assistant: the full entity list, the pairing procedure, how to set up the Energy Dashboard, and the three known bugs that will catch you off guard if you don’t know about them ahead of time.
What the ZNCZ04LM Is (and Where It Sits in the Xiaomi Lineup)
The ZNCZ04LM is Xiaomi’s EU Schuko/Type-F format smart plug. Internally, Zigbee2MQTT identifies it as lumi.plug.mmeu01. It’s a mains-powered device, which means it acts as a Zigbee router — helpful for mesh stability in larger setups.
It’s not an Aqara device, despite often being sold alongside Aqara kits. The Aqara-branded equivalent for EU users is the SP-EUC01, which has its own dedicated setup guide. The ZNCZ04LM is the Xiaomi Mi Home line — same underlying Zigbee, different branding. In practice, the capabilities are similar but the known bugs differ.
If you’re not sure which Xiaomi plug model you have, the quick disambiguation is in the section below. If you already know you have the ZNCZ04LM, keep reading.
What You Get After Pairing
The entity list is the main reason to bother with this plug over a basic on/off switch. Once paired to Z2M, you get:
Core controls:
– Switch (on/off/toggle)
– LED night mode indicator (on/off)
– Auto-off timer (default threshold: 2W for 20 minutes — plug turns itself off if it detects standby consumption below 2W for 20 consecutive minutes; configurable)
– Overload protection threshold (configurable, 100–2300W range)
– Power outage memory (retain last on/off state after power cut)
Energy monitoring:
– Power (W) — real-time
– Energy (kWh) — cumulative
– Voltage (V)
– Current (A)
– Device temperature (°C) — the plug’s own operating temperature, not room temp
Diagnostic / calibration:
– Consumer connected (boolean — whether the plug detects a load)
– Calibration offsets for power, energy, voltage, and current
That’s a lot of entities for a plug in this price range. The energy monitoring set is the reason most people buy it, and it works well — with caveats covered in the bugs section.
Prerequisites
You need Zigbee2MQTT running with a USB coordinator. If you’re starting from scratch, the Aqara Zigbee devices without a hub guide covers coordinator selection and Z2M setup.
One specific warning on coordinator choice: the Sonoff Zigbee 3.0 USB Dongle Plus (EFR32MG21-based) is the recommended adapter for this device. The Sonoff Dongle-E has a confirmed bug with the ZNCZ04LM where all energy monitoring entities — power, energy, voltage, current, temperature — report as null after pairing. The issue (Z2M #14299) was closed as not-planned in the Z2M issue tracker. If you’re using a Dongle-E and seeing null energy readings, this is why, and the fix is to use a different adapter.
The Sonoff Dongle Plus is available on Amazon — affiliate link — and is my standard recommendation for new Z2M builds precisely because this class of adapter-compatibility issue is common enough to matter.
Pairing the ZNCZ04LM
The pairing procedure is the usual Z2M flow with one minor wrinkle.
- Open Z2M → Zigbee Devices → “Permit join” (all or to a specific coordinator/router)
- On the plug: hold the button until the indicator light blinks blue rapidly, then release
- The plug should appear in Z2M within 30–60 seconds
The wrinkle: if pairing times out before the join completes — which can happen if the plug is more than a few meters from the coordinator during first pair — press the button once every second to keep the device alive in pairing mode. This is a known quirk with Xiaomi Zigbee devices. They tend to give up if they don’t hear back quickly. Once joined, the plug operates normally at its installed location.
After joining, give Z2M about 30 seconds to interview the device and populate all entities. You’ll see the full entity list appear in the Z2M frontend. In Home Assistant, the entities appear under the MQTT integration automatically if you have the Z2M ↔ HA integration configured.
Setting Up Energy Monitoring
The plug’s power and energy entities map directly to Home Assistant’s Energy Dashboard, but you need to configure them explicitly.
In Home Assistant:
1. Go to Settings → Energy
2. Under “Individual devices,” add the ZNCZ04LM’s energy sensor (the kWh entity, not the power entity)
3. If the entity doesn’t appear in the dropdown, check that it’s enabled in Z2M (some Z2M versions disable diagnostic/calibration entities by default — enable them in the Z2M device settings tab)
Power vs. energy entities: The power entity (W) gives you real-time draw. The energy entity (kWh) is the cumulative counter that HA’s Energy Dashboard uses. They’re separate entities and both are exposed after pairing. The Energy Dashboard wants the energy entity specifically.
Calibration: The plug exposes offset fields for power, energy, voltage, and current. If your readings drift from a reference clamp meter, you can adjust them here. For most use cases, out-of-box accuracy is adequate.
Known Bugs and Caveats
This is the section that doesn’t appear anywhere else in a single place. I cross-referenced Z2M’s GitHub issue tracker and the official docs; these are real, reproducible behaviors.
Auto-Off on Weak Coordinator Signal
If the plug loses its Zigbee connection to the coordinator — not just a brief delay, but an actual dropped link — it may turn itself off. This is a firmware-level safety behavior: the plug interprets a lost coordinator as a network fault and defaults to off.
The workaround most people use is a loop automation: every 5 minutes, if the plug is supposed to be on, send a turn-on command. It’s not elegant, but it works. The better fix is addressing mesh health: add a Zigbee router device between the plug and coordinator, or move the coordinator closer. Since the ZNCZ04LM is itself a router, adding it to a well-connected mesh typically resolves the dropout.
Energy Counter Resets After OTA Firmware Update
This one stings if you care about long-term energy tracking. Applying an OTA firmware update to the ZNCZ04LM resets the cumulative energy counter to zero (reported in Z2M issue #13463). There’s no fix and no workaround — the counter is stored on the device, the update wipes it.
If you’re using this plug to track monthly or annual consumption, do not apply OTA updates unless you’ve planned for a statistics reset in HA (Settings → Statistics → pick the energy entity → “Clear” to acknowledge the gap). The device functions identically before and after the OTA from an integration standpoint; the only loss is the historical counter.
Energy Spike After Z2M Restart
When Z2M restarts, the ZNCZ04LM sometimes reports a wrong energy value for the first several polling cycles before settling to the correct reading (Z2M issue #23594, closed not-planned). If your HA Energy Dashboard shows a suspicious jump or dip in consumption on the days you restart Z2M, this is the cause.
The practical workaround is to use HA’s Statistics entities and flag or exclude the anomalous readings manually. You can also add a filter integration in HA’s sensor configuration to discard readings that deviate sharply from the previous value, though that adds complexity. For most users, acknowledging the glitch and using the long-term statistics outlier handling is enough.
Energy Monitoring Null with Sonoff Dongle-E
Already covered in prerequisites, but worth repeating here for anyone who searched directly for this symptom: if all energy monitoring entities show unavailable or null after pairing, and you’re using a Sonoff Dongle-E, the issue is the adapter. Switch to a Sonoff Dongle Plus (EFR32MG21) or a CC2652-based coordinator. The bug is tracked in Z2M #14299 and is not going to be fixed at the Z2M level.
Power Outage Memory Requires a Physical Button Press
Enabling the power outage memory setting via Z2M does not take effect immediately. After you toggle it on in the Z2M or HA interface, you need to press the physical button on the plug once. Only after that physical confirmation does the firmware apply the setting. This confuses a lot of people who enable the setting and then test it by cutting power, only to find the plug doesn’t restore correctly. The button press is required every time you change this setting.
Privacy and Network Notes
The ZNCZ04LM is Zigbee-only. There is no Wi-Fi radio in this device. Once it’s paired to a Z2M coordinator, its only communication path is via Zigbee to the coordinator — and from there, Z2M communicates to HA over MQTT on your local network.
There is no route for this plug to reach Xiaomi’s cloud servers. No DNS queries to Xiaomi infrastructure, no outbound connections of any kind from the device itself. This is one of the cleaner cases in the Xiaomi lineup for local-only operation: the hardware architecture makes cloud communication impossible, not just configurable-off.
If you want to verify this on your own network, a quick tcpdump on your IoT VLAN for DNS queries to *.mi.com or *.xiaomi.com while the plug is operating will show nothing. Compare this to devices with Wi-Fi radios, where you need VLAN segmentation and firewall rules to achieve the same result.
ZNCZ02LM vs ZNCZ03LM vs ZNCZ04LM
If you landed here with a different model number, here’s the quick disambiguation:
- ZNCZ02LM — CN/AU variant, Type-I (Australian) or Type-A two-pin plug. Same core functionality as the ZNCZ04LM, different physical form factor.
- ZNCZ03LM — newer CN-market variant. Schuko-incompatible. Same Zigbee capability set.
- ZNCZ04LM — EU Schuko/Type-F plug. This guide.
These are not physically interchangeable. The Z2M device pages are separate, and some firmware quirks differ between them. If you have a ZNCZ02LM or ZNCZ03LM, the entity list and integration approach are similar, but check the model-specific Z2M docs page for any differences in the known issues list.
Automation Example: Energy Alerting
One practical use for the energy monitoring beyond the Energy Dashboard: alerting when a device is consuming above a threshold for longer than expected. This works well for appliances that should be idle — a printer, a gaming console, a TV — that you want to flag if they’re drawing standby power.
automation:
- alias: "ZNCZ04LM: High draw alert"
trigger:
- platform: numeric_state
entity_id: sensor.xiaomi_plug_power # replace with your entity_id
above: 50 # watts — adjust to your use case
for:
minutes: 10
action:
- service: notify.mobile_app
data:
title: "Plug drawing high power"
message: >
{{ states('sensor.xiaomi_plug_power') }}W for 10+ minutes on xiaomi_plug.
Adjust the entity ID, wattage threshold, and notification service to match your setup. The for: minutes: 10 prevents spurious alerts from brief startup spikes (most appliances draw high wattage for a few seconds on startup).
For a complementary automation: trigger a monthly energy report by reading the energy entity on the first of each month and logging it to a helper or sending a notification. The cumulative counter approach is more reliable than relying on HA’s statistics alone for custom reporting intervals.
Verdict
The ZNCZ04LM is a solid choice for EU users who want a Zigbee smart plug with real energy monitoring, local control, and no cloud dependency. It’s cheap, widely available, and Z2M support is mature.
The caveats are real but manageable: use a Dongle Plus (not Dongle-E), avoid OTA if you care about energy history, expect a brief glitch after Z2M restarts, and remember the physical button press for power outage memory. None of these are dealbreakers — they’re just the things you should know before you spend 45 minutes debugging unexpected behavior.
If you have the Aqara SP-EUC01 instead, there’s a dedicated guide for that device — similar setup, different entity set and bugs. For in-wall switching without a plug, the Aqara Single Switch Module T1 is worth considering.
The Sonoff Zigbee Dongle Plus referenced in the prerequisites is available on Amazon — affiliate link — and is the coordinator I use across all my Z2M setups for exactly this reason: fewer compatibility surprises.