Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.98k stars 1.67k forks source link

Tuya Human Presence Detector manufacturerName: '_TZE200_lu01t0zl' #10256

Closed losip closed 2 years ago

losip commented 2 years ago

I ordered a radar human presence detector from the supported devices list but when trying to pair with Z2M, I get a continuous stream of messages saying it's unsupported. Connecting through Tuya gateway works (albeit slowly via cloud). Trying to follow the instructions for adding support for new devices goes well at first and I created Tuya dev account and extracted all 20 Data Points.

The example external converter for the Saswell thermostat was not helpful so I started looking for a more similar device and found that there was already support for a similar radar detector (manufacturerName: '_TZE200_vrfecyku'). It seems silly for me, as a non-programmer, to go any further when it seems that manufacturerName: '_TZE200_lu01t0zl' is a synonym for this one, or at least has all the functionality I need

It seems Tuya has produced a new model but it appears to have exactly the same functionality. Is it possible to clone the existing device to recognize the new manufacturerName? -->

Information about the device + link

The link doesn't help - it's the same as the existing supported model at https://www.zigbee2mqtt.io/devices/MIR-HE200-TY.html The product name for this one includes Chinese characters and is: NEW_云帆主设备-跌倒雷达+zigbee while the Zigbee model remains 'TS0601'. Device ID is bf4f51d531f5d41dd0evvv ..

data/database.db entry of the device

{"id":30,"type":"Router","ieeeAddr":"0xa4c138ae72d48bed","nwkAddr":3095,"manufId":4417,"manufName":"_TZE200_lu01t0zl","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":{"65506":48,"65508":1,"modelId":"TS0601","manufacturerName":"_TZE200_lu01t0zl","powerSource":1,"zclVersion":3,"appVersion":68,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":68,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1640512787399,"useImplicitCheckin":true}

..

losip commented 2 years ago

Further information: there is no model number on the outside of the sensor but I took it apart and the PCB is marked IFAR. This may correspond to the previous model AIR - but with the addition of the fall-down detection.

I struggled on trying to follow the instructions but when I got to the part where I had to add the data point definitions to a file on GitHub, I was too scared I'd muck something up, not knowing how to "drive" github. Never mind, the existing TZ and FZ files would provide most of what I want so I created the external filter and placed it in the correct directory. Just to edit configuration.yaml, I thought to include the external converter and set the logging level to debug. Done! But when restarting Z2M, it took no notice of the new configuration.yaml and reverted it to the previous version but with strange formatting that was not yaml (json?)

At this point I screamed and reached for a bottle of wine. Meanwhile, I've had to stop using the device through the new Tuya integration because it stops from time to time. I have got an automation restarting it every 3 hours but I need better reliability through local Zigbee connection rather than through the Tuya gateway

losip commented 2 years ago

Data Points are: 1 - Presence State 2 - Sensitivity (numeric - withValueMin(1).withValueMax(10).withValueStep(1)) 101 - Reset Flag 102 - Motion State (binary - 'human detected as peaceful or moving') 103 - Illumination 104 - Detection Data 105 - Tumble Switch (binary) 106 - Tumble Alarm Time (numeric - withValueMin(1).withValueMax(5).withValueStep(1)) 107 - Radar Check End (time) 108 - Radar Check Start (time) 109 - HW Version 110 - SW Version 111 - Radar ID 112 - Scene (enum - 'default', 'area', 'toilet', 'bedroom', 'parlour', 'office', 'hotel') 113 - undefined 114 - Motion Direction (enum: 'none', 'close to', 'away from') 115 - Motion (binary) 116 - Fall Down Status (binary) 117 - Static_dwell_alarm (binary) 118 - Fall sensitivity (numeric - withValueMin(1).withValueMax(10).withValueStep(1))

norsoa commented 2 years ago

I wounder if you have successfully integrated the sensor with a local ZigBee connection? Like you I am searching for a presence sensor with ZigBee and 230v. I am very interested in getting feedback how this sensor is working in a real life setup.

losip commented 2 years ago

No, I've given up. I'm an engineer, not a developer and, although I tried, I was unable to make an external converter work. Device works with Zigbee using the new Tuya integration but that's too slow and unreliable for my purposes so I really wanted it to work with local Zigbee2mqtt. I can't do it on my own

losip commented 2 years ago

This is the external converter I tried: 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 = { // Since a lot of Tuya devices use the same modelID, but use different data points // it's usually necessary to provide a fingerprint instead of a zigbeeModel fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_lu01t0zl'}], model: 'NEW Cloud Sail Main Equipment-Falling Down Radar+zigbee', vendor: 'TuYa', description: 'Human presence sensor', fromZigbee: [fz.ignore_basic_report, fz.tuya_radar_sensor], toZigbee: [tz.tuya_radar_sensor], onEvent: tuya.setTime, // Add this if you are getting no converter for 'commandSetTimeRequest' configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']); }, exposes: [ e.illuminance_lux(), e.presence(), exposes.binary('motion', ea.STATE, [true, false]).withDescription('moving inside the range of the sensor'), exposes.binary('motion_state', ea.STATE, [true, false]).withDescription('human detected as peaceful or moving'), exposes.binary('fall_down_status', ea.STATE, [true, false]).withDescription('human fallen down detected'), exposes.binary('static_dwell_alarm', ea.STATE, [true, false]).withDescription('human has been still for too long'), exposes.binary('tumble_switch', ea.STATE_SET, [true, false]).withDescription('enables tumble detection'), exposes.numeric('motion_speed', ea.STATE).withDescription('Speed of movement'), exposes.enum('motion_direction', ea.STATE, ['none', 'close to', 'away from']) .withDescription('direction of movement from the point of view of the radar'), exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1) .withDescription('sensitivity of the radar'), exposes.numeric('fall_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1) .withDescription('sensitivity of the fall detection'), exposes.enum('radar_scene', ea.STATE_SET, ['default', 'area', 'toilet', 'bedroom', 'parlour', 'office', 'hotel']) .withDescription('presets for sensivity for presence and movement'), exposes.numeric('tumble_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1) .withDescription('set time in minutes for detection of a tumble'), ], },

module.exports = definition;

prokudin07 commented 2 years ago

This is the external converter I tried: 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 = { // Since a lot of Tuya devices use the same modelID, but use different data points // it's usually necessary to provide a fingerprint instead of a zigbeeModel fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_lu01t0zl'}], model: 'NEW Cloud Sail Main Equipment-Falling Down Radar+zigbee', vendor: 'TuYa', description: 'Human presence sensor', fromZigbee: [fz.ignore_basic_report, fz.tuya_radar_sensor], toZigbee: [tz.tuya_radar_sensor], onEvent: tuya.setTime, // Add this if you are getting no converter for 'commandSetTimeRequest' configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']); }, exposes: [ e.illuminance_lux(), e.presence(), exposes.binary('motion', ea.STATE, [true, false]).withDescription('moving inside the range of the sensor'), exposes.binary('motion_state', ea.STATE, [true, false]).withDescription('human detected as peaceful or moving'), exposes.binary('fall_down_status', ea.STATE, [true, false]).withDescription('human fallen down detected'), exposes.binary('static_dwell_alarm', ea.STATE, [true, false]).withDescription('human has been still for too long'), exposes.binary('tumble_switch', ea.STATE_SET, [true, false]).withDescription('enables tumble detection'), exposes.numeric('motion_speed', ea.STATE).withDescription('Speed of movement'), exposes.enum('motion_direction', ea.STATE, ['none', 'close to', 'away from']) .withDescription('direction of movement from the point of view of the radar'), exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1) .withDescription('sensitivity of the radar'), exposes.numeric('fall_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1) .withDescription('sensitivity of the fall detection'), exposes.enum('radar_scene', ea.STATE_SET, ['default', 'area', 'toilet', 'bedroom', 'parlour', 'office', 'hotel']) .withDescription('presets for sensivity for presence and movement'), exposes.numeric('tumble_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1) .withDescription('set time in minutes for detection of a tumble'), ], },

module.exports = definition;

Hello, will this converter work? I bought the same device and have the same problem with z2m.

prokudin07 commented 2 years ago

Hello! I can to start this device in Z2M. Just replaced manufacturerName in file tuya.js and it work.

losip commented 2 years ago

That sounds reasonable, @prokudin07 . But in my ignorance I thought tuya.js was a file on Github owned and controlled by @Koenkk . Or do we each get a copy if we have Tuya Zigbee devices? If so, where is it for me to modify? Thanks

prokudin07 commented 2 years ago

Have two way @losip :

  1. wait while @Koenkk do it in herdsman-converter and it will be available for all users of z2m
  2. while we wait paragraph 1 - in your instance of z2m on your local computer (i have raspberry pi) find file tuya.js, in that file find string "vrfecyku" and replace it on "lu01t0zl", then restart your z2m and rejoin your device. But remember when you will update your z2m - you must repeat that operation one more time.
losip commented 2 years ago

I think I'll have to wait for option 1. I can't find tuya.js anywhere on the computer that's running HA. Is it hidden somewhere?

prokudin07 commented 2 years ago

What kind of installation of HA do you have? HASOS, HA in docker? I have docker installation of HA and login via ssh on my raspberry pi. That file (tuya.js) isn't in directory of HA, other place. If you use Telegram can find me @prokudinvn

losip commented 2 years ago

HASSOS on generic x64. I have Samba mapped to config directory but I'll try using my non-existent Linux skills to look elsewhere. Seems strange for it not to be somewhere under the zigbee2mqtt directory

prokudin07 commented 2 years ago

Maybe I wrong, but in HassOS it's impossible. But... Turn off your comp with HA, unplug disk (ssd, flash) and plug in orher comp and I think you will find that file)

losip commented 2 years ago

Ah, therein lies a problem: it's a cheap mini PC with 64Gb emmc soldered to the circuit board! I guess I'll just have to wait...

prokudin07 commented 2 years ago

Ok. I soon will ask my friend who works with koenkk - add this device to z2m

prokudin07 commented 2 years ago

Ah, therein lies a problem: it's a cheap mini PC with 64Gb emmc soldered to the circuit board! I guess I'll just have to wait...

I got consultation. You can use addon SSH and find that file. 2022-01-04 20 34 07

prokudin07 commented 2 years ago

Hello @losip I did pull request then will wait

losip commented 2 years ago

Thank you @prokudin07 . Noobs like me have no idea what a pull request is or how to 'operate' github so that is very useful

prokudin07 commented 2 years ago

@losip I did it first time too )) Other man helped me.

prokudin07 commented 2 years ago

@losip pull request was accept. Try to install Z2MEdge - it's beta version of Z2M and try to join sensor.

losip commented 2 years ago

Yes, thanks @prokudin07 . That's working. It will do all that I need although I suppose that, in due course, the "fall down" and "tumble" support should be added using the data points I listed above. Would you know how to go about that?

prokudin07 commented 2 years ago

I don't know, but later i'll try do it.

prokudin07 commented 2 years ago

Hello @losip I doing but it's all new for me and so slow, but on screenshot - did 2 exposes. I hope soon will do it) sensor

prokudin07 commented 2 years ago

Hello @losip I did it!!! Now this device is avaible in z2mEdge Pull request

losip commented 2 years ago

Congratulations @prokudin07 !! I'll update Edge

prokudin07 commented 2 years ago

Hello @losip I updated a little. https://github.com/Koenkk/zigbee-herdsman-converters/pull/3701

losip commented 2 years ago

Thank you. The only thing that seems to be missing is the picture. I get the generic device image.

Nothing to do with the integration or Z2M but I’m disappointed in the performance of the device. If I have the radar sensitivity set to reliably detect presence at 7 or 8, then it doesn’t switch back to ‘away’ unless I set the sensitivity down to 3 or 4. I may swap it out for a different detector.

Peter From: Valeriy @.> Sent: 19 January 2022 08:59 To: Koenkk/zigbee2mqtt @.> Cc: Peter Smith @.>; Mention @.> Subject: Re: [Koenkk/zigbee2mqtt] Tuya Human Presence Detector manufacturerName: '_TZE200_lu01t0zl' (Issue #10256)

Hello @losiphttps://github.com/losip I updated a little. Koenkk/zigbee-herdsman-converters#3701https://github.com/Koenkk/zigbee-herdsman-converters/pull/3701

— Reply to this email directly, view it on GitHubhttps://github.com/Koenkk/zigbee2mqtt/issues/10256#issuecomment-1016219322, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV46JWELCWAPPMVXR7DSQKDUWZ4LTANCNFSM5KNJXJAQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.**@.>>

prokudin07 commented 2 years ago

About picture: I know, bгt Koenk advised me add this device as new device and I don't know how do description that device on the page

About "I’m disappointed": strange. My deviсe very accurately determines the presence or absence. From nobody to someone - 0.5 sec from someone to nobode - about 2 min.

Here is datasheet and user manual of this sensor in Library

losip commented 2 years ago

Thanks. The right picture was there before your previous update but no matter – it doesn’t affect the operation.

I have mine in a bathroom to switch the lights on when presence is detected and switch them off after 2 minutes of nobody detected. What settings do you have for sensitivity and scene? I might try again – for now, I’ve installed the ‘AIR’ radar but it seems to be more like a motion detector, so I’m still not happy with the solution

Thanks for the light to the data sheet; I’ll study it and see if I’ve got the location or orientation wrong – but I was careful to read the instructions that came with the device

From: Valeriy @.> Sent: 19 January 2022 16:51 To: Koenkk/zigbee2mqtt @.> Cc: Peter Smith @.>; Mention @.> Subject: Re: [Koenkk/zigbee2mqtt] Tuya Human Presence Detector manufacturerName: '_TZE200_lu01t0zl' (Issue #10256)

About picture: I know, bгt Koenk advised me add this device as new device and I don't know how do description that device on the pagehttps://www.zigbee2mqtt.io/supported-devices/

About "I’m disappointed": strange. My deviсe very accurately determines the presence or absence. From nobody to someone - 0.5 sec from someone to nobode - about 2 min.

Herehttps://buy-lcd.com/products/24ghz-wireless-bio-radar-sensor-for-fall-detection-ir24fda is datasheet and user manual of this sensor in Library

— Reply to this email directly, view it on GitHubhttps://github.com/Koenkk/zigbee2mqtt/issues/10256#issuecomment-1016662619, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV46JWFH23EZVULIH3736QTUW3TY3ANCNFSM5KNJXJAQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.**@.>>

prokudin07 commented 2 years ago

Безымянный

haint126 commented 2 years ago

Data Points are: 1 - Presence State 2 - Sensitivity (numeric - withValueMin(1).withValueMax(10).withValueStep(1)) 101 - Reset Flag 102 - Motion State (binary - 'human detected as peaceful or moving') 103 - Illumination 104 - Detection Data 105 - Tumble Switch (binary) 106 - Tumble Alarm Time (numeric - withValueMin(1).withValueMax(5).withValueStep(1)) 107 - Radar Check End (time) 108 - Radar Check Start (time) 109 - HW Version 110 - SW Version 111 - Radar ID 112 - Scene (enum - 'default', 'area', 'toilet', 'bedroom', 'parlour', 'office', 'hotel') 113 - undefined 114 - Motion Direction (enum: 'none', 'close to', 'away from') 115 - Motion (binary) 116 - Fall Down Status (binary) 117 - Static_dwell_alarm (binary) 118 - Fall sensitivity (numeric - withValueMin(1).withValueMax(10).withValueStep(1))

I Just bought a few of these devices and keep getting missing datapoint warnings. I found your thread very helpful. May I ask where did you find these datapoint definitions and what are their functions? Thank you very much @losip

losip commented 2 years ago

@haint126 I got these datapoints by pairing the device with a Tuya hub and then using the Tuya IOT platform to follow the instructions provided by @Koenkk for adding a new Tuya device. I have no further information about their functionality

haint126 commented 2 years ago

Oh, I did not know there was instruction for that. Just found it. For anyone missed that instruction like me, here is the link: https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html Thank you very much @losip

salopette commented 1 year ago

Can someone help me get the device running? With with, an error message keeps coming up, although it appears as suporttet.

SeLLeRoNe commented 1 year ago

I seem to be facing the same issue with model: _TZE200_jkbljri7

I was using this converter, but now suddently it returns errors (latest: tuya is not defined):

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: 'TS0601', manufacturerName: '_TZE200_jkbljri7'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_jkbljri7'}],
        model: 'MIR-HE200-TY',
        vendor: 'TuYa',
        description: 'Human presence sensor with fall function',
        fromZigbee: [fz.tuya_radar_sensor_fall],
        toZigbee: [tz.tuya_radar_sensor_fall],
        exposes: [
            e.illuminance_lux(), e.presence(), e.occupancy(),
            exposes.numeric('motion_speed', ea.STATE).withDescription('Speed of movement'),
            exposes.enum('motion_direction', ea.STATE, Object.values(tuya.tuyaRadar.motionDirection))
                .withDescription('direction of movement from the point of view of the radar'),
            exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1)
                .withDescription('sensitivity of the radar'),
            exposes.enum('radar_scene', ea.STATE_SET, Object.values(tuya.tuyaRadar.radarScene))
                .withDescription('presets for sensitivity for presence and movement'),
            exposes.enum('tumble_switch', ea.STATE_SET, ['ON', 'OFF']).withDescription('Tumble status switch'),
            exposes.numeric('fall_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1)
                .withDescription('fall sensitivity of the radar'),
            exposes.numeric('tumble_alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
                .withUnit('min').withDescription('tumble alarm time'),
            exposes.enum('fall_down_status', ea.STATE, Object.values(tuya.tuyaRadar.fallDown))
                .withDescription('fall down status'),
            exposes.text('static_dwell_alarm', ea.STATE).withDescription('static dwell alarm'),
        ],
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint = device.getEndpoint(1);
            await tuya.sendDataPointEnum(endpoint, tuya.dataPoints.trsfTumbleSwitch, false);
        }
    };

module.exports = definition;

Maybe someone can help me with this converter?

Thanks!

SeLLeRoNe commented 1 year ago

Ok, so I got the above updated to work with latest updates (I think the template has changed), new one is:

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 = {
    // Since a lot of TuYa devices use the same modelID, but use different datapoints
    // it's necessary to provide a fingerprint instead of a zigbeeModel
    fingerprint: [
        {
            // The model ID from: Device with modelID 'TS0601' is not supported
            // You may need to add \u0000 at the end of the name in some cases
            modelID: 'TS0601',
            // The manufacturer name from: Device with modelID 'TS0601' is not supported.
            manufacturerName: '_TZE200_jkbljri7',
        },
    ],
    model: 'MIR-HE200-TY',
    vendor: 'TuYa',
    description: 'Human presence sensor with fall function',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    configure: tuya.configureMagicPacket,
    exposes: [
        // Here you should put all functionality that your device exposes
        e.illuminance_lux(), e.presence(), e.occupancy(),
        exposes.numeric('motion_speed', ea.STATE).withDescription('Speed of movement'),
        exposes.enum('motion_direction', ea.STATE, Object.values(tuya.tuyaRadar.motionDirection))
            .withDescription('direction of movement from the point of view of the radar'),
        exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1)
            .withDescription('sensitivity of the radar'),
        exposes.enum('radar_scene', ea.STATE_SET, Object.values(tuya.tuyaRadar.radarScene))
            .withDescription('presets for sensitivity for presence and movement'),
        exposes.enum('tumble_switch', ea.STATE_SET, ['ON', 'OFF']).withDescription('Tumble status switch'),
        exposes.numeric('fall_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1)
            .withDescription('fall sensitivity of the radar'),
        exposes.numeric('tumble_alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
            .withUnit('min').withDescription('tumble alarm time'),
        exposes.enum('fall_down_status', ea.STATE, Object.values(tuya.tuyaRadar.fallDown))
            .withDescription('fall down status'),
        exposes.text('static_dwell_alarm', ea.STATE).withDescription('static dwell alarm'),
    ],
    meta: {
        // All datapoints go in here
        tuyaDatapoints: [
        ],
    },
};

module.exports = definition;

Only issue I have is that I don't have a Tuya hub, so I can't make the right thing to have it correctly paired :) The only odd thing I have for now seems to be that occupancy return Null when there is none, but because I can't see exact codes, but beside that, this should be now be somewhat working :)

SeLLeRoNe commented 1 year ago

Unfortunately the above no longer works, I think there was an update on how the template needs to be setup but I haven't yet had the time to try to update the above, so I had to remove this customization and that device is just a piece of unrecognized zigbee device :)

SeLLeRoNe commented 1 year ago

Looking for the Manufacturer I see another github repo that seems to have had the update to manage that: https://github.com/ioBroker/ioBroker.zigbee/issues/1672

Maybe someone with more understanding on how to implement the code for it could throw some help in the mix :) Would be much appreciated.

Thanks