[New device support]: TuYa 24GHz Human Presence Sensor TS0225_TZE200_2aaelwxk
Link
https://www.aliexpress.com/item/1005005909540714.html?gps-id=pcStoreNewArrivals&scm=1007.23409.271287.0&scm_id=1007.23409.271287.0&scm-url=1007.23409.271287.0&pvid=5175abbe-b739-46df-8ec7-c2c2a8f4c801&_t=gps-id:pcStoreNewArrivals,scm-url:1007.23409.271287.0,pvid:5175abbe-b739-46df-8ec7-c2c2a8f4c801,tpp_buckets:668%232846%238114%231999&pdp_npi=4%40dis%21MYR%21107.42%2175.21%21%21%2122.84%21%21%402101c59816919999368335919e0b96%2112000034805127430%21rec%21MY%21%21A&spm=a2g0o.store_pc_home.smartNewArrivals_2002856433204.1005005909540714
Database entry
{"id":67,"type":"Router","ieeeAddr":"0xa4c138f81e577a0c","nwkAddr":64592,"manufId":4417,"manufName":"_TZE200_2aaelwxk","powerSource":"DC Source","modelId":"TS0225","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280,57346,61184,60928,57344,1024],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"zclVersion":3}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b00257cc7da","zoneState":0}},"msIlluminanceMeasurement":{"attributes":{"measuredValue":32770}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":130,"stackVersion":2,"hwVersion":1,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1691999105436,"defaultSendRequestWhen":"immediate"}
Comments
Hi, just got this device from aliexpress recently and found that it is not supported in Z2M.
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 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 tzDatapoints = {
...tuya.tz.datapoints,
key: [...tuya.tz.datapoints.key, 'alarm', 'alarm_time', 'alarm_volume', 'type', 'volume', 'ringtone', 'duration','indicator',
'motion_detection_distance', 'motion_detection_sensitivity', 'small_motion_detection_distance',
'small_motion_detection_sensitivity', 'static_detection_distance', 'static_detection_sensitivity','motion_false_detection','fading_time',
'breathe_false_detection','working_mode']
}
const definition = {
fingerprint: tuya.fingerprint('TS0225', ['_TZE200_2aaelwxk']),
model: 'ZG-205Z/A',
vendor: 'TuYa',
description: '24GHz Human Presence Sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tzDatapoints],
exposes: [
e.presence(),
//e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('Presence'),
e.enum('human_motion_state', ea.STATE, ['none', 'large', 'small', 'breathe']).withDescription('Human Motion state'),
e.numeric('illuminance_value', ea.STATE).withDescription('Illuminance').withUnit('lux'),
e.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(28800).withValueStep(1).withUnit('s')
.withDescription('Presence keep time'),
e.numeric('motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.01).withUnit('m')
.withDescription('Motion detection distance'),
e.numeric('motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Motion detection sensitivity'),
e.numeric('small_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m')
.withDescription('Small motion detection distance'),
e.numeric('small_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Small motion detection sensitivity'),
e.numeric('static_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m')
.withDescription('Static detection distance'),
e.numeric('static_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Static detection sensitivity'),
e.numeric('motion_false_detection', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Motion false detection'),
//e.enum('working_mode', ea.STATE_SET, ['off', 'arm', 'alarm']).withDescription('Alarm mode'),
//e.enum('alarm_volume', ea.STATE_SET, ['mute', 'low', 'medium', 'high']).withDescription('Alarm volume'),
//e.numeric('alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(60).withValueStep(1).withUnit('m').withDescription('Alarm time'),
e.binary('indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('LED Indicator'),
e.binary('breathe_false_detection', ea.STATE_SET, 'ON', 'OFF').withDescription('Breathe False Detection'),
],
meta: {
tuyaDatapoints: [
//[1, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})],
[1, 'presence', tuya.valueConverter.trueFalse1],
[2, 'motion_detection_sensitivity', tuya.valueConverter.raw],
[3, 'mov_minimum_distance', tuya.valueConverter.raw],
[4, 'motion_detection_distance', tuya.valueConverter.divideBy100],
[101, 'human_motion_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'large': tuya.enum(1), 'small': tuya.enum(2), 'breathe': tuya.enum(3)})],
[102, 'fading_time', tuya.valueConverter.raw],
[103, 'motion_false_detection', tuya.valueConverter.raw],
[104, 'small_motion_detection_distance', tuya.valueConverter.divideBy100],
[105, 'small_motion_detection_sensitivity', tuya.valueConverter.raw],
[106, 'illuminance_value', tuya.valueConverter.raw],
[107, 'indicator', tuya.valueConverter.onOff],
[108, 'static_detection_distance', tuya.valueConverter.divideBy100],
[109, 'static_detection_sensitivity', tuya.valueConverter.raw],
[110, 'micro_minimum_distance', tuya.valueConverter.raw],
[111, 'motionless_minimum_distance', tuya.valueConverter.raw],
[112, 'reset_setting', tuya.valueConverter.raw],
[113, 'breathe_false_detection', tuya.valueConverter.raw],
[114, 'time', tuya.valueConverter.raw],
[115, 'alarm_time', tuya.valueConverter.raw],
[116, 'alarm_volume', tuya.valueConverterBasic.lookup({'low': tuya.enum(0), 'medium': tuya.enum(1), 'high': tuya.enum(2), 'mute': tuya.enum(3)})],
[117, 'working_mode', tuya.valueConverterBasic.lookup({'arm': tuya.enum(0), 'off': tuya.enum(1), 'alarm': tuya.enum(2), 'doorbell': tuya.enum(3)})],
[118, 'auto1', tuya.valueConverter.raw],
[119, 'auto2', tuya.valueConverter.raw],
[120, 'auto3', tuya.valueConverter.raw],
],
},
};
module.exports = definition;
Supported color modes
No response
Color temperature range
No response
Does this ext converter work? I yes, could you make a pull request?
use https://gist.github.com/Koenkk/79a20ea7e5eaf35749e157d0c31a1f9b for TS0225 and _TZE200_hl0ss9oa /sorry
Does this ext converter work? I yes, could you make a pull request?
@Koenkk it's working fine for and haven't seen any issues. I am not familiar with GitHub and am not sure about how to make a pull request.
I can confirm that Tuya DPs shown above are the correct ones for TS0225 _TZE200_2aaelwxk
@chewth91 I suppose that you have Tuya Zigbee GW, are there "Move Self Test", "Small Move Self Test" and "Breathe Self Test" functions in the Smart Life app? ( these could be potentially DP 118, 119, and 120).
I can confirm that Tuya DPs shown above are the correct ones for TS0225 _TZE200_2aaelwxk
@chewth91 I suppose that you have Tuya Zigbee GW, are there "Move Self Test", "Small Move Self Test" and "Breathe Self Test" functions in the Smart Life app? ( these could be potentially DP 118, 119, and 120).
Hi, i did not see self test in Smartlife. Which one do you think they refer to?
All TS0225 will be detected as supported now.
Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)
I have _TZE200_2aaelwxk with this converter it detects but doesn't show motion_state and illuminance_lux, the rest seems to work.
I am attaching debug logs etc.
{"id":41,"type":"Router","ieeeAddr":"0xa4c1388baef32d03","nwkAddr":34496,"manufId":4417,"manufName":"_TZE200_2aaelwxk","powerSource":"DC Source","modelId":"TS0225","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280,57346,61184,60928,57344,1024],"outClusterList":[],"clusters":{"genBasic":{"attributes":{}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0021b9518e","zoneState":0}},"msIlluminanceMeasurement":{"attributes":{"measuredValue":33545}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":130,"stackVersion":2,"hwVersion":1,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1692383344135,"defaultSendRequestWhen":"immediate"}
https://www.aliexpress.com/item/1005005904142527.html
@chewth91 thank you for the screenshots - obviously, this model does not have exactly the same functions as the other TS0225 radar :
I have _TZE200_2aaelwxk with this converter it detects but doesn't show motion_state and illuminance_lux, the rest seems to work.
I am attaching debug logs etc.
This happened to me before as well. Have you entered all the parameters?
~I've adapter the converter for the _TZE200_2aaelwxk, can you test if everything works https://gist.github.com/Koenkk/581a5f396d1ca9ac0ea9477b1017af36~
_TZE200_2aaelwxk has been added in https://github.com/Koenkk/zigbee-herdsman-converters/pull/6084 now
Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)
@Koenkk when will this sensor be fully operational and working in regular Z2M ? I tried this external converter for "TS0225 by _TZE200_2aaelwxk" version, and it shows, but none of the sliders seem to be working. Am I doing anything wrong? OR is there better way to work in ZHA perhaps? Have anyone made this sensor working? Thanks
ZHA:
Z2M:
Is this Zigbee2MQTT fully functional now?
Does anyone know what each of those settings mean and how to set them for best results? Thanks
@13717033460 since you added support for this, can you check the issue above?
I contacted the AliExpress seller that sent me the sensor and they have emailed me their converter. It is different. Can anybody check both and let me know which one is better and should be used?
Here is the link: https://doc.szalarm.com/zg-205Z/z2m.html
I also asked what each setting do, and here is their link with information: LINK: https://doc.szalarm.com/zg-205Z/en/
The external converter the AliExpress seller gave me shows several models loading it in Z2M I see some key differences:
- In Z2M does not show photo anymore, but only Zigbee logo.
- Presence state changed from "Presence/NONE, to AWAY/HOME" - similar to other older presence sensors
- IS no longer domain sensor, but binary_sensor instead (which in my opinion is better as it works as ON/OFF state) used elsewhere.
- Is now possible to change the type of the sensor, see image below.
There is missing a few states like:
- Breathe false detection - dont know what this do exactly...
- Motion false detection - not sure about it aither.
Those 2 are missing from the AliExpress seller converter, but are available from @chewth91
Which of the 2 converters is better? Thanks
Hello, you can add an external converter in this way first. This is the latest one.
------------------ Original ------------------ From: "Koenkk/zigbee2mqtt" @.>; Date: Tue, Aug 29, 2023 07:30 PM @.>; @.@.>; Subject: Re: [Koenkk/zigbee2mqtt] [New device support]: TuYa 24GHz Human Presence Sensor TS0225_TZE200_2aaelwxk (Issue #18612)
The external converter the AliExpress seller gave me shows model _TZE200_hl0ss9oa but I have _TZE200_2aaelwxk. After loading it in Z2M I see some key doffereces:
In Z2M does not show photo anymore, but only Zigbee logo.
Presence state changed from "Presence/NONE, to AWAY/HOME" - similar to other older presence sensors
IS no longer domain sensor, but binary_sensor instead (which in my opinion is better as it works as ON/OFF state) used elsewehere.
Is now possible to change the type of the sensor, see image below.
Can someone fix it so it dows work fine with both versions of the sensor - _TZE200_hl0ss9oa AND _TZE200_2aaelwxk. I am newbie so not sure how to do it, just trying to observe and report. :)
Thanks
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@13717033460 so the AliExpress seller converter is the latest and better?
sorry,I made a mistake. This is it. Please check the attachment.
------------------ Original ------------------ From: "Koenkk/zigbee2mqtt" @.>; Date: Tue, Aug 29, 2023 07:59 PM @.>; @.@.>; Subject: Re: [Koenkk/zigbee2mqtt] [New device support]: TuYa 24GHz Human Presence Sensor TS0225_TZE200_2aaelwxk (Issue #18612)
@13717033460 so the AliExpress seller converter is the latest and better?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Sorry, am I blind? I dont see attachment. Do you mean the converter that is posted by @chewth91 is the latest and best? OR the seller from AliExpress is newer and better? I feel stupid :( I am so sorry to ask again...
{ fingerprint: tuya.fingerprint('TS0225', ['_TZE200_2aaelwxk']), model: 'ZG-205Z-A', vendor: 'TuYa', description: 'Mini 24Ghz human presence sensor', fromZigbee: [tuya.fz.datapoints], toZigbee: [tzDatapoints], exposes: [ e.presence(), e.enum('motion_state', ea.STATE, ['none', 'large', 'small', 'static']).withDescription('Motion state'), e.illuminance_lux(), e.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(600).withValueStep(1).withUnit('s') .withDescription('Presence keep time'), e.numeric('large_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.01).withUnit('m') .withDescription('Large motion detection distance'), e.numeric('large_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') .withDescription('Large motion detection sensitivity'), e.numeric('small_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m') .withDescription('Small motion detection distance'), e.numeric('small_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') .withDescription('Small motion detection sensitivity'), e.numeric('static_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m') .withDescription('Static detection distance'), e.numeric('static_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') .withDescription('Static detection sensitivity'), e.binary('indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('LED indicator mode'), ], meta: { tuyaDatapoints: [ [1, 'presence', tuya.valueConverter.trueFalse1], [106, 'illuminance_lux', tuya.valueConverter.raw], [101, 'motion_state', tuya.valueConverterBasic.lookup({ 'none': tuya.enum(0), 'large': tuya.enum(1), 'small': tuya.enum(2), 'static': tuya.enum(3), })], [102, 'fading_time', tuya.valueConverter.raw], [4, 'large_motion_detection_distance', tuya.valueConverter.divideBy100], [2, 'large_motion_detection_sensitivity', tuya.valueConverter.raw], [104, 'small_motion_detection_distance', tuya.valueConverter.divideBy100], [105, 'small_motion_detection_sensitivity', tuya.valueConverter.raw], [108, 'static_detection_distance', tuya.valueConverter.divideBy100], [109, 'static_detection_sensitivity', tuya.valueConverter.raw], [107, 'indicator', tuya.valueConverter.onOff], ], }, },
------------------ Original ------------------ From: "Koenkk/zigbee2mqtt" @.>; Date: Tue, Aug 29, 2023 08:20 PM @.>; @.@.>; Subject: Re: [Koenkk/zigbee2mqtt] [New device support]: TuYa 24GHz Human Presence Sensor TS0225_TZE200_2aaelwxk (Issue #18612)
Sorry, am I blind? I dont see attachment. Do you mean the converter that is posted by @chewth91 is the latest and best? OR the seller from AliExpress is newer and better? I feel stupid :( I am so sorry to ask again...
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Thank you. Will try it now :) What is new/different than the AliExpress version, do you know? Does it work better or more accurate? Thanks
There are a lot of "  "  " are not from the code I assume? Is there a link to download the .js file so I know is the correct one? or RAW format of it?