Koenkk / zigbee2mqtt

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

[New device support]: Tuya PIR Motion Sensor ZM-35ZH-Q TS0601 _TZE200_gjldowol #24085

Open dr-apple opened 2 months ago

dr-apple commented 2 months ago

Link

https://de.aliexpress.com/item/1005005769341971.html?spm=a2g0o.order_list.order_list_main.10.788d5c5fECwDX5&gatewayAdapt=glo2deu

Database entry

{"id":58,"type":"EndDevice","ieeeAddr":"0xa4c13845da857e68","nwkAddr":47598,"manufId":4417,"manufName":"_TZE200_gjldowol","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":12,"inClusterList":[0,61184],"outClusterList":[10,25],"clusters":{"genBasic":{"attributes":{"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":80,"stackVersion":1,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1727184411211}

Zigbee2MQTT version

1.40.1

Comments

It dosn't won't to work....

External definition

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE200_gjldowol',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;

What does/doesn't work with the external definition?

all,, the device have nothing

tanelkoth commented 1 month ago

I have the same problem. In the documentation it states that the model number is 'ZM-35H-Q'. Searching through the source code I found a motion sensor that has the same model TS0202. After some cut and paste work with this model and the new fingerprint the device shows up in the Zigbee configuration. However, it seems that nothing works. This is what the configuration currently looks like:

_zigbeeModel: ['TS0601'], fingerprint: tuya.fingerprint('TS0601', ['_TZE200_gjldowol']), model: 'ZM-35H-Q', vendor: 'TuYa', description: 'Motion sensor', fromZigbee: [fromZigbee_1.default.ias_occupancy_alarm_1, fromZigbee_1.default.battery, fromZigbee_1.default.ignore_basic_report, fromZigbee_1.default.ZM35HQ_attr, legacy.fromZigbee.ZM35HQ_battery], toZigbee: [toZigbee_1.default.ZM35HQ_attr], extend: [(0, modernExtend_1.quirkCheckinInterval)(15000)], exposes: [e.occupancy(), e.battery_low(), e.battery(), e.enum('sensitivity', ea.ALL, ['low', 'medium', 'high']).withDescription('PIR sensor sensitivity'), e.enum('keep_time', ea.ALL, [30, 60, 120]).withDescription('PIR keep time in seconds'), ], configure: tuya.configureMagicPacket, whiteLabel: [ tuya.whitelabel('Aubess', '40ZH-O', 'Motion sensor', ['_TZ3040msl6wxk9']), ],

Can you help in determining what is going wrong here? Kind regards, erwin

gp-pg commented 3 weeks ago

I have same problem too.

HarsiTomiii commented 3 weeks ago

same issue for me, leaving a comment for getting notified.

i don't know enough to make the definition myself, so i asked AI models, at one point it got connected and recognized, but nothing was exposed so it was useless.

vantus1987 commented 3 weeks ago

Good afternoon! Am I correct in understanding that there is currently no fully-functional support for this device?

tanelkoth commented 3 weeks ago

Good afternoon too. Yes, I think that you are correct. Currently this device is not working! Regards, erwin

vantus1987 commented 3 weeks ago

Look, through the tuya gateway I found the starting points {"1":"PIR state","4":"Battery level","9":"PIR Sensitivity","12":"Illuminance value","101":"Interval Time","102":"Pir Delay"}

vantus1987 commented 3 weeks ago

Now I have made an external converter Only motion detection and illumination in lux is working. Unfortunately, the detection delay is not regulated ( It's better than nothing, maybe you can edit something?

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

const definition = { // Since a lot of Tuya devices use the same modelID, but use different datapoints // it's necessary to provide a fingerprint instead of a zigbeeModel fingerprint: [ { // The model ID from: Device with modelID 'TS0601' is not supported // You may need to add \u0000 at the end of the name in some cases modelID: 'TS0601', // The manufacturer name from: Device with modelID 'TS0601' is not supported. manufacturerName: '_TZE200_gjldowol', }, ], model: 'TZE200_gjldowol', vendor: 'Tuya', description: 'Luminance motion sensor', fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime' configure: tuya.configureMagicPacket, exposes: [ e.occupancy(), e.illuminance().withUnit('lx'), e.battery(), e .enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']) .withDescription('PIR sensor sensitivity (refresh and update only while active)'), e .enum('keep_time', ea.STATE_SET, ['10', '30', '60', '120']) .withDescription('PIR keep time in seconds (refresh and update only while active)'), e .numeric('illuminance_interval', ea.STATE_SET) .withValueMin(1) .withValueMax(720) .withValueStep(1) .withUnit('minutes') .withDescription('Brightness acquisition interval (refresh and update only while active)'), ], meta: { // All datapoints go in here tuyaDatapoints: [ [1, 'occupancy', tuya.valueConverter.trueFalse0], [4, 'battery', tuya.valueConverter.raw], [9, 'sensitivity', tuya.valueConverterBasic.lookup({low: tuya.enum(0), medium: tuya.enum(1), high: tuya.enum(2)})], [101, 'keep_time', tuya.valueConverterBasic.lookup({'10': tuya.enum(0), '30': tuya.enum(1), '60': tuya.enum(2), '120': tuya.enum(3)})], [12, 'illuminance', tuya.valueConverter.raw], [102, 'illuminance_interval', tuya.valueConverter.raw], ], }, extend: [ // A preferred new way of extending functionality. ], };

module.exports = definition;

vantus1987 commented 3 weeks ago

So, it happened and it turned out, it's just the first time I'm doing this Dedicated to all who do not mind the time for all sorts of nonsense)) The 2 in 1 motion + illumination sensor, which has the IH012-RT01 model written on the box, and the ZM-35ZH-Q instruction, but in fact is not supported in z2m and is defined as TZE200 gjldowol, sketched an external converter, everything seems to work take it away TZE200_gjldowol.txt

dr-apple commented 3 weeks ago

You are the best! It works perfectly!!! Thank you very much

HarsiTomiii commented 3 weeks ago

So, it happened and it turned out, it's just the first time I'm doing this Dedicated to all who do not mind the time for all sorts of nonsense)) The 2 in 1 motion + illumination sensor, which has the IH012-RT01 model written on the box, and the ZM-35ZH-Q instruction, but in fact is not supported in z2m and is defined as TZE200 gjldowol, sketched an external converter, everything seems to work take it away TZE200_gjldowol.txt

Awesome! thank you @vantus1987 !