-
-
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
[New device support]: Smoke detector Tuya Zigbee TS0601 #15349
Comments
Is anything logged int he debug log when triggering the sensor with smoke? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
this report? Debug 2022-12-05 10:44:38Received Zigbee message from 'Датчик дыма кухня', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":1,"dp":101}],"seq":768}' from endpoint 1 with groupID 0 |
Can you try with this 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 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 definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ntcy3xu1', '_TZE200_m9skfctm']),
model: 'TS0601_smoke_1',
vendor: 'TuYa',
description: 'Smoke sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [e.smoke(), e.tamper(), e.battery_low()],
meta: {
tuyaDatapoints: [
[1, 'smoke', tuya.valueConverter.true0ElseFalse],
[4, 'tamper', tuya.valueConverter.raw],
[14, 'battery_low', tuya.valueConverter.true0ElseFalse],
],
},
};
module.exports = definition; |
Thanks a lot!!! |
the report is like this: Info 2022-12-07 10:38:19MQTT publish: topic 'zigbee2mqtt/Датчик дыма кухня', payload '{"battery_low":false,"fault_alarm":"0","linkquality":188,"self_test":true,"smoke":false,"tamper":null}' |
I don't know what these datapoints mean, to figure this out see: https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html |
Made a new converter. I get all the necessary information from the sensor. |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const definition = {
}; module.exports = definition; |
Debug 2022-12-17 18:07:53Received Zigbee message from '0xa4c13879b8a471c2', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":1,"dp":101}],"seq":2560}' from endpoint 1 with groupID 0 |
|
without it, it does not display the CO level. with it displays an almost exact value |
Try adding the following to
|
MOES smoke detector signature TS0601_TZE200_dnz6yvl2 works with following converter definition
Note: following DPs are still not handled #2 could the be % of smoke but more test should be done to make sure about it.
|
@fulup-bzh thanks, added |
I unfortunately have no simple way to test if this device provides 2 or 3 battery states. I checked within tuya.js and all tuya 'battery_low' seems to be mapped on true0ElseFalse. Nevertheless you still might be right :) |
Hi all, I've got three _TZE200_m9skfctm - however I've ended up with quite a different converter, as follows, to get mine to work:
I used the Tuya gateway to find out the datapoints. 2 is actually the PPM level, which I don't believe to be CO/CO2 as it's a photoelectric sensor. As such, I've added a custom smoke_level for this, but I am no expert in smoke alarms so might have mislabelled this. I am a little concerned it's so different to the original though, presumably there aren't multiple models with the same manufacturerName..? |
@Jonno12345 looks good to me, can you make a PR? |
Hello, I also have _TZE200_m9skfctm and have used "my own" converter but tried to change to this one. The "test" didn report anything with tuya.valueConverter.true0ElseFalse I have to use tuya.valueConverter.raw. And my "smoke" value is 1 when no smoke and 0 when smoke is detected, can I get it to show Clear/detected instead? Or are there more models with the same name out there? |
Was that using my converter? I'm concerned there are two versions of this as my converter is really different to the original posted.
|
Yes I tried with this one: const exposes = require('zigbee-herdsman-converters/lib/exposes'); const definition = { module.exports = definition; and before I have used this one: const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const definition = { module.exports = definition; but this is my first time trying to make a converter since there was no official so I dont know whats wrong and not, but atleast the test button only went from N/A to false when I tried yours. So I changed it to tuya.valueConverter.raw on the test button and it now works on true/false. I also made/translated the datapoints from the info I got my hands on, maybe it makes any sense? |
Odd, your mappings look the same as mine. Not at my house to test right now, but I'm surprised it doesn't work with my converter if that's the data points you have as it's identical. What isn't working sorry? 1 when no smoke and 0 with smoke is correct and should be the same as my converter |
Yes, i tried the Test button on the smoke detector and it did not change from false to true in the output. (With [101,'test', tuya.valueConverter.true0ElseFalse]) I must use [101,'test', tuya.valueConverter.raw] for it to work. Strange |
I tried with smoke now, and the smoke detection works good, thanks. I dont know how to test dp:11 (tamper) or fault but I guess that's a value thats not needed to check. |
So yeah, I've just confirmed this. Using 'raw' converts to a true/false value automatically based on the datapoint type, which in this case is a bool, so 'raw' works as intended. 'Smoke present' however is considered an enum so as raw would just pass through 0 or 1, 0 for smoke present, 1 for no smoke present, so the converter works as intended. Sorry for any confusion, I was testing the smoke presence primarily as honestly that was the important one for me 😁. Unfortunately I have no idea how to test the device fault either, presumably I'd have to break the power to the photoelectric sensor in some way but I haven't got one I can try that with (or certain it would actually work). If you're happy with the below on your device, I'll submit as a PR?
|
@Jonno12345 Okay, yes just submit that now looks good 😁 |
with this converter gives such errors Info 2022-12-27 19:50:43MQTT publish: topic 'zigbee2mqtt/Датчик дыма кухня', payload '{"battery":88,"linkquality":52,"smoke":false,"smoke_level":28,"tamper":false,"test":false}' |
Whats the error? This is just an info and debug output from what I can see which look perfectly normal? |
Good afternoon! I'm new to this, so I'm wondering if this is not a bug?: |
That's just the smoke alarm reporting a battery level of 91, this is before the converter has made it into something usable by Z2M, so no, not an issue. You've got debug logging turned on so you'll see all the raw ZigBee messages coming in. |
Thank you so much! Now I understand. Regarding tamper - I opened the sensor, it physically does not have such a function. |
Yeah this should actually be 'device_fault'. I'll review whether I can get this one working correctly but I have no way to actually test it as I don't know what it considers to be a fault. I'd assume if it tries to pulse the sensor but it doesn't work, however I don't have one to sacrifice to test this. |
I have submitted a PR at Koenkk/zigbee-herdsman-converters#5218 now, with the correct value for 'device_fault'. As said before I can't test it properly without damaging one, but I've identified the correct datapoint now. |
Nice work:) |
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 |
@Jonno12345 Do you have any chance of figuring out if we're missing features for this device in order to use |
Link
https://aliexpress.ru/item/1005003970944017.html
Database entry
{"id":3,"type":"EndDevice","ieeeAddr":"0xa4c13879b8a471c2","nwkAddr":22977,"manufId":4417,"manufName":"_TZE200_m9skfctm","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"�"\u001e+\u0011","65506":56,"65508":0,"65534":0,"modelId":"TS0601","manufacturerName":"_TZE200_m9skfctm","powerSource":3,"zclVersion":3,"appVersion":72,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":72,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1670154805583,"defaultSendRequestWhen":"immediate"}
Comments
I tried to add support, but I'm extremely new to doing anything under the hood on zigbee2mqtt. I followed the adding support guide, but got stumped as to what to do next.
External converter
Supported color modes
No response
Color temperature range
No response
The text was updated successfully, but these errors were encountered: