zigbee2mqtt
zigbee2mqtt copied to clipboard
[New device support]: ZG-204ZM similar to ZG-204ZL
Link
https://www.aliexpress.com/item/1005006492967626.html
Database entry
{"id":37,"type":"EndDevice","ieeeAddr":"0xa4c13835d225271e","nwkAddr":21969,"manufId":4098,"manufName":"_TZE200_2aaelwxk","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280,1,1024],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"TS0601","manufacturerName":"_TZE200_2aaelwxk"}},"ssIasZone":{"attributes":{"iasCieAddr":"0xe0798dfffed3b030","zoneState":0}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":26}},"msIlluminanceMeasurement":{"attributes":{"measuredValue":32546}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":144,"stackVersion":2,"hwVersion":1,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1711218578185}
Comments
I ordered both variants, the PIR Infrared variant and the 24GHz radar variant from the AliExpress link.
Common manual for both specifies ZG-204ZS/ZG-204ZM as model names. And, that only ZG-204ZM has 24GHz sensor.
I disassembled both, and both of them have written ZG-204ZS on the PCB, but the 24GHz variant has got extra circuitry attached to it, looks like the 24GHz radar.
The PIR Infrared variant (ZG-204ZS) is detected as ZG-204ZL in Zigbee2MQTT.
The 24GHz radar variant (ZG-204ZM) is not yet supported by Zigbee2MQTT.
Now, the confusing part
At first, I tried to base definition on ZL-204ZL - https://github.com/Koenkk/zigbee-herdsman-converters/blob/14dffaa06511876d096aa72e669df4b032f4cf33/src/devices/tuya.ts#L5627-L5655, and nothing worked, not even illuminance report.
Then, I tried to base definition ZG-205Z/A (_TZE200_2aaelwxk), and illuminance and motion state started to work.
It works somewhat okay-ish with two obvious caveats:
- the presence attribute is always Nulls, even when motion state is large or small,
- the motion state is always large (something detected) or small, but based on the definition file, there should be also none and medium values.
I am also not sure, if configuration options have any effect.
External definition
const {} = require('zigbee-herdsman-converters/lib/modernExtend');
// Add the lines below
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 {} = 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'],
model: 'TS0601',
vendor: 'TuYa',
description: 'Luminance motion sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.presence(), e.illuminance().withUnit('lx'),
e.numeric('large_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Motion detection sensitivity'),
e.numeric('large_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.01).withUnit('m')
.withDescription('Motion detection distance'),
e.enum('motion_state', ea.STATE, ['none', 'small', 'medium', 'large']).withDescription('State of the motion'),
e.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(28800).withValueStep(1).withUnit('s')
.withDescription('For how much time presence should stay true after detecting it'),
e.numeric('medium_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m')
.withDescription('Medium motion detection distance'),
e.numeric('medium_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Medium motion detection sensitivity'),
e.binary('indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('LED Indicator'),
e.numeric('small_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m')
.withDescription('Small detection distance'),
e.numeric('small_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x')
.withDescription('Small detection sensitivity'),
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse1],
[2, 'large_motion_detection_sensitivity', tuya.valueConverter.raw],
[4, 'large_motion_detection_distance', tuya.valueConverter.divideBy100],
[101, 'motion_state', tuya.valueConverterBasic.lookup(
{'none': tuya.enum(0), 'large': tuya.enum(1), 'medium': tuya.enum(2), 'small': tuya.enum(3)})],
[102, 'fading_time', tuya.valueConverter.raw],
[104, 'medium_motion_detection_distance', tuya.valueConverter.divideBy100],
[105, 'medium_motion_detection_sensitivity', tuya.valueConverter.raw],
[106, 'illuminance', tuya.valueConverter.raw],
[107, 'indicator', tuya.valueConverter.onOff],
[108, 'small_detection_distance', tuya.valueConverter.divideBy100],
[109, 'small_detection_sensitivity', tuya.valueConverter.raw],
// Not exposed DPs/untested
// [103, 'motion_false_detection', tuya.valueConverter.raw],
// [113, 'breathe_false_detection', tuya.valueConverter.raw],
// [3, 'mov_minimum_distance', tuya.valueConverter.raw],
// [110, 'micro_minimum_distance', tuya.valueConverter.raw],
// [111, 'motionless_minimum_distance', tuya.valueConverter.raw],
// [112, 'reset_setting', 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;
I also got this to somehow work for ZG-204ZM, but i dont see any entitities about breathing, do you? I think in Tuya app this is exposed. @Koenkk do you know if this is supported in the converter?
I found this one which is apparently provided by the seller.
https://doc.szalarm.com/zg-205ZL/cntop_zigbee_sensor.js
Breathing is also not supported by the converters in https://doc.szalarm.com/zg-205ZL/cntop_zigbee_sensor.js
You are right, i can see its not exposed DPs/untested. Hope it will get support in future. Thanks for your reply.
@gijsh070 could you share your data/database.db entry of this device?
I got a .js file from the seller but it seems like its the same as i send before. I bought 2 of these devices. @Koenkk is this the info you meant? Im quite new to mqtt so let me know if provided wrong info.
From db:
{"id":59,"type":"EndDevice","ieeeAddr":"0xa4c138a3a5310ec8","nwkAddr":21396,"manufId":4742,"manufName":"_TZE200_2aaelwxk","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280,1,1024],"outClusterList":[],"clusters":{"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":30}},"msIlluminanceMeasurement":{"attributes":{"measuredValue":1}},"genBasic":{"attributes":{"modelId":"TS0601","manufacturerName":"_TZE200_2aaelwxk","powerSource":3,"zclVersion":3,"appVersion":144,"stackVersion":2,"hwVersion":1,"swBuildId":"0122052017"}},"ssIasZone":{"attributes":{"iasCieAddr":"0xe0798dfffeb3d1da","zoneState":0}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":144,"stackVersion":2,"hwVersion":1,"swBuildId":"0122052017","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1711648444843}
Zigbee2MQTT current version: 1.36.1-1 Currently "Motion state" only accepts "large" or "none" states. "small" and "static" are missing. “Fading time” does not seem to be adjustable. Illuminance requires approximately -99% adjustment.
Zigbee2MQTT current version: 1.36.1-1 Currently "Motion state" only accepts "large" or "none" states. "small" and "static" are missing. “Fading time” does not seem to be adjustable. Illuminance requires approximately -99% adjustment.
Same with 1.37.1 - “Fading time” is always ~1sec making device quite useless. Also doesn't seem any other sliders have any effect. Motion only goes from 'large' to 'none', never 'static'.
_TZE200_2aaelwxk / fw: 0122052017
I have this device reported as _TZE200_kb5noeto and ZG-204ZM with FW 0122052017 It is identified by Z2M [1.37.1] but I could not find a working setting to make it useful. So far a useless device.
@gargamelonly I have this device with the exact same values and FW and it is working as expected (except the issues mentioned in this thread). I changed the sensitivity to 10 (not sure if that makes any difference), and it detects motion using the PIR, and then it keeps the presence variable as ON while the presence is detected by the mmwave sensor, aren´t you experiencing the same behaviour?
@heisenberg2980 Set "Static detection sensitivity" to 10 (max), does not help. What do you have for "Fading time" and "Static detection distance" ?
@gargamelonly I am not sure if changing any of the settings does anything at the moment, but I didn´t change the other values so I have the default settings (fading time = 30s, static detection distance = 6m)
error always Presence True status, I tried setting the sensitivity to the lowest, even though I moved out of the room, and the room does not have any devices causing interference, does anyone have a way to fix it?
Hi
I have the same device as @gargamelonly , and it mostly works as expected ( almost but not fully ). However, I noticed that if I don't move for 10 seconds with the fading time set to 10 seconds, the state changes from "large" to "static." Until here, it's the expected behavior.
But a few seconds later, it shifts to "none."
I thought the device would stay at "static" until I left the room, but that's not the case. So, for me, it behaves more like a regular detection sensor rather than a presence sensor. :(
Has anyone else experienced this issue with _TZE200_kb5noeto (FW: 0122052017)?
EDIT: I discovered that if you set the fading time to less than 30 seconds, it switches to 'none' even if you're still here (not moving). Setting it to 30 seconds keeps it static even if I don't move for 2 minutes. Problem solved but maybe it should added into the documentation of the device: https://www.zigbee2mqtt.io/devices/ZG-204ZM.html
However, I noticed another issue: the device sends one message every second, sometimes two messages in the same second. This spams the network and drains the battery quickly. How can I limit the messages from the device to avoid spam?
Exactly the same behavior here. Something is wrong with it (_TZE200_kb5noeto (FW: 0122052017)). Can't solve it.
I have this device, and apart from some small issues where the device started reporting motion when there was nobody around, I was pretty happy as these small issues seem to be fixed just moving the sensor to a slightly different position. I installed this sensor in the cloakroom, thinking it would be the perfect replacement for my aqara motion sensor, but unfortunately after couple of days working without any issue, the sensor has started reporting false movements all the time. I am not sure what the reason could be, but it is pretty random for me as I have not touched the position of the sensor and it is pointing at the same exact spot it was pointing before.
Seems _TZE200_2aaelwxk has different set of issues compared to _TZE200_kb5noeto, even tho they both have same fw
Is there any way to replace _TZE200_kb5noeto to _TZE200_2aaelwxk? In tuya application, the code _TZE200_2aaelwxk has version 2.1 and _TZE200_kb5noeto has version 2.1.1
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour?
Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM
Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour?
Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM
Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
I know the product through smarthomescene, it seems like smarthomescene received money to advertise a trash product
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour?
Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM
Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
Same issues - no matter which setting you tweak it detects presence after you install the batteries and no amount of tweaking of settings get it to clear the presence.
Motion_State changes between "Large" & "Static" but never goes to "None" which is suspect is why occupancy value remains "1" and not changes to "0"
I opened mine and 1 visual difference from pictures on SmartHomeScence.com is that mine shows V2.1 versus the a date code on the pictures
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour? Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
I know the product through smarthomescene, it seems like smarthomescene received money to advertise a trash product
well, smarthomescene article mentions _TZE200_2aaelwxk
and we are dealing with _TZE200_kb5noeto
, not sure i will blame him for this!
I used the link in the article to purchase and received a different unit from the review, so it is more on the AliExpress seller. It is disappointing but can only put it down as a learning experience at this point.
Seems _TZE200_2aaelwxk has different set of issues compared to _TZE200_kb5noeto, even tho they both have same fw
Wait a minute, the same exact device comes from two different manufacturers, and they even have different issues? this is getting interesting, and much more complex to debug/fix!
Basically people will always have to check the manufacturer when they open or review an issue for this device, as it might not apply to the other manufacturer.
In my case, with a _TZE200_kb5noeto, the device is reporting presence 100% of the time, so it is pretty useless at the moment, hoping that we are able to fix it as some point, as the device itself looks really promissing
I bought using all the links on AliExpress, they were all defective and useless
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour? Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
I know the product through smarthomescene, it seems like smarthomescene received money to advertise a trash product
well, smarthomescene article mentions
_TZE200_2aaelwxk
and we are dealing with_TZE200_kb5noeto
, not sure i will blame him for this!
Hey there, I've been testing the device and it stays "Presence: True" and "Motion state: large" all the time no matter the parameters (currently 35s, 5.5m and 10x). I tried restarting the device and re-paring, no changes. Is the device broken and is someone else having the same behaviour? Device description: Zigbee Model: TS0601 Zigbee Manufacturer: _TZE200_kb5noeto Firmware version: 0122052017 Model: ZG-204ZM Update: I have recieved another ZG-204ZM from another seller and this one seems to work. I haven't tested it yet to confirm if it really works or if it is just changing states unlike the first one.
I know the product through smarthomescene, it seems like smarthomescene received money to advertise a trash product
well, smarthomescene article mentions
_TZE200_2aaelwxk
and we are dealing with_TZE200_kb5noeto
, not sure i will blame him for this!
I bought using all the links on AliExpress, they were all defective and useless
I have 9 of this sensors - 8 are _TZE200_kb5noeto and 1 is _TZE200_2aaelwxk. For about 2 weeks I had problem with 2 of _TZE200_kb5noeto. It keeps showing presence. But I found that for one it was enough to just took batteries out for minute and it started working. For second I had to repair it and point to place where there is no movement to got to state presence false. And it started to work now. But sometimes it works for one day, or for hour. I don't think that there is hardware issue here, but I think that there must be something with communication.
Good to know; Mine also shows presence true and false (kb5noeto) but seems very hit and miss regarding distance / fade time / etc. Only way to get something useful from this would be to compare with the Tuya zigbee hub imo
Op za 1 jun 2024 om 11:32 schreef Koterak @.***>:
I have 9 of this sensors - 8 are _TZE200_kb5noeto and 1 is _TZE200_2aaelwxk. For about 2 weeks I had problem with 2 of _TZE200_kb5noeto. It keeps showing presence. But I found that for one it was enough to just took batteries out for minute and it started working. For second I had to repair it and point to place where there is no movement to got to state presence false. And it started to work now. But sometimes it works for one day, or for hour. I don't think that there is hardware issue here, but I think that there must be something with communication.
— Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/21919#issuecomment-2143379919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDLMD4AS4FEA5ZCWJD7P7TZFGIMDAVCNFSM6AAAAABFE274JWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGM3TSOJRHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I have 2 of the _TZE200_kb5noeto The issue I have is that i get a lot of false negatives (I am there, but the sensor detects 'none' as motion state, and goes to the 'away' state for presence) which makes it unreliable as a presence detector. PIR works fine and then the initial large/static as well . I have tried tweaking different settings, and release 1.38 introduced 2 new ones. the motion detection sensitivity seems to make a bit of a difference, but not sure yet (release was an hour ago :)) and for the detection mode (also new) I have filed a bug report.
The device seems to hold a lot of promise (batteries/mmwave/good adjustability/cheap) but fails to deliver so far. I hope for better integration/firmware update, whatever makes it work :)
The device works perfectly fine with the Tuya app using a Tuya Zigbee gateway. However, I encountered the same issues mentioned by others. I noticed that setting 'Static detection sensitivity' to 0 allows 'Presence' detection to work normally. I hope someone figures out a solution soon because I bought six of them from AliExpress.
With latest Z2M 1.38.0-1 this device has 2 new parameters but one seems to be wrongly setup (see below error)
Yees, I already opened second report - there is wrong letter - "Dadar" instead of "Radar"
niedz., 2 cze 2024 o 16:40 papperone @.***> napisał(a):
With latest Z2M 1.38.0-1 this device has 2 new parameters but one seems to be wrongly setup (see below error) immagine.png (view on web) https://github.com/Koenkk/zigbee2mqtt/assets/28104633/f926efde-ca41-404f-a078-e4940fc1f9a3
— Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/21919#issuecomment-2143882573, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOZYCBJYUQ4OXERUVTOGILZFMVHFAVCNFSM6AAAAABFE274JWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTHA4DENJXGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>