Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.97k stars 1.67k forks source link

[New device support]: Aqara roller shade motor T1C (ZNGZDJ16LM) #20031

Closed rugal7699 closed 10 months ago

rugal7699 commented 10 months ago

Link

https://cdn.aqara.com/cdn/website/static/lodash-4.17.15/blinds-motor-t1c-manual.pdf

Database entry

{"id":2,"type":"Router","ieeeAddr":"0x04cf8cdf3c818f8d","nwkAddr":8462,"manufId":4447,"manufName":"LUMI","powerSource":"Mains (single phase)","modelId":"lumi.curtain.vagl02","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":514,"inClusterList":[0,2,3,4,5,6,9,1794,2820,19,13,258],"outClusterList":[10,25],"clusters":{"aqaraOpple":{"attributes":{"247":{"type":"Buffer","data":[1,33,184,11,3,40,32,5,33,1,0,7,39,0,0,0,0,0,0,0,0,8,33,11,1,9,33,3,5,11,32,0,100,32,2,102,32,129,103,32,37,104,33,5,2]},"1026":1}},"genBasic":{"attributes":{"modelId":"lumi.curtain.vagl02","manufacturerName":"LUMI","powerSource":1,"appVersion":11,"zclVersion":3,"stackVersion":2,"hwVersion":1,"dateCode":"03-28-2020"}},"genMultistateOutput":{"attributes":{"61440":2166272,"presentValue":2}},"genAnalogOutput":{"attributes":{"61440":0,"presentValue":2}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":11,"stackVersion":2,"hwVersion":1,"dateCode":"03-28-2020","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1701744432966,"defaultSendRequestWhen":"immediate"}

Comments

The supported-devices list includes the Aqara roller shade motor TA (ZNGZDJ11LM), but my device is Aqara roller shade motor T1C (ZNGZDJ16LM). I think the Exposes could be the same as the supported device ZNGZDJ11LM. However, after updating to version 1.34.0-1, the external converters is incompatible with the current Z2M version, I want to fix my external converter, but I don't know how to modify it. The following is the external converter I'm currently using. It works well in 1.33.2-1 but is not supported in the lasted update.

External converter

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const ota = require('zigbee-herdsman-converters/lib/ota');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['lumi.curtain.vagl02'],
    model: 'ZNGZDJ16LM',
    description: 'Aqara roller shade motor',
    vendor: 'Aqara',
    whiteLabel: [{vendor: 'Xiaomi', model: 'SRSC-M01'}],
    fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt],
    toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
    exposes: [e.cover_position().setAccess('state', ea.ALL),
        exposes.binary('running', ea.STATE, true, false)
            .withDescription('Whether the motor is moving or not')],
    ota: ota.zigbeeOTA,
    configure: async (device, coordinatorEndpoint, logger) => {
        utils.attachOutputCluster(device, 'genOta');
    },
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

Koenkk commented 10 months ago

Added!

Changes will be available in the dev branch in a few hours from now.