Koenkk / zigbee2mqtt

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

[New device support]: _TZ3000_yxwnmw6f model: TS002 #20255

Open kirush0280 opened 6 months ago

kirush0280 commented 6 months ago

Link

https://www.ozon.ru/product/2ch-zigbee-mini-smart-switch-releynyy-modul-podderzhka-2-pozitsionnogo-pereklyuchatelya-1138249909/

Database entry

{"id":27,"type":"Router","ieeeAddr":"0xa4c13819a2956243","nwkAddr":64817,"manufId":4417,"manufName":"_TZ3000_yxwnmw6f","powerSource":"Mains (single phase)","modelId":"TS0002","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId ":1,"devId":256,"inClusterList":[3,4,5,6,1794,2820,57344,57345,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"��\u0011-\u0012","65506":54,"65508":0,"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZ3000_yxwnmw6f","zclVersion":3,"appVersion":70,"modelId":"TS0002","powerSource":1}},"genOnOff":{"attributes":{"onOff":0,"onTime":0,"offWaitTime":0,"moesStartUpOnOff":0}},"manuSpecificBosch":{"attributes":{"53251":"AAAAAgAA"}},"manuSpecificTuya_3":{"attributes":{"53248":0,"53249":0,"53250":0,"53251":0,"53252":0,"53253":0,"switchType":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b0025792167","endpointID":1}],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":256,"inClusterList":[4,5,6],"outClusterList":[],"clusters":{"genOnOff":{"attributes":{"onOff":0,"onTime":0,"offWaitTime":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b0025792167","endpointID":1}],"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":{"configured":-1030697865},"lastSeen":1702818485823,"defaultSendRequestWhen":"immediate"}

Comments

Zigbee2MQTT: 1.34.0-dev Have no switch mode type settings. After use converter below, it's started to work right, but when I turn on/off on hardware switch, its not change in z2m (it's always off). I use Momentary mode. Debug: https://pastebin.com/gwVhYj9x image

External converter

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 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 e = exposes.presets;
const ea = exposes.access;
const globalStore = require('zigbee-herdsman-converters/lib/store');

const definition = {
    fingerprint: [{modelID: 'TS0002', manufacturerName: '_TZ3000_yxwnmw6f'}],
    model: 'TS0002_switch_module',
    vendor: 'TuYa',
    description: '2 gang switch module',
    extend: tuya.extend.switch({switchType: true, endpoints: ['l1', 'l2'] }),
    endpoint: (device) => {
        return {'l1': 1, 'l2': 2};
    },
    meta: {multiEndpoint: true},
    configure: async (device, coordinatorEndpoint, logger) => {
        await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
        await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
        await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
        },
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days