### Link
https://de.aliexpress.com/item/1005005633355282.html?spm=a2g0o.product…list.main.7.46ff2ER82ER8Fb&algo_pvid=a42bce64-36bf-485f-8f49-59f4822fba63&aem_p4p_detail=2024111910013610362160840905300000316903&algo_exp_id=a42bce64-36bf-485f-8f49-59f4822fba63-3&pdp_npi=4%40dis%21EUR%2144.80%2122.59%21%21%21335.33%21169.09%21%4021038e1e17320392965586635ed0f2%2112000035203940938%21sea%21DE%210%21ABX&curPageLogUid=QsCwyiVPJ0Y0&utparam-url=scene%3Asearch%7Cquery_from%3A&search_p4p_id=2024111910013610362160840905300000316903_4
### Database entry
{"id":28,"type":"Router","ieeeAddr":"0xf84477fffea809db","nwkAddr":32578,"manufId":4098,"manufName":"_TZE200_clrdrnya","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"ԩ�.\u0012թ�.\u0012","65506":31,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_clrdrnya","stackVersion":0,"dateCode":"","appVersion":68,"powerSource":1,"zclVersion":3,"hwVersion":1}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":68,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1732042616907}
### Zigbee2MQTT version
1.41.0-dev commit: b1508ae
### Comments
I've tried to add the Tuya MTG235-ZB-RL, but everytime I get the error that it is not supported. I used several external definitions, but none of them seems to work.
Any help on this problem?
### External definition
```shell
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 tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_clrdrnya']),
model: 'MTG235-ZB-RL',
vendor: 'TuYa',
description: '24G human presence sensor with relay',
configure: tuya.configureMagicPacket,
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.presence(), e.illuminance_lux(),
e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Sensitivity of the radar'),
e.numeric('entry_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Entry sensitivity'),
e.numeric('illumin_threshold', ea.STATE_SET).withValueMin(0).withValueMax(420).withValueStep(0.1).withUnit('lx')
.withDescription('Illumination threshold for switching on'),
e.numeric('detection_range', ea.STATE_SET).withValueMin(240).withValueMax(1250).withValueStep(10)
.withUnit('cm').withDescription('Detection range'),
e.numeric('shield_range', ea.STATE_SET).withValueMin(30).withValueMax(1240).withValueStep(10).withUnit('cm')
.withDescription('Shield range of the radar'),
e.numeric('entry_distance_indentation', ea.STATE_SET).withValueMin(0).withValueMax(1220).withValueStep(10).withUnit('cm')
.withDescription('Entry distance indentation'),
e.numeric('entry_filter_time', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
.withDescription('Entry filter time'),
e.numeric('departure_delay', ea.STATE_SET).withValueMin(2).withValueMax(1500).withValueStep(1).withUnit('s').
withDescription('Turn off delay'),
e.numeric('block_time', ea.STATE_SET).withValueMin(1.5).withValueMax(60).withValueStep(0.1).withUnit('s').withDescription('Block time'),
e.binary('breaker_status', ea.STATE_SET, 'ON', 'OFF').withDescription('Breaker status changes with breaker_mode->standard'),
e.enum('breaker_mode', ea.STATE_SET, ['standard', 'local']).withDescription('Status breaker mode: standard is external, local is auto'),
e.enum('status_indication', ea.STATE_SET, ['OFF', 'ON']).withDescription('Led backlight when triggered'),
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse1],
[2, 'radar_sensitivity', tuya.valueConverter.raw],
[3, 'shield_range', tuya.valueConverter./*divideBy100*/raw],
[4, 'detection_range', tuya.valueConverter./*divideBy100*/raw],
[6, 'equipment_status', tuya.valueConverter.raw],
[9, 'target_distance', tuya.valueConverter./*divideBy100*/raw],
[101, 'entry_filter_time', tuya.valueConverter.divideBy10],
[102, 'departure_delay', tuya.valueConverter.raw],
[103, 'cline', tuya.valueConverter.raw],
[104, 'illuminance_lux', tuya.valueConverter.divideBy10],
[105, 'entry_sensitivity', tuya.valueConverter.raw],
[106, 'entry_distance_indentation', tuya.valueConverter./*divideBy100*/raw],
[107, 'breaker_mode', tuya.valueConverterBasic.lookup({'standard': tuya.enum(0), 'local': tuya.enum(1)})],
[108, 'breaker_status', tuya.valueConverterBasic.lookup({'OFF': tuya.enum(0), 'ON': tuya.enum(1)})],
[109, 'status_indication', tuya.valueConverterBasic.lookup({'OFF': tuya.enum(0), 'ON': tuya.enum(1)})],
[110, 'illumin_threshold', tuya.valueConverter.divideBy10],
[111, 'breaker_polarity', tuya.valueConverterBasic.lookup({'NC': tuya.enum(0), 'NO': tuya.enum(1)})],
[112, 'block_time', tuya.valueConverter.divideBy10],
[113, 'parameter_setting_result', tuya.valueConverter.raw],
[114, 'factory_parameters', tuya.valueConverter.raw],
[115, 'sensor', tuya.valueConverter.onOff],
],
},
};
module.exports = definition;
```
### What does/doesn't work with the external definition?
Only interviewing works
