Koenkk / zigbee2mqtt

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

[New device support]: Tuya TS0601 Curtain Motor "gen3" _TZE200_yia0p3tr #20725

Closed IceEyz closed 8 months ago

IceEyz commented 8 months ago

Link

https://www.aliexpress.com/item/1005004985816213.html

Database entry

{"id":44,"type":"Router","ieeeAddr":"0xa4c1386d63ecdf30","nwkAddr":22995,"manufId":4417,"manufName":"_TZE200_yia0p3tr","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":" '-f '-\u0012","65506":54,"65508":0,"stackVersion":0,"dateCode":"","appVersion":70}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1704917190739,"defaultSendRequestWhen":"immediate"}

Comments

This curtain motor conforms to the TS0601_cover_1 spec, however, it does not support motor speed.

There's TS0601_cover_2 that would probably fit as well, however, that one apparently doesn't support motor reversal.

I'd be happy with this model (_TZE200_yia0p3tr) added to either cover_1, cover_2 or a another one still. Thanks in advance.

External defintion

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['TS0601'],
    fingerprint: [
        // Curtain motors:
        {modelID: 'TS0601', manufacturerName: '_TZE200_yia0p3tr'},
    ],
    model: 'TS0601_cover_1',
    vendor: 'TuYa',
    description: 'Curtain motor/roller blind motor/window pusher/tubular motor',
    fromZigbee: [legacy.fromZigbee.tuya_cover, fz.ignore_basic_report],
    toZigbee: [legacy.toZigbee.tuya_cover_control, legacy.toZigbee.tuya_cover_options],
    exposes: [
        e.cover_position().setAccess('position', ea.STATE_SET),
        e.composite('options', 'options', ea.STATE_SET)
            .withFeature(e.binary('reverse_direction', ea.STATE_SET, true, false)
                .withDescription('Reverse the motor direction'))],
};

module.exports = definition;
Koenkk commented 8 months ago

Added!

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