private@homelab: ~/latest
local-first guides · privacy-aware · no noisy tracking
private@homelab:~$ cat guides/article.md
· ·
7–11 minutes
read

Aqara Rotary Knob H1 Wired (ZNXNKG01LM): Zigbee2MQTT Setup

Pair the Aqara ZNXNKG01LM wired rotary knob with Zigbee2MQTT, control all three relay loads in Home Assistant, and use rotation events in automations.

Aqara Smart Rotary Knob H1 (Wired, ZNXNKG01LM): Zigbee2MQTT and Home Assistant Setup

If you’ve been searching for a guide to the ZNXNKG01LM and landing on threads about the wireless version, you’re not alone. Almost everything indexed in English covers the ZNXNKG02LM (battery-powered, no load control), and the wired model barely gets a mention beyond compatibility tables. This guide covers the wired knob specifically: wiring, pairing, the three relay endpoints in Home Assistant, rotation event automations, and the quirks that Chinese smart home communities have been documenting for a while.

The ZNXNKG01LM (智能旋钮开关H1零火线版, Zhìnéng Xuánniǔ Kāiguān H1 Línghuǒxiàn Bǎn — Smart Rotary Knob Switch H1 Neutral/Live Wire Version) is a wall-mounted switch that controls three independent relay loads while also acting as a rotary encoder for automation triggers. It is supported in Zigbee2MQTT, which means no Aqara hub and no cloud.

What the ZNXNKG01LM Actually Does

The face of the switch has a 旋钮 (xuán niǔ — rotary knob) in the center and three press-button zones: left, center, and right. Behind the faceplate, five terminals handle power and load: N (neutral, 零线 — línɡ xiàn), L (live in, 火线 — huǒ xiàn), L1 (left load), L2 (center load), and L3 (right load). Each load is independently switched. This is a real three-gang replacement, not a scene controller routing through a single relay.

Power monitoring comes built in. Zigbee2MQTT exposes energy (kWh), voltage (V), current (A), and power (W) for the device as a whole. For a switch controlling three circuits — say, dining room pendants, kitchen downlights, and a hallway strip — that’s meaningful data without adding separate smart plugs to each circuit.

Wired vs. Wireless: Key Differences

The two Aqara H1 knobs share a name and a form factor and not much else. Before wiring anything, make sure you have the right one.

Feature ZNXNKG01LM (Wired) ZNXNKG02LM (Wireless)
Power Requires neutral + live wire Battery-powered
Load control 3 independent relays (L1/L2/L3) None
Power monitoring Yes (energy, voltage, current, power) No
Zigbee role Router (mains-powered) End device
Z2M support Stable Stable
Use case Wall switch replacement Scene controller, surface-mount

The wireless version is excellent as a scene controller: stick it anywhere, no wiring needed. But if you want to actually switch lights at the wall and have three circuits to control, the wired ZNXNKG01LM is the right device.

Worth knowing: because the ZNXNKG01LM is mains-powered, it acts as a Zigbee router (Zigbee model lumi.switch.rkna01), unlike the battery-powered wireless knob. That’s a bonus for a multi-switch renovation install: each wired knob you add helps repeat the mesh rather than sitting on it as a leaf. (This is the opposite of several battery-adjacent Aqara wall devices, so it’s worth confirming in your own Z2M network map rather than assuming.)

Wiring

Isolate the circuit at the breaker before touching any terminals. The ZNXNKG01LM requires both neutral and live — it cannot work without a neutral, unlike Aqara’s no-neutral H1 switches.

The five rear terminals map directly to a standard three-gang wiring arrangement:

  • N — neutral conductor from your feed
  • L — live in from your feed (this is the supply live, not a switched output)
  • L1 — switched live out to the first load (left zone)
  • L2 — switched live out to the second load (center zone)
  • L3 — switched live out to the third load (right zone)

If you’re replacing a traditional three-gang switch during 装修 (zhuāng xiū — renovation), the terminal layout is essentially a drop-in: the existing three-gang switch has the same N, L, and three load connections. The only addition is the neutral wire, which should already be in the back box for a modern wiring run.

After wiring, restore power to the circuit. The device should power on, and the knob will light up briefly to indicate it’s live.

Pairing with Zigbee2MQTT

With power on, put Zigbee2MQTT into pairing mode from the Z2M frontend or via MQTT. Then, on the ZNXNKG01LM, press the center button rapidly three times. The device will enter pairing mode and you should see the indicator light change behavior.

What I didn’t expect the first time: the device didn’t show up immediately after the third press. It took about 15 seconds before it appeared in the Z2M frontend. If nothing shows after 30 seconds, try the three-press sequence again — sometimes the rapid-press timing needs to be adjusted slightly.

Once paired, Z2M should identify it as lumi.switch.rkna01. If you see a generic model string instead, let the interview complete before concluding it failed. Z2M’s device interview for lumi devices can take up to a minute.

Entities in Home Assistant

Zigbee2MQTT exposes a fairly complete entity set for this device. In Home Assistant, after the device is discovered, you’ll find:

Switch entities:
switch.knob_state_left — controls L1 load
switch.knob_state_center — controls L2 load
switch.knob_state_right — controls L3 load

