Support for Aqara smart wall switch (no neutral, double rocker) - [lumi.switch.l2aeu1]
Information about the device + link
This device is the new EU version of this US one but has a left and right button instead of top and bottom
What I've done so far:
I copied the device section from the US version (lumi.switch.b2laus01) and changed the model and zigbee model accordingly and I can control the left and right buttons from zigbee2mqtt.
What doesn't work:
- The reporting doesn't work i.e. if the switch is manually toggled the state doesn't get updated in zigbee2mqtt.
- These switches (like other Aqara wall switches) can be set so that the physical button is disabled and the button can become a virtual switch for something else
Manually trying to configure reporting for endpoint 2 (the right button) through the UI results in the following in the logs:
ERROR: Request 'zigbee2mqtt/bridge/request/device/configure_reporting' failed with error: 'ConfigureReporting 0x54ef4410000d0438/2 genOnOff([{"attribute":"onOff","minimumReportInterval":"1","maximumReportInterval":"10","reportableChange":"1"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'SOFTWARE_FAILURE')'
See section from devices.js below - any help appreciated
{
zigbeeModel: ['lumi.switch.l2aeu1'],
model: 'WS-EUK02',
vendor: 'Xiaomi',
description: 'Aqara smart wall switch (no neutral, double rocker)',
extend: preset.switch(),
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
meta: {multiEndpoint: true, configureKey: 1},
endpoint: (device) => {
return {'left': 1, 'right': 2};
},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint1);
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint2);
},
}
data/database.db entry of the device
{"id":12,"type":"EndDevice","ieeeAddr":"0x54ef4410000d0438","nwkAddr":21323,"manufId":4447,"manufName":"LUMI","powerSource":"Mains (single phase)","modelId":"lumi.switch.l2aeu1","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,2,3,4,5,6,9],"outClusterList":[10,25],"clusters":{"genBasic":{"attributes":{"modelId":"lumi.switch.l2aeu1","manufacturerName":"LUMI","powerSource":1,"zclVersion":3,"appVersion":11,"stackVersion":2,"hwVersion":1,"dateCode":"01-12-2021"}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1},{"cluster":2,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1}],"configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":3600,"repChange":0}],"meta":{}},"2":{"profId":260,"epId":2,"devId":256,"inClusterList":[0,3,4,5,6],"outClusterList":[],"clusters":{"genBasic":{"attributes":{}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1},{"cluster":2,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1},{"cluster":2,"type":"endpoint","deviceIeeeAddress":"0x00124b002160067e","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":11,"stackVersion":2,"hwVersion":1,"dateCode":"01-12-2021","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1614682069845}
Hi. I'm looking for a way to support similar device but with neutral wire. It is lumi.switch.n2aeu1. Could you explain where did you find and coppied configuration for us version? I'm using Home Assistant with Z2MQTT as addon.
@piotrbielaska this link explains about adding a new device. The file you need to edit is called devices.js
@Koenkk are you able to provide any direction please? Is that enough information?
I had problems using converters and decided to wait until this device will be supported. Description on how to add new device in Home Assistant Add-On is very vague.
Do you also not get updates of the left switch?
Do you also not get updates of the left switch?
I did get some reports from the left switch but didn't test thoroughly yet. Definitely none from the right.
What does the SOFTWARE_FAILURE mean when I manually tried to set up the bind/report on the right switch?
I don't know what it exactly means, but this is reported by the device itself (doesn't come from z2m). I suggest sniffing the traffic with the Xiaomi gateway to see how it has to be configured: https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html
@Koenkk I've flashed my spare CC2531 as a sniffer and I've got zboss and Wireshark running on Windows 10. I've added the Trust Center key as well as my z2m network key (obtained from Wireshark by re-adding a device) but Wireshark still can't decode/decrypt the payloads.
Am I missing something?
You need to obtain the Xiaomi gateway key, if you can provide a sniff of the pairing with the Xiaomi gateway I can grab the key from it.
Is there a known channel I should be sniffing for the gateway? Also, is there a way to differentiate traffic to/from z2m and traffic/to from the Aqara gateway?
The gateway is probably on channel 11, 15, 20 or 25. If Z2M is also on that channel I recommend to turn of all devices on the z2m network.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
Hi @Koenkk
Can you reopen this and look through this wireshark capture and see if you can help with supporting this device?
Is the sniffer process different for devices using Zigbee 3.0?
PS I am also beta testing a new Aqara Roller Shade cord controller and am having similar issues.
Thanks
@tavalin could you provide the network key, this should be revealed when starting the sniffing before pairing the device. And when used with the original gateway, can you click the right button, does the state on the xiaomi gateway update immediately?
I've reported the missing status report to Aqara.
The status on the gateway has a noticeable delay for the right rocker compared to the left one. The assumption is Aqara is polling states.
@blakadder
The status on the gateway has a noticeable delay for the right rocker compared to the left one. The assumption is Aqara is polling states.
Can you confirm this by taking a sniff? https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html
@tavalin could you provide the network key, this should be revealed when starting the sniffing before pairing the device. And when used with the original gateway, can you click the right button, does the state on the xiaomi gateway update immediately?
I am using the new Aqara E1 Hub as I'm testing it also. I no longer have the old Xiaomi hub anymore - i'm not sure if that makes a difference but the new E1 Hub is also Zigbee 3.0.
Sorry if i'm being stupid but can you explain how I can get the network key from the Aqara hub? Is it a just a case of running the sniffer for a while or do I need to do something apart from pairing a device? The how to guide describes pairing a device with z2m to get the network key
Edit: I've added another sniffer log in an attempt to capture more info: l2aeu1-v2.zip
@tavalin do you have another device to pair? The key can be found in "Transport key" message and should come after the "Association response", I don't know why but maybe because the device has already been paired before.
@blakadder
The status on the gateway has a noticeable delay for the right rocker compared to the left one. The assumption is Aqara is polling states.
Can you confirm this by taking a sniff? https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html
Sadly I managed to brick my G2H gateway in the meantime and I don't have any alternatives that support that device
I've reported the missing status report to Aqara.
The status on the gateway has a noticeable delay for the right rocker compared to the left one. The assumption is Aqara is polling states.
This is consistent with my experience using the Aqara hub. @blakadder how did you raise it with Aqara? Did you get a response yet?
If you don't get a response I have a contact I try.
@Koenkk I will try do more sniffing over the coming weekend with some new devices that haven't been paired before.