JohanBendz / com.tuya.zigbee

MIT License
68 stars 127 forks source link

Device Request - [Radar Sensor] - [_TZE204_qasjif9e] / [TS0601] #643

Open jrgrichter opened 10 months ago

jrgrichter commented 10 months ago

Sorry for my wrong first post! Here is the correct information for my radar sensor from Tuya, freshly purchased from Amazon. It is identical to the old model on the outside but has a USB C interface. https://m.media-amazon.com/images/I/418zpg3d9cL._AC_SX425_.jpg

"ids": { "modelId": "TS0601", "manufacturerName": "_TZE204_qasjif9e" }, "endpoints": { "ieeeAddress": "a4:c1:38:1e:fd:41:2d:a2", "networkAddress": 5619, "modelId": "TS0601", "manufacturerName": "_TZE204_qasjif9e", "endpointDescriptors": [ { "status": "SUCCESS", "nwkAddrOfInterest": 5619, "_reserved": 20, "endpointId": 1, "applicationProfileId": 260, "applicationDeviceId": 81, "applicationDeviceVersion": 0, "_reserved1": 1, "inputClusters": [ 4, 5, 61184, 0 ], "outputClusters": [ 25, 10 ] }, { "status": "SUCCESS", "nwkAddrOfInterest": 5619, "_reserved": 10, "endpointId": 242, "applicationProfileId": 41440, "applicationDeviceId": 97, "applicationDeviceVersion": 0, "_reserved1": 0, "inputClusters": [], "outputClusters": [ 33 ] } ], "deviceType": "router", "receiveWhenIdle": true, "capabilities": { "alternatePANCoordinator": false, "deviceType": true, "powerSourceMains": true, "receiveWhenIdle": true, "security": false, "allocateAddress": true }, "extendedEndpointDescriptors": { "1": { "clusters": { "groups": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "nameSupport", "value": { "type": "Buffer", "data": [ 0 ] }, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "scenes": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 3, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 4, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "basic": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "zclVersion", "value": 3 }, { "acl": [ "readable", "reportable" ], "id": 1, "name": "appVersion", "value": 74 }, { "acl": [ "readable", "reportable" ], "id": 2, "name": "stackVersion", "value": 0 }, { "acl": [ "readable", "reportable" ], "id": 3, "name": "hwVersion", "value": 1 }, { "acl": [ "readable", "reportable" ], "id": 4, "name": "manufacturerName", "value": "_TZE204_qasjif9e" }, { "acl": [ "readable", "reportable" ], "id": 5, "name": "modelId", "value": "TS0601" }, { "acl": [ "readable", "reportable" ], "id": 6, "name": "dateCode", "value": "" }, { "acl": [ "readable", "reportable" ], "id": 7, "name": "powerSource", "value": "mains" }, { "acl": [ "readable", "writable", "reportable" ], "id": 65502 }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2 }, { "acl": [ "readable", "reportable" ], "id": 65534, "name": "attributeReportingStatus", "value": "PENDING" }, { "acl": [ "readable", "reportable" ], "id": 65506 }, { "acl": [ "readable", "reportable" ], "id": 65507 } ] } }, "bindings": { "ota": {}, "time": { "attributes": [ { "acl": [ "readable" ], "id": 65533, "name": "clusterRevision", "value": 1 } ] } } }, "242": { "clusters": {}, "bindings": {} } } }

obetsak commented 10 months ago

it would be good if you updated the title to reflect the device you asking for also

jrgrichter commented 10 months ago

I have changed the title for the device

JohanBendz commented 10 months ago

Added as new model in the next release. There is however several devices I'm not sure is handled the same way so I keep this open until you can verify the next release support your device without issues.

marcorogo commented 10 months ago

I just tested the new version of the app with the device _TZE204_qasjif9e, and unfortunately, the association with Homey is not successful

marcorogo commented 10 months ago

I don't know if it can be helpful, but I'll report the outcome of the interview with my device:

