-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Link
https://www.aqara.com/eu/product/shutter-switch-h2-eu/
Database entry
{"id":4,"type":"Router","ieeeAddr":"0x54ef4410013e3f66","nwkAddr":47188,"manufId":4447,"manufName":"Aqara","powerSource":"DC Source","modelId":"lumi.switch.aeu003","epList":[1,2,3,4,21],"endpoints":{"1":{"profId":260,"epId":1,"devId":0,"inClusterList":[258,2820,1794,5,4,3,0,64704],"outClusterList":[10,25],"clusters":{"genBasic":{"attributes":{"61441":0,"modelId":"lumi.switch.aeu003","manufacturerName":"Aqara","powerSource":4,"zclVersion":3,"appVersion":20,"stackVersion":27,"hwVersion":1,"dateCode":"20250620"}},"closuresWindowCovering":{"attributes":{"currentPositionLiftPercentage":100,"currentPositionTiltPercentage":0}},"haElectricalMeasurement":{"attributes":{"acPowerDivisor":10,"acPowerMultiplier":1,"activePower":0}},"manuSpecificLumi":{"attributes":{"22":"B655876ABC31FED0B5EC47EAA1B95967DA4EE004F6395F20FCFA0B542AF1F01A","223":{"type":"Buffer","data":[19,33,0,0,20,33,0,0,22,33,2,0,23,33,0,0,12,33,0,0,24,33,103,8]},"238":3604,"240":0,"245":62411776,"247":{"type":"Buffer","data":[3,40,24,5,33,1,0,9,33,5,1,10,33,0,0,13,35,20,14,0,0,17,35,1,0,0,0,100,32,100,149,57,239,36,134,61,152,57,111,22,84,61,151,57,18,101,48,64,156,65,8,0,0,0,0,0,0,0,0]},"515":1,"792":2,"793":20,"1055":100,"1056":2,"1057":2,"1084":2,"curtainCalibrated":1,"curtainReverse":0}}},"binds":[{"cluster":258,"type":"endpoint","deviceIeeeAddress":"0x04e3e5fffe6be23f","endpointID":1}],"configuredReportings":[{"cluster":258,"attrId":9,"minRepIntval":1,"maxRepIntval":65000,"repChange":1},{"cluster":258,"attrId":8,"minRepIntval":1,"maxRepIntval":65000,"repChange":1}],"meta":{}},"2":{"profId":260,"epId":2,"devId":0,"inClusterList":[64704],"outClusterList":[],"clusters":{"manuSpecificLumi":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":0,"inClusterList":[18,64704],"outClusterList":[],"clusters":{"manuSpecificLumi":{"attributes":{"646":2}},"genMultistateInput":{"attributes":{"presentValue":2}}},"binds":[{"cluster":64704,"type":"endpoint","deviceIeeeAddress":"0x04e3e5fffe6be23f","endpointID":1}],"configuredReportings":[],"meta":{}},"4":{"profId":260,"epId":4,"devId":0,"inClusterList":[18,64704],"outClusterList":[],"clusters":{"manuSpecificLumi":{"attributes":{"646":2}},"genMultistateInput":{"attributes":{"presentValue":1}}},"binds":[{"cluster":64704,"type":"endpoint","deviceIeeeAddress":"0x04e3e5fffe6be23f","endpointID":1}],"configuredReportings":[],"meta":{}},"21":{"profId":260,"epId":21,"devId":0,"inClusterList":[12],"outClusterList":[],"clusters":{"genAnalogInput":{"attributes":{"presentValue":0}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":20,"stackVersion":27,"hwVersion":1,"dateCode":"20250620","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":332242049},"lastSeen":1767633490245}
Zigbee2MQTT version
2.7.2 (unknown)
External converter
const m = require('zigbee-herdsman-converters/lib/modernExtend');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const lumi = require('zigbee-herdsman-converters/lib/lumi');
const { lumiModernExtend } = lumi;
const ea = exposes.access;
const definition = {
zigbeeModel: ['lumi.switch.aeu003'],
model: 'DS-K02D/DS-K02E',
vendor: 'Aqara',
description: 'Aqara H2 EU Shutter Switch',
extend: [
// cover control
m.windowCovering({ controls: ['lift'] }),
// IMPORTANT: verify endpoint IDs in Z2M "device -> endpoint list"
// Your earlier code suggested 3 and 4.
m.deviceEndpoints({ endpoints: { button_top_right: 3, button_bottom_right: 4 } }),
// Bind manufacturer-specific lumi cluster (same pattern as WS-K07E/WS-K08E)
m.bindCluster({
endpointNames: ['button_top_right', 'button_bottom_right'],
cluster: 'manuSpecificLumi',
clusterType: 'input',
}),
lumiModernExtend.lumiLedIndicator(),
lumiModernExtend.lumiFlipIndicatorLight(),
// Convert raw button values -> actions
lumiModernExtend.lumiAction({
endpointNames: ['button_top_right', 'button_bottom_right'],
actionLookup: { hold: 0, single: 1, double: 2, release: 255 },
}),
// Enable multi-click mode (needed for "double" on many H2 devices)
lumiModernExtend.lumiMultiClick({
description: 'Multi-click mode for top-right button',
endpointName: 'button_top_right',
}),
lumiModernExtend.lumiMultiClick({
description: 'Multi-click mode for bottom-right button',
endpointName: 'button_bottom_right',
}),
],
exposes: [
exposes.enum('action', ea.STATE, [
'button_top_right_single',
'button_top_right_double',
'button_top_right_hold',
'button_top_right_release',
'button_bottom_right_single',
'button_bottom_right_double',
'button_bottom_right_hold',
'button_bottom_right_release',
]),
],
meta: { coverInverted: true },
};
module.exports = definition;What does/doesn't work with the external definition?
I used the lumi lib to get the Right Switches working for Double & Single Click.
I didn't manage to get Hold working yet.
Notes
software_build_id: undefined
date_code: 20250620
endpoints:
{"1":{"clusters":{"input":["closuresWindowCovering","haElectricalMeasurement","seMetering","genScenes","genGroups","genIdentify","genBasic","manuSpecificLumi"],"output":["genTime","genOta"]}},"2":{"clusters":{"input":["manuSpecificLumi"],"output":[]}},"3":{"clusters":{"input":["genMultistateInput","manuSpecificLumi"],"output":[]},"name":"button_top_right"},"4":{"clusters":{"input":["genMultistateInput","manuSpecificLumi"],"output":[]},"name":"button_bottom_right"},"21":{"clusters":{"input":["genAnalogInput"],"output":[]}}}