Driver for TUYA TS0202 Motion Sensor with Button, ["_TZ3210_cwamkvua"],

Hello,

I am trying to code a driver for this device.
But I am not successful :
I write :

As I can saw in this post : Zigbee Single Gang Tuya Switch
That seems correct, but I got this message when I press the button on the device:

What could I do ?

I’ve seen in ZCL spec that this command would be ‘Configure Reporting’ but I don’t understand the meaning of this …

Thank you for your help … I have been strugling with this issue for a while !

Regards

Hi @GD91

I hope I’m not misleading you down the wrong path - but have you tried importing the helpers.js (a copy of which is in wall_thermostat). It has the getDataValue function you can use to interpret the response /payload you’re getting?

In device.js

...
const {getDataValue} = require('./helpers');
...

I’m still new to this myself - so apologies if this isn’t the right way forward!

Thanks you for your suggestion.

The GetDataValue functions are already included in the device.js …

And, furthermore ,I haven’t gotten to that point, as this message is blocked by the system.

The TuYa specific cluster definition only supports cmdId’s 0x00, 0x01 and 0x02.

Your device is sending cmdId 0x06, so you’re going to have to find out what that actually means, and then implement your own custom command handler.

1 Like

Thanks you for your answer.
But, how to implement my own custom command handler. ?

I found ‘reportingConfiguration’ inside the interview of the device within endpointDescriptors>“1”>Clusters>IasZone>Attributes :

But, in this interview, there is no mention of the tuya cluster within the Clusters section

The only mention of Tuya cluster is in the list of the InputClusters :
image

Look at the file I linked to.

My driver is now working fine.
Thank you very much for your help !

Driver development is certainly HOMEY’s weak point. Furthermore, it’s really fantastic material with the flows and the scripts…

I have now to take a look at the cards and flows.
I’m wondering which cards/flows are added by Homey depending the class app and the capability …
Is there a doc about this ?

Best regards and thanks again !

1 Like

My driver is now perfectly working.
I have added all the necessary cards.

This device is also known as model: ‘LKMSZ001’, vendor: ‘Linkoze’,

Thank you for your help …

Best regards