Replies: 10 comments 25 replies
-
|
Could you make a PR by clicking here? |
Beta Was this translation helpful? Give feedback.
-
|
Do all features work either way this code? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I bought this Aqara Shutter Switch (DS-K02E) for a trial, without realizing it's not supported yet. This got me curious how support for new devices is added in zigbee2mqtt. Do people who add new devices usually sniff traffic between the official hubs and the device ("reverse engineer") and then just integrate function for function in zigbee2mqtt? Or is there another way? Sorry if this is slightly off topic, feel free to ignore. |
Beta Was this translation helpful? Give feedback.
-
|
I created an external converter file which works for me with following code: import * as m from 'zigbee-herdsman-converters/lib/modernExtend';
import * as exposes from 'zigbee-herdsman-converters/lib/exposes';
const ea = exposes.access;
const customLiftFromEndpoint21 = {
cluster: 'closuresWindowCovering',
type: ['attributeReport', 'readResponse'],
endpoint: 21,
convert: (model, msg, publish, options, meta) => {
const result = {};
if (msg.data && msg.data.hasOwnProperty('currentPositionLiftPercentage')) {
const raw = msg.data['currentPositionLiftPercentage'];
result.position = raw;
result.state = raw === 0 ? 'CLOSE' : 'OPEN';
}
return result;
},
};
const fromMultistateInput = {
cluster: 'genMultistateInput',
type: ['attributeReport'],
convert: (model, msg, publish, options, meta) => {
const endpoint = msg.endpoint.ID;
const value = msg.data.presentValue;
const buttonMap = {
3: 'button_3',
4: 'button_4',
};
if (buttonMap[endpoint] !== undefined && value === 1) {
return { action: `${buttonMap[endpoint]}_single` };
}
return null;
},
};
export default {
zigbeeModel: ['lumi.switch.aeu003'],
model: 'lumi.switch.aeu003',
vendor: 'Aqara',
description: 'Aqara H2 EU Shutter Switch',
fromZigbee: [customLiftFromEndpoint21,
fromMultistateInput],
extend: [
m.deviceEndpoints({endpoints: {'1': 1, '2': 2, '3': 3, '4': 4, '21': 21}}),
m.windowCovering({controls: ['lift']}),
],
exposes: [
exposes.enum('action', ea.STATE, [
'button_3_single',
'button_4_single' ]).withDescription('Single press actions from right buttons'),
],
meta: {multiEndpoint: true},
};Put this code in a file with the name lumi_switch_aeu003.js under /config/zigbee2mqtt/external_converters This code is patching the position field of the Shutter, because it's not proper submitted with the default solution. |
Beta Was this translation helpful? Give feedback.
-
|
Is there a possibility that the device will be included in the “standard” in the near future, given the preliminary work that has already been done here? |
Beta Was this translation helpful? Give feedback.
-
|
When this divece will be supported in standard release of zitgbee2mqtt ? |
Beta Was this translation helpful? Give feedback.
-
|
Is there any update? Many thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Second this, seems like the support should be ready to be integrated in standard release |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've bought a Aqara Shutter Switch H2 EU Model : DS-K02E which isn't supported yet.
I've generated this external definition.
Thank you and tell me if Info is needed
Horst
Beta Was this translation helpful? Give feedback.
All reactions