unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE200_yojqa8xn'
Link
https://www.aliexpress.com/item/1005003944885010.html?spm=a2g0o.order_list.0.0.21ef1802vpsuEp
Database entry
Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE200_yojqa8xn' MQTT publish: topic 'zigbee2mqtt/Gas Detector', payload '{"last_seen":"2022-10-20T23:24:49+04:00","linkquality":58}'
Comments
Warning 2022-10-21 11:04:10Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE200_yojqa8xn' Warning 2022-10-21 11:04:10Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
External converter
No response
Supported color modes
No response
Color temperature range
No response
Could you update to the latest dev (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) and check if the issue is fixed with the following 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 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 e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ggev5fsl', '_TZE200_u319yc66', '_TZE200_yojqa8xn']),
model: 'TS0601_gas_sensor',
vendor: 'TuYa',
description: 'gas sensor',
fromZigbee: [tuya.fzDataPoints],
toZigbee: [tuya.tzDataPoints],
configure: tuya.configureMagicPacket,
exposes: [e.gas(), tuya.exposes.selfTest(), tuya.exposes.selfTestResult(), tuya.exposes.faultAlarm(), tuya.exposes.silence()],
meta: {
tuyaDatapoints: [
[1, 'gas', tuya.valueConverter.true0ElseFalse],
[8, 'self_test', tuya.valueConverter.raw],
[9, 'self_test_result', tuya.valueConverter.selfTestResult],
[11, 'fault_alarm', tuya.valueConverter.trueFalse],
[16, 'silence', tuya.valueConverter.raw],
],
},
};
module.exports = definition;
- save this as file next to
configuration.yamlasext_converter.js - add it to
configuration.yaml:
external_converters:
- ext_converter.js
- start z2m, check if device works
Thanks.. Zigbee2mqtt edge can learn device now after following above steps. However, i am getting below warning in logs.
Warning 2022-10-22 09:34:41Datapoint 2 not defined for '_TZE200_yojqa8xn' with data {"dp":2,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,2]}}
I'm not sure what this value means; to find out: https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_7-find-your-devices
[14:34:32] INFO: Preparing to start...
[14:34:33] INFO: Socat not enabled
[14:34:38] INFO: Starting Zigbee2MQTT...
/app/dist/util/externally-loaded.js:20
exposes: [e.gas(), tuya.exposes.selfTest(), tuya.exposes.selfTestResult(), tuya.exposes.faultAlarm(), tuya.exposes.silence()],
^
TypeError: tuya.exposes.selfTest is not a function
at /app/dist/util/externally-loaded.js:20:37
at Script.runInContext (node:vm:141:12)
at Script.runInNewContext (node:vm:146:17)
at Object.runInNewContext (node:vm:306:38)
at loadModuleFromText (/app/lib/util/utils.ts:148:8)
at loadModuleFromFile (/app/lib/util/utils.ts:155:12)
at Object.getExternalConvertersDefinitions (/app/lib/util/utils.ts:165:25)
at getExternalConvertersDefinitions.next (
@Ucsus you are probably not using the latest dev branch: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html
@Ucsus you are probably not using the latest dev branch: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html
I'm using HA, z2m edge version
@Ucsus you are probably not using the latest dev branch: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html
Reinstalled Z2M and it worked, thanks!
Great!
Did anyone could improve the converter to get the gas reading on the Zigbee version? I've also have the wifi one and it gives me the readings...
This converter works but looks a little glitched. I get many errors on Z2M when detection is triggered,
Hello, today I have received the tuya zigbee gateway.... the datapoints are more different then the converter ... I have found:
1 Gas detection state 2 Detected Gas 6 Alarm Ringtone 7 Alarm Time 8 Auto-detect 9 Auto-detect Result 10 Preheat
I don't understand how to find the datatype and the values for create a correct converter... can anyone help me?
@sercio can you provide the data/database.db entry of your device so I can write the converter?
this is the entry in z2m database.db
{"id":2,"type":"Router","ieeeAddr":"0xa4c1381aea7ee7a6","nwkAddr":2556,"manufId":4417,"manufName":"_TZE200_yojqa8xn","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u0019��)\u0017S\u0000\u0000\u0000eT\u0000\u0000\u0000\u0012","65506":54,"65508":1,"modelId":"TS0601","manufacturerName":"_TZE200_yojqa8xn","powerSource":1,"zclVersion":3,"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1662022924671,"defaultSendRequestWhen":"immediate"}
Do you need other information?
With the following converter https://gist.github.com/Koenkk/86ea747a683752fd6ff9390abf9fda55 everything should be exposed in the z2m frontend -> device -> state. However these are the raw values, we need to map them to more human friendly ones.
For each data point, can you give more context on what it does and what the possible options are?
OK, I can try. There is a tool or a method or I must to try all the options?
I need to know what options are provided in the TuYa app
OK, I try.
1 Gas detection state Normal (no gas) 2 Detected Gas 0.00LEL (level of gas) 6 Alarm Ringtone 1 (number of alarm ringtone from 1 to 5 ) 7 Alarm Time 180s (alarm duration from 1 to 180s) 8 Auto-detect (auto test: value on, off) 9 Auto-detect Result (auto test Result value processing, success) 10 Preheat (value on, off)
This is what I understand using app and tuya device debug
Thanks, can you check what appears in the z2m frontend -> device -> state with the following external conveter? https://gist.github.com/Koenkk/86ea747a683752fd6ff9390abf9fda55
OK, but it's impossible for me before 24/11. I'll send you the information as soon as possible. Thanks
Da: Koen Kanters @.> Inviato: venerdì 11 novembre 2022 17:01 A: Koenkk/zigbee2mqtt @.> Cc: sercio @.>; Mention @.> Oggetto: Re: [Koenkk/zigbee2mqtt] unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE200_yojqa8xn' (Issue #14571)
Thanks, can you check what appears in the z2m frontend -> device -> state with the following external conveter? https://gist.github.com/Koenkk/86ea747a683752fd6ff9390abf9fda55
— Reply to this email directly, view it on GitHubhttps://github.com/Koenkk/zigbee2mqtt/issues/14571#issuecomment-1311888211, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACFWCXWERPU42W2LLCC5RGDWHZUUJANCNFSM6AAAAAARK34BMI. You are receiving this because you were mentioned.Message ID: @.***>
this is what i am getting when i use this converter https://gist.github.com/Koenkk/86ea747a683752fd6ff9390abf9fda55
{ "detected_gas": 1, "gas": false, "last_seen": "2022-11-12T00:59:58+04:00", "linkquality": 69, "self_test": false, "self_test_result": "success", "silence": false }
Some time ago found somewhere DP info for '_TZE200_yojqa8xn'
sensor_status: 1 - enum (0-detected,1-not detected)
sensor_value: 2 - raw, DivideBy10
alarm_ringtone: 6
alarm_time: 7
self_checking: 8 - work with tuya.exposes.selfTest() & tuya.valueConverter.raw
checking_result: 9 - work with tuya.exposes.selfTestResult() & tuya.valueConverter.selfTestResult
preheat: 10
alarm_switch: 13
muffling: 16 - raw, use tuya.exposes.silence()
usable exposes & converters checked by me. Still working on alarm_ringtone & time, as well alarm_switch.