question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need help to include new Motion-Sensor (radar module)

See original GitHub issue

Hi,

I bought the following device: image

Implemented with this 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 e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_vrfecyku', type: 'Router', ieee_adress: '0x804b50fffee109d5'}],
    model: 'TS0601',
    vendor: 'TuYa',
    description: 'Radar Motion Sensor',
    fromZigbee: [
        fz.ignore_basic_report, // Add this if you are getting no converter for 'genBasic'
        fz.tuya_data_point_dump, // This is a debug converter, it will be described in the next part
    ],
    toZigbee: [
        tz.tuya_data_point_test, // Another debug converter
    ],
    // 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: [
        // Here you should put all functionality that your device exposes
    ],
};

module.exports = definition;

Getting the following Announces within z2m:

Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,38],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":69}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,5],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":69}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":69}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[2],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":70}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,7],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":70}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,24],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":70}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":70}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,1],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":71}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[2],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":71}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,5],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":71}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":114,"fn":0,"status":0,"transid":72}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,1],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":72}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[2],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":72}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,27],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":72}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":114,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,1],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,26],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,15],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,20],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":114,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":114,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,12],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":102,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0
Received Zigbee message from '0x804b50fffee109d5', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,1],"type":"Buffer"},"datatype":2,"dp":115,"fn":0,"status":0,"transid":73}' from endpoint 1 with groupID 0

The Dump: tuya.dump.txt

But I don’t understand, how to convert that to z2m.

So can you plaese help me?

Greetings Burkhard

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
danieledwardgeorgehitchcockcommented, Oct 1, 2021

I am currently trying to integrate a TuYa device into Zigbee2MQTT and can give you some pointers to get you started.

If you have the TuYa Zigbee Gateway, add the device to that. Sign up for the TuYa Cloud IoT API and link your accounts (there are several YouTube videos and tutorials if you google it). Once your accounts are joined, go to cloud->your api application name->devices, click on device and go to debug device. Go to the device logs tab and open up your browsers debug tools. Go to the Network tab in your browsers debug tools, then click on the select DP drop down at the top of the table on the page and pick the first datapoint name. Click search and watch the traffic come in in debug tools. You should find a list object in the network events. Click on it and scroll down to the Request Payload section. the code in the payload is the TuYa data point.

Map all of the codes available in the above to their names (you may need google translate for some of them).

Once you have that, you can then follow the tutorials for mapping the buffer values.

0reactions
Burki24commented, Oct 1, 2021

Thanks for your patience and your really great support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Get Started with a Microwave Radar Motion Sensor
This sensor module has been designed as an alternative to the common PIR motion sensors widely used in burglar alarms and security lights....
Read more >
How to Make a Microwave Radar Motion Sensor for Your ...
With a microwave radar sensor, you can detect motion and the presence of people. Find how to build one and add it to...
Read more >
Making the Electronics for a 24GHz Doppler Motion Sensor
Making the Electronics for a 24GHz Doppler Motion Sensor ... While the HB100 is using a 10.525GHz frequency, this new module uses 24.125GHz!...
Read more >
motion sensor module - Amazon.com
DWEII 12PCS RCWL-0516 Motion Detection Sensor, Microwave Radar Sensor, Switch Module, for Arduino ESP8266 Nodemcu Wemos, for Raspberry PI, for Human Rat Cat ......
Read more >
RCWL-0516 information - GitHub
So make sure you check it out. If anyone wants to help keeping this main page updated let me know. RCWL-0516 is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found