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 of the next Z2M version.

In the meantime, here’s a working external converter that can be used:

import * as exposes from "zigbee-herdsman-converters/lib/exposes";
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 button press on device",
        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 button press on device",
        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.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

Hello absent.

You’re fantastic, one of a kind, thank you for your help and time!
Unfortunately, I can’t add a working external converter; I haven’t gotten that far with Home Assistant yet.

But perhaps you could send me a message when it can be added to Home Assistant and is working?

Thanks again for your help!

I have another question:
In Home Assistant, all the device images for my Aqara devices are faded, and so far no one has been able to help me with how to make them vibrant again.
I noticed this after a Home Assistant update.
The images are faded everywhere and almost invisible on my iMac, iPad, and iPhone.

Best regards, WolfgangP.

PS: Please excuse my poor English :wink:

No problem, you’re welcome. You add it in Zigbee2MQTT. Go to settings-dev console-External converters. Create a new converter, call it agl01.mjs, paste in the code, click save. Then restart Zigbee2MQTT and it should work.

In regards to Homa Assistant images, do you mean in the devices page list? Or the dashboard?

1 Like

Home Assistant images:

In the Zigbee2MQTT interface:
Home, dashboard, and device view—they appear faded.

Image attached.

I think that’s simply because that are white devices, Zigbee2MQTT uses transparent backgrounds in device images, and you’ve got a white theme in Home Assistant. If you change to Home Assistant theme to dark do they show up better? The setting is in your user profile under User preferences.

Edit: actually Z2M has it’s own themes too. It looks like you’re using the HA addon so the setting might be in a different place but in the standalone Z2M there’s a paint brush icon in the menu bar that opens the theme selector.

Edit 2:

You can also set your own icon for each device under its settings:

Hello,
Unfortunately, I’m getting the following error message when saving the code; see attached image.

Best regards, Wolfgang

Sorry, a line got chopped off the top it pasting into the forum. Try it again now.

1 Like

Unfortunately, the T1 vibration sensor isn’t working for me.
I’ve tried pairing it three times, but it’s still not working properly.

It’s not being passed on to HA!!!

It works in Z2M, albeit with significantly fewer features than its predecessor!
But it’s ready to go again much faster!

In the attached image, the text “Submit converter” keeps jumping around.

The text means it’s working with an external converter, that’s the code you pasted in.

It’s working fine for me in Home Assistant. Do you not see the events listed in the device page:

Regarding the features, it only supports movement and triple strike.