From 0f94989aaa42313ef1e3a9930e27c88549db9b5f Mon Sep 17 00:00:00 2001 From: arteck <6681528+arteck@users.noreply.github.com> Date: Fri, 21 Jul 2023 08:08:54 +0200 Subject: [PATCH 1/4] new fingerprint forZY-M100-S fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa', '_TZE204_qasjif9e']), --- src/devices/tuya.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 924d516d53ac5..c8625314ddc44 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -4175,7 +4175,7 @@ const definitions: Definition[] = [ ], }, { - fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa']), + fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa', '_TZE204_qasjif9e']), model: 'ZY-M100-S', vendor: 'TuYa', description: 'Mini human breathe sensor', From 571324a7e55d8db7eb1281d7eacfeaa19f99c43a Mon Sep 17 00:00:00 2001 From: arteck <6681528+arteck@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:01:17 +0200 Subject: [PATCH 2/4] _TZE204_qasjif9e --- src/devices/tuya.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index c8625314ddc44..fe9be9ddf8eb0 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -4175,7 +4175,7 @@ const definitions: Definition[] = [ ], }, { - fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa', '_TZE204_qasjif9e']), + fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa']), model: 'ZY-M100-S', vendor: 'TuYa', description: 'Mini human breathe sensor', @@ -4208,6 +4208,40 @@ const definitions: Definition[] = [ ], }, }, + { + fingerprint: tuya.fingerprint('TS0601', ['_TZE204_qasjif9e']), + model: 'ZY-M100-S', + vendor: 'TuYa', + description: 'Mini Human Breathe Sensor', + fromZigbee: [tuya.fz.datapoints], + toZigbee: [tuya.tz.datapoints], + exposes: [ + e.illuminance_lux(), e.presence(), + e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('m'), + e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1) + .withDescription('sensitivity of the radar'), + e.numeric('minimum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15) + .withDescription('Minimum range').withUnit('m'), + e.numeric('maximum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15) + .withDescription('Maximum range').withUnit('m'), + e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1) + .withDescription('Detection delay').withUnit('s'), + e.numeric('fading_time', ea.STATE_SET).withValueMin(0.5).withValueMax(1500).withValueStep(1) + .withDescription('Fading time').withUnit('s'), + ], + meta: { + tuyaDatapoints: [ + [1, 'presence', tuya.valueConverter.trueFalse1], + [9, 'target_distance', tuya.valueConverter.divideBy100], + [104, 'illuminance_lux', tuya.valueConverter.raw], + [106, 'radar_sensitivity', tuya.valueConverter.raw], + [107, 'maximum_range', tuya.valueConverter.divideBy100], + [108, 'minimum_range', tuya.valueConverter.divideBy100], + [110, 'fading_time', tuya.valueConverter.divideBy10], + [111, 'detection_delay', tuya.valueConverter.divideBy10], + ], + }, + }, { fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}], model: 'JM-TRH-ZGB-V1', From 5d8f5fc633ef12998528f7d57ed403d530e5acfa Mon Sep 17 00:00:00 2001 From: koenkk Date: Thu, 27 Jul 2023 19:47:09 +0200 Subject: [PATCH 3/4] updates --- src/devices/tuya.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 077f6eb5bb739..ccf156016f9e7 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -4154,7 +4154,6 @@ const definitions: Definition[] = [ {modelID: 'TS0601', manufacturerName: '_TZE200_wukb7rhc'}, {modelID: 'TS0601', manufacturerName: '_TZE204_xsm7l9xa'}, {modelID: 'TS0601', manufacturerName: '_TZE204_ztc6ggyl'}, - {modelID: 'TS0601', manufacturerName: '_TZE204_qasjif9e'}, {modelID: 'TS0601', manufacturerName: '_TZE200_ztc6ggyl'}], model: 'TS0601_smart_human_presence_sensor_1', vendor: 'TuYa', @@ -4184,7 +4183,7 @@ const definitions: Definition[] = [ }, { fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa']), - model: 'ZY-M100-S', + model: 'ZY-M100-S_1', vendor: 'TuYa', description: 'Mini human breathe sensor', fromZigbee: [tuya.fz.datapoints], @@ -4218,9 +4217,9 @@ const definitions: Definition[] = [ }, { fingerprint: tuya.fingerprint('TS0601', ['_TZE204_qasjif9e']), - model: 'ZY-M100-S', + model: 'ZY-M100-S_2', vendor: 'TuYa', - description: 'Mini Human Breathe Sensor', + description: 'Mini human breathe sensor', fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], exposes: [ @@ -4249,7 +4248,7 @@ const definitions: Definition[] = [ [111, 'detection_delay', tuya.valueConverter.divideBy10], ], }, - }, + }, { fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}], model: 'JM-TRH-ZGB-V1', From 08a9d2e81f1012ef766b56aa9506d0bc8a1fa862 Mon Sep 17 00:00:00 2001 From: koenkk Date: Thu, 27 Jul 2023 19:48:28 +0200 Subject: [PATCH 4/4] updates --- src/devices/tuya.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index ccf156016f9e7..02b69090ec356 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -4241,11 +4241,11 @@ const definitions: Definition[] = [ [1, 'presence', tuya.valueConverter.trueFalse1], [9, 'target_distance', tuya.valueConverter.divideBy100], [104, 'illuminance_lux', tuya.valueConverter.raw], - [106, 'radar_sensitivity', tuya.valueConverter.raw], - [107, 'maximum_range', tuya.valueConverter.divideBy100], - [108, 'minimum_range', tuya.valueConverter.divideBy100], - [110, 'fading_time', tuya.valueConverter.divideBy10], - [111, 'detection_delay', tuya.valueConverter.divideBy10], + [2, 'radar_sensitivity', tuya.valueConverter.raw], + [4, 'maximum_range', tuya.valueConverter.divideBy100], + [3, 'minimum_range', tuya.valueConverter.divideBy100], + [102, 'fading_time', tuya.valueConverter.divideBy10], + [101, 'detection_delay', tuya.valueConverter.divideBy10], ], }, },