-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZM-RT201 PIR Motion Sensor #7564
Comments
I also received this device today. The box says ZM-RT-201, the instructions are ZM-35ZH-Q. And he also did not want to connect - he writes that the device is unsupported. I read on this forum that some devices throw out the modelid and manufacturerName too quickly and the zigbee2mqtt does not have time to receive this data. But after numerous attempts to connect the device, one day instead of "undefined" I saw TS0202 and _TYZB01_dl7cejts. Now trying to make a converter. |
Hello, I received these sensors ZM-RT201 today but I can't get it to learn my zigbee. How can I do this? Am new and can not code. I have Proxmox and IoBroker running as a VM and have the CC26X2R1. All zigbee devices work without problems. |
I get this message when the motion sensor is triggered:
But I don't have enough knowledge to write a converter, and even with a timer. |
I also have this item. I hope it can be included so I can use it. |
it is not a complete converter, but it is enough for the device to work.
|
Can you try with: 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 e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts'}],
zigbeeModel: ['TS0202'],
model: 'TS0202',
vendor: 'TuYa',
description: 'Motion sensor',
fromZigbee: [fz.ias_occupancy_alarm_1],
toZigbee: [],
exposes: [e.occupancy(), e.battery_low(), e.tamper()],
}; If the modelID of your device is |
Unfortunately, the number of attempts to connect and get the correct modelID has reached 50-60. The ias_occupancy_alarm_1 converter has cluster: 'ssIasZone', and type: 'commandStatusChangeNotification'. But I'll try again. |
@bootuz-dinamon could you provide the herdsman debug log when pairing the device? See https://www.zigbee2mqtt.io/information/debug.html#zigbee-herdsman-debug-logging on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files. |
I always get these messages in the log:
|
The one from bootuz-dinamon works for me! The only thing that is not working is the battery level but for this moment I am happy. |
Hey Marcel, |
Well I have only nailed it after very much searching and I am not sure anymore what I exactly did at the beginning. So I am sorry I cannot help you.... |
https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html This is an instruction for adding external converters. |
works for me. I was also not able to fully interview the PIR on 1.8.3 dev even on very close distance. |
Thanks anyway. I'll have to keep looking then.
I have already looked at this but unfortunately did not understand it. When I get off work, I'll have another look at it. I just do not know how to integrate the code with the CC26X2R1 what is plugged with usb on NUC Proxmox. |
Added the device. |
@Koenkk, what can i do, when the device sends model undefined? |
@Schnittcher if you see TS0202 _TYZB01_dl7cejts the model ID isn't undefined since that is the model, or do you mean something else? |
I have repaired the device. So i think this is a problem with zigbee2mqtt. I have a debug: https://pastebin.com/xZFnh7gP Can you help? |
@Schnittcher the log doesn't reveal much (device doesn't event connect). Can you make a sniff of the pairing attempt? https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html |
very interesting, now the device has been found again! I will try your new version. I used docker is this already online? |
Will be available in 1 hour from now (use latest-dev tag) |
Yes this i know.
When i have this problem again, can i asked you again?
Koen Kanters ***@***.***> schrieb am Di. 25. Mai 2021 um
19:40:
… Will be available in 1 hour from now (use latest-dev tag)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7564 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZGXCM4GGRHEAJTCF5N5WDTPPOHHANCNFSM45K42AWQ>
.
|
Already with a battery (you need to remove the battery and insert it back).
|
@bootuz-dinamon, with your code, the pir works. But the interview of this device failed again. |
options.occupancy_timeout : 10; // occupancy delay in seconds |
@Koenkk Hey Koen, if you have time, would it help if I send a ZM-CG206 and ZM-RT201 towards you? |
Hi, I'm trying to do the same as other posters here but have fallen over with an error message that I can't see mentioned in this post. Apologies if this is a really stupid question but I haven't had the chance (or capability) to dig into any of the zigbee-herdsman stuff that does the heavy lifting.
I can obviously figure out how to post some log files but it feels like I've done something pretty basic wrong. Any pointers would be appreciated. Thanks, Paul |
You can delete this string.
|
Thanks @bootuz-dinamon, that's impressive service! It's now completed startup and the device is recognised with link quality and battery. Thanks, Paul |
Must work!
|
My version of same converter for ioBroker zigbee module (not zigbee2mqtt, but zigbee-herdsman-converters) // Converter for ZM-RT201 ZM-35ZH-Q with battery now.
// https://www.youtube.com/channel/UCJRaKbgv8u1O4OwG-0D3uRw
//
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 extend = require("zigbee-herdsman-converters/lib/extend");
const globalStore = require("zigbee-herdsman-converters/lib/store");
const e = exposes.presets;
const ea = exposes.access;
const { setTimeout, clearTimeout } = require("timers");
const motionSensorDetector = {
cluster: "ssIasZone",
type: "attributeReport",
convert: (model, msg, publish, options, meta) => {
const payload = {
tamper: (msg.data.zoneStatus & (1 << 2)) > 0,
battery_low: (msg.data.zoneStatus & (1 << 3)) > 0,
};
if (msg.data.zoneStatus !== 1) {
// In case of 0 no occupancy is reported.
// https://github.com/Koenkk/zigbee2mqtt/issues/467
return payload;
}
// The occupancy sensor only sends a message when motion detected.
// Therefore we need to publish the no_motion detected by ourselves.
const timeout =
options && options.hasOwnProperty("occupancy_timeout")
? options.occupancy_timeout
: 300; // occupancy delay in seconds
// Stop existing timers because motion is detected and set a new one.
globalStore
.getValue(msg.endpoint, "timers", [])
.forEach((t) => clearTimeout(t));
globalStore.putValue(msg.endpoint, "timers", []);
//
if (timeout !== 0) {
const timer = setTimeout(() => {
payload.occupancy = false;
publish(payload);
// publish({ occupancy: false });
}, timeout * 1000);
globalStore.getValue(msg.endpoint, "timers").push(timer);
}
// No occupancy since
if (options && options.no_occupancy_since) {
options.no_occupancy_since.forEach((since) => {
const timer = setTimeout(() => {
payload.no_occupancy_since = since;
publish(payload);
// publish({ no_occupancy_since: since });
}, since * 1000);
globalStore.getValue(msg.endpoint, "timers").push(timer);
});
}
if (options && options.no_occupancy_since) {
payload.occupancy = true;
payload.no_occupancy_since = 0;
} else {
payload.occupancy = true;
// delete payload.no_occupancy_since;
}
return payload;
},
};
const definition = {
fingerprint: [{ modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts' },
{ ieee_address: "0x00124b000" }], // WARNING! Change this ieee_address for yours ieee_address!!!!
zigbeeModel: ["TS0202"],
model: "ZM-RT201",
vendor: "TuYa",
description: "Motion sensor",
fromZigbee: [
motionSensorDetector,
fz.battery,
// fz.ignore_basic_report,
],
toZigbee: [],
exposes: [e.occupancy(), e.battery_low(), e.battery()],
};
module.exports = definition; |
I solved the remaining problem without having to get into the guts of herdsman (for today at least :-)). Thanks @TrurlMcByte and @bootuz-dinamon. zigbee2mqtt log was showing that zone status (occupancy) was getting through. It looks like it was just falling over on the receive event, not knowing what to do with setTimeout.
|
Hello friend sorry for my delay...
Actually i am using a converter and works well... without “exclamation”...
For me everything is ok....
Enviado do meu iPhone
Em 31 de mai. de 2021, à(s) 14:10, Koen Kanters ***@***.***> escreveu:
@freitas666<https://github.com/freitas666> what do you get without the external converter?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7564 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAQ7DLVVH6ZOFOTCQ6BZHUDTQO7ITANCNFSM45K42AWQ>.
|
Which converter? Thanks! |
Thanks guys the motion sensor is finally working. I made some minor changes to the driver here. |
Hello guys i have one doubt... Actually i am using a external converter for my sensor and its works fine... Someone can help me? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Having a similar, but using ZHA integration with Home Assistant:
|
I am still waiting for an out of the box solution for this hardware. This issue should be reopen. |
Try update to Z2M 1.21.1 and re-pair the sensor. Mine is work without external converter. |
running 1.21.1 stable (not tried Edge yet) the ZM-RT201 is detected, fails the interview, but stays on the list of devices, If i make movements above the sensor i can see the debug logs generating "Received message from unsupported device with Zigbee model 'undefined' and manufacturer name 'undefined'". I havent played with the external converters yet (Very new to this) so agree with guilhermeaiolfi, should be reopened |
I take it back, it just showed up properly... :) edit: was recognized as a tuya model TS0202 and was not working |
I've installed the 1.21.1-1 stable and it was recognized as TS0202 and it's not working. I've tried installing, uninstalling, removing the devices and tries again. Nothing works. Can somebody, please, confirm it should work in 1.21.1 without any converter? |
It's not working for me. Neither with or without converter. Neither 1.21.1 or Edge version. |
I have 4 of these. somehow one of them is working but the others are failing interview and giving the same unsupported device errors |
I have 2 of these, 1 works just fine, the other one failing interviewing. I am looking forward for resolution on that? |
Thank you @jchurchward this external driver works for me. (battery, battery_low, occupancy, linkquality) @Koenkk Any chance this will get supported? |
Thanks, it worked for 4 sensors ZM-35ZH-Q with cc2531 with the code: `// Converter for ZM-RT201 ZM-35ZH-Q with battery now. const motionSensorDetector = {
}, const definition = { module.exports = definition; THANK YOU AGAIN |
Hello. I have these Motion sensors. https://nl.aliexpress.com/item/1005003518834102.html?spm=a2g0s.9042311.0.0.51bf4c4d1NQdQc. I would like to get these work with zigbee2mqtt. I saw it to late that the seller say that they not work with external zigbee bridge :(. I created a js file but no occupancy. It says N/A. The model on the box is ZM-RT20 |
It works with Zigbee2mqtt Edge on test rbpi. Now i'm going to try to upgrade to Edge. |
Well.. its strange i have 8 sensors…
6 works with converter… 2 works but with exclamation!
Someone have idea about what it mean?
Tks
Enviado do meu iPhone
Em 14 de dez. de 2021, à(s) 22:04, thieskenl ***@***.***> escreveu:
It works with Zigbee2mqtt Edge on test rbpi. Now i'm going to try to upgrade to Edge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7564 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAQ7DLSJTWCCRVR2QAQGUPTUQ7SSDANCNFSM45K42AWQ>.
|
Information about the device + link
https://www.aliexpress.com/item/1005002420495341.html?spm=a2g0s.9042311.0.0.248d4c4dEHPA1V
data/database.db entry of the device
{"id":5,"type":"EndDevice","ieeeAddr":"0x00124b0005ad88b1","nwkAddr":52292,"manufId":0,"epList":[1],"endpoints":{"1":{"epId":1,"inClusterList":[],"outClusterList":[],"clusters":{"genPowerCfg":{"attributes":{"batteryVoltage":30,"batteryPercentageRemaining":160}},"ssIasZone":{"attributes":{"zoneStatus":0}}},"binds":[],"configuredReportings":[],"meta":{}}},"interviewCompleted":false,"meta":{},"lastSeen":1621707189864}
The text was updated successfully, but these errors were encountered: