In the meantime, here’s a working external converter that can be used:
import * as lumi from "zigbee-herdsman-converters/lib/lumi";
import * as m from "zigbee-herdsman-converters/lib/modernExtend";
import "zigbee-herdsman-converters/lib/types";
import {Zcl} from "zigbee-herdsman";
const {lumiModernExtend, manufacturerCode} = lumi;
const e = exposes.presets;
function lumiSensitivityAdjustment(lookup) {
return m.enumLookup({
name: "sensitivity_adjustment",
lookup: lookup,
cluster: "manuSpecificLumi",
attribute: {ID: 0x010e, type: 0x20},
description: "Requires device button press",
zigbeeCommandOptions: {manufacturerCode},
access: "SET",
entityCategory: "config",
});
}
function lumiReportInterval(lookup) {
return m.enumLookup({
name: "report_interval",
lookup: lookup,
cluster: "manuSpecificLumi",
attribute: {ID: 0x0110, type: 0x20},
description: "Requires device button press",
zigbeeCommandOptions: {manufacturerCode},
access: "SET",
entityCategory: "config",
});
}
function lumiVibration() {
const exposes = [e.action(["movement", "triple_strike"])];
const fromZigbee = [
{
cluster: "manuSpecificLumi",
type: ['attributeReport', 'readResponse'],
convert: (model, msg, publish, options, meta) => {
if (msg.endpoint.ID === 2 && msg.data.movement === 1) {
return {action: 'movement'};
}
},
},
{
cluster: "genMultistateInput",
type: ["attributeReport", "readResponse"],
convert: (model, msg, publish, options, meta) => {
if (msg.endpoint.ID === 2 && msg.data.presentValue === 1) {
return {action: "triple_strike"};
}
},
},
];
return {exposes, fromZigbee, isModernExtend: true};
}
export default {
zigbeeModel: ["lumi.vibration.agl01"],
model: "DJT12LM",
vendor: "Aqara",
description: "Vibration sensor T1",
extend: [
m.deviceEndpoints({endpoints: {1: 1, 2: 2}}),
m.deviceAddCustomCluster('manuSpecificLumi', {
ID: 0xfcc0,
name: 'manuSpecificLumi',
manufacturerCode,
attributes: {
movement: {ID: 0x0118, type: Zcl.DataType.UINT8, name: 'movement'},
},
}),
lumiVibration(),
lumiReportInterval({"1s": 1, "5s": 2, "10s": 3}),
lumiSensitivityAdjustment({high: 1, medium: 2, low: 3}),
lumiModernExtend.lumiBattery({voltageToPercentage: {min: 2850, max: 3000}}),
lumiModernExtend.lumiZigbeeOTA(),
m.quirkCheckinInterval("1_HOUR"),
],
};