Aqara Vibrations Sensor T1

Der Aqara Vibrations Sensor T1 macht folgende Probleme:
Er lässt sich in Home Assistant ,Zegbee2MQTT’’ nur erschwert anlernen!
Wenn ja, dann funktioniert er leider nicht RICHTIG.
Die Daten werden werden von Z2M nicht an HA weitergegeben.
Der Vibration Sensor der Gen.1 und allen weiteren Aqara Produkte funktionieren einwandfrei in HA.
Der Vib.Sens. T1 würde einfach besser funktionieren als die erste Generation, schneller wieder bereit etc…
Wahrscheinlich gehört er für Zegbee besser programmiert.
Oder wer hat da eine Hilfe Info?

LG WolfgangP.

The Aqara Vibration Sensor T1 is having the following problems:
It’s difficult to integrate it into Home Assistant using Zegbee2MQTT!
If it does integrate, it doesn’t work correctly.
The data isn’t being passed from Z2M to HA.
The vibration sensor of the first generation and all other Aqara products work perfectly in HA.
The Vib.Sens. T1 simply works better than the first generation, restarts faster, etc. It probably needs better programming for Zegbee.
Does anyone have any helpful information?

Best regards, WolfgangP.

I don’t have a Vibration Sensor T1 to test, but do the reading work correctly in the Z2M interface?

Hello @prentner
Check the operation of the sensor in ZHA, perhaps it will work better there.

ZHA ?
Ich benutze Z2M und das sollte ja nicht parallel zu ZHA laufen.
Außerdem ist Z2M so und so besser laut den Aussagen der Profis und…

Ich möchte einfach nur meine Geräte Bilder wieder scharf bekommen :wink:
Bitte um deine, EURE Unterstützung.

LG WolfgangP.

Kann ich leider zu 100% nicht bestätigen, habe ihn nicht mehr installiert.
Es war ja bei der Installation schon eine Geburt bis das er erkannt wurde.
Das stimmt etwas mit der Programmierung nicht, mit dem VS-T1.
Der Sensor müsste nachgebessert werden in der Programmierung.
Wohin schreibt man das? Zu Aqara oder GitHub oder…?

Schöne Grüße
WolfgangP.

I was just looking at the Z2M code for it, and have purchased a T1 Vibration Sensor. I’ll see if I can improve on the implementation but I can’t promise anything. It depends upon whether it turns out to be a hardware/firmware issue or a poor Z2M implementation. Once the sensor arrives I’ll install it to an Aqara hub with a Zigbee packet sniffer running and see how it compares to what happens when it’s installed via Z2M.

I’ve found the issue with the Z2M converter.

Basically, the T1 Vibration Sensor oddly doesn’t advertise the manuSpecificLumi cluster 0xfcc0 when Z2M interviews it. The movement/vibration sensor attribute 0x0118 uses this to broadcast its payload when movement is detected. And because that cluster isn’t advertised when Z2M pairs the device, it never actually listens for the movement payload broadcast.

Forcing a deviceAddCustomCluster in the Z2M device extend solves the issue. I’ll get a pull request in for the Z2M codebase but it’ll probably miss the 1st April release.

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"),
    ],
};
1 Like