Each is independently controllable. You can turn L1 and L3 on while leaving L2 off, which is the obvious behavior you’d expect from a three-gang switch. It’s worth confirming, though, because the Aqara Home app handles this differently (more on that below).

Power monitoring entities:
– Energy (kWh)
– Voltage (V)
– Current (A)
– Power (W)

Rotation and button action entities:
action_rotation_angle — degrees rotated in the last event (positive clockwise, negative counter-clockwise)
action_rotation_angle_speed — rotational velocity in degrees per second
action_rotation_percent — rotation expressed as a percentage step
action_rotation_percent_speed — the percentage-step velocity
action — button events: single, double, hold, release

These fire as HA events and can be consumed in automations. Confirm the exact field names against the Exposes tab in your Z2M version before wiring up automations — Aqara action names shift between converter releases.

Why Z2M Beats the Aqara App for Three-Relay Control

This is where Chinese community discussion (SMZDM — 什么值得买, shénme zhídé mǎi — a major Chinese consumer tech review site) has been making a point that English content hasn’t picked up: the Aqara Home app controls the three relay loads via gesture mapping, not three independent buttons.

In the default app configuration: 单击 (dān jī — single press) controls L1, 双击 (shuāng jī — double press) controls L2, and 长按 (cháng àn — long press) controls L3. For someone who set it up and understands the mapping, this is fine. For anyone else who walks up to the wall switch — a family member, a guest — it’s confusing. The switch looks like one control, and the behavior is non-obvious.

In Zigbee2MQTT, all three loads are exposed as separate HA switch entities. You can build a dashboard card with three labeled toggles, or use voice commands that refer to the actual room: “turn off the kitchen lights” rather than “double press the living room knob.” On this specific device, that alone is a strong argument for Z2M over Aqara hub integration — the gesture-based UX is a real friction point in households where not everyone is configuring the automation system.

Using Rotation Events in Automations

The rotation events are what make this device more than a three-gang switch. A few practical patterns:

Light dimming: Rotation events arrive on the device’s MQTT topic as an action payload. Trigger on that topic and read the angle field directly:

alias: Knob dims dining room lights
trigger:
  - platform: mqtt
    topic: zigbee2mqtt/dining_knob
condition:
  - condition: template
    value_template: "{{ trigger.payload_json.action == 'rotate' }}"
action:
  - service: light.turn_on
    target:
      entity_id: light.dining_room
    data:
      brightness_step_pct: "{{ trigger.payload_json.action_rotation_angle | int }}"
mode: queued

Replace dining_knob with your device’s Z2M friendly name, and confirm the action string (rotate) and the angle field name against your Z2M version’s output — some releases label the rotation action differently. Because action_rotation_angle is positive for clockwise and negative for counter-clockwise, the brightness step follows rotation direction naturally.

Curtain position control: The same approach works for cover entities — map action_rotation_percent to cover.set_cover_position for proportional control.

Operation mode — event vs. command: Z2M exposes an operation_mode setting for this device. In “event” mode, rotation and button presses fire as action events for HA automations. In “command” mode, the device sends direct load-control commands. For most HA use cases you want “event” mode so automations handle the logic; command mode makes more sense when the device operates standalone without a controller.

Troubleshooting

All three endpoints not appearing in HA: This is usually a Z2M interview that didn’t fully complete. In the Z2M frontend, go to the device and click “Reconfigure.” The interview will re-run and the missing entities should appear within about a minute.

Device paired but shows as unknown model: Let the interview complete. lumi devices go through an extended interview where Z2M queries the device for model info — don’t try to re-pair before it finishes.

Can’t enter pairing mode: The three-press sequence needs to be done on the center button zone specifically, not the left or right zones. Press at a pace slightly slower than tapping, about one press per half-second. If the device is already paired to another coordinator (for example, a previous Aqara hub setup), factory reset it first following the procedure in the Aqara manual for the H1 knob, then try pairing again.

Weak signal on distant knobs: Because the ZNXNKG01LM is a mains-powered router, each one you install helps repeat the mesh. If a knob far from the coordinator is dropping commands before any routers are in between, add or power on an intermediate mains-powered Zigbee device so the mesh has a hop to work with, then let the network settle and re-check link quality in Z2M.

Power Monitoring as a Differentiator

SMZDM users have pointed this out in renovation-context discussions, and it’s underappreciated: most smart switches don’t include power monitoring. The ZNXNKG01LM does, which means three circuits — whatever you wire to L1/L2/L3 — report energy consumption back to HA without any additional hardware.

For a dining room where L1 controls pendant lights, L2 controls a chandelier, and L3 controls an under-cabinet strip, you get per-circuit energy tracking from a single device. At 389–499 yuan (Chinese-market pricing as listed on SMZDM in 2025–2026; globally available via AliExpress), that’s a reasonable cost for the combined functionality. If you only need the rotary-encoder behavior and not wall load control, the battery-powered ZNXNKG02LM wireless knob is the cheaper, no-wiring option.


Whether Aqara adds any additional endpoints or changes the operation-mode behavior in a future firmware revision is worth watching — the Z2M changelog for lumi.switch.rkna01 would be the first place that surfaces. If you’re still deciding which Zigbee stack to standardize on, our comparison of ZHA and Zigbee2MQTT for Aqara devices covers where each one leads on multi-endpoint switches like this one.

local-firstHome Assistantno-cloud