"ids": { "modelId": "TS0601", "manufacturerName": "_TZE204_qasjif9e" }, "endpoints": { "endpointDescriptors": [ { "endpointId": 1, "applicationProfileId": 260, "applicationDeviceId": 81, "applicationDeviceVersion": 0, "_reserved1": 1, "inputClusters": [ 4, 5, 61184, 0 ], "outputClusters": [ 25, 10 ] }, { "endpointId": 242, "applicationProfileId": 41440, "applicationDeviceId": 97, "applicationDeviceVersion": 0, "_reserved1": 0, "inputClusters": [], "outputClusters": [ 33 ] } ], "endpoints": { "1": { "clusters": { "groups": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "nameSupport", "value": { "type": "Buffer", "data": [ 0 ] }, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "scenes": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 3, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 4, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "basic": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "zclVersion", "value": 3 }, { "acl": [ "readable", "reportable" ], "id": 1, "name": "appVersion", "value": 74 }, { "acl": [ "readable", "reportable" ], "id": 2, "name": "stackVersion", "value": 0 }, { "acl": [ "readable", "reportable" ], "id": 3, "name": "hwVersion", "value": 1 }, { "acl": [ "readable", "reportable" ], "id": 4, "name": "manufacturerName", "value": "_TZE204_qasjif9e" }, { "acl": [ "readable", "reportable" ], "id": 5, "name": "modelId", "value": "TS0601" }, { "acl": [ "readable", "reportable" ], "id": 6, "name": "dateCode", "value": "" }, { "acl": [ "readable", "reportable" ], "id": 7, "name": "powerSource", "value": "mains" }, { "acl": [ "readable", "writable", "reportable" ], "id": 65502 }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2 }, { "acl": [ "readable", "reportable" ], "id": 65534, "name": "attributeReportingStatus", "value": "PENDING" }, { "acl": [ "readable", "reportable" ], "id": 65506 }, { "acl": [ "readable", "reportable" ], "id": 65507 } ] } }, "bindings": { "ota": { "attributes": [ { "acl": [ "readable" ], "id": 0 }, { "acl": [ "readable" ], "id": 1 }, { "acl": [ "readable" ], "id": 2 }, { "acl": [ "readable" ], "id": 3 }, { "acl": [ "readable" ], "id": 4 }, { "acl": [ "readable" ], "id": 5 }, { "acl": [ "readable" ], "id": 6 }, { "acl": [ "readable" ], "id": 7 }, { "acl": [ "readable" ], "id": 8 }, { "acl": [ "readable" ], "id": 9 }, { "acl": [ "readable" ], "id": 65533, "name": "clusterRevision", "value": 3 } ] }, "time": { "attributes": [ { "acl": [ "readable" ], "id": 65533, "name": "clusterRevision", "value": 1 } ] } } }, "242": { "clusters": {}, "bindings": {} } } }

marcorogo commented 10 months ago

Added as new model in the next release. There is however several devices I'm not sure is handled the same way so I keep this open until you can verify the next release support your device without issues.

I have made changes to the driver for the device _TZE204_qasjif9, which needs to be configured by changing the values of "clusters" and "bindings". Additionally, the "fading_time" for this device should be multiplied by 10. I have been testing for a week, and everything seems to be working fine.

"endpoints": {
        "1": {
          "clusters": [
            4,
            5,
            61184,
            0
          ],
          "bindings": [
            25,
            10
          ]
        }
      }
if (changedKeys.includes('fading_time')) {
      this.writeData32(dataPoints.tshpsFadingTime, newSettings['fading_time']*10)
    }
jrgrichter commented 10 months ago

Hello Johan, thank you so match for the great Job!

Greetings Joerg

Von meinem iPhone gesendet

Am 19.01.2024 um 09:47 schrieb marcorogo @.***>:

Added as new model in the next release. There is however several devices I'm not sure is handled the same way so I keep this open until you can verify the next release support your device without issues.

I have made changes to the driver for the device _TZE204_qasjif9, which needs to be configured by changing the values of "clusters" and "bindings". Additionally, the "fading_time" for this device should be multiplied by 10. I have been testing for a week, and everything seems to be working fine.

marcorogo commented 9 months ago

Hi @JohanBendz ! I believe there is a memory leak issue with the _TZE204_qasjif9e sensor. Initially, everything seemed to be working correctly, but after adding 4 more identical devices, I noticed that the app's memory consumption increases to 80MB, and eventually Homey closes the app after several 'memwarn' events. To implement the sensor, I had created a secondary driver and changed the corresponding 'manufacturerName' and 'clusters,' as I mentioned earlier. Observing the logs, I noticed that a large number of messages of this type are constantly received.

2024-02-03T10:55:23.073Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 232,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 52>
}
2024-02-03T10:55:24.640Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 233,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 5d>
}
2024-02-03T10:55:26.237Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 234,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 4a>
}
2024-02-03T10:55:27.838Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 235,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 21>
}
2024-02-03T10:55:29.440Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 236,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 45>
}
2024-02-03T10:55:31.033Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 237,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 23>
}
2024-02-03T10:55:32.636Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 238,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 34>
}
2024-02-03T10:55:34.309Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 239,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 1a>
}
2024-02-03T10:55:34.491Z zigbee-clusters:cluster ep: 1, cl: tuya (61184) received frame response tuya.response {
  status: 0,
  transid: 239,
  dp: 9,
  datatype: 2,
  length: 4,
  data: <Buffer 00 00 01 1a>
}

The more radar devices connected, the more messages are received. Of course, by removing all radars, the app maintains a constant memory around 15-16 MB. I hope this information can be useful to you. Feel free to ask if you need more details.

marcorogo commented 9 months ago

After many searches and attempts, I discovered that these devices spam an infinite number of messages on the Zigbee network, completely congesting it and causing issues. At this point, I would be curious to know if other models also have this problem. For me, they are practically unusable, and I bought 5 of them 😞

flipmoo commented 8 months ago

Hi,

This device (24g version) connects properly to homey, and reads the lux perfactly. Only no response on the presence sensor.. Please help.