JohanBendz / com.tuya.zigbee

MIT License
56 stars 113 forks source link

_TZ3000_gjnozsaz / TS011F smart plug with metering not switching on #732

Open ayhamdabbas opened 4 months ago

ayhamdabbas commented 4 months ago

Device Information

Device Name: Tuya Zigbee Power plug Device ModelID: TS011F Device Description: Smart plug with metering Link to device image: here

Added context

The plugs seem to still provide metering, but not able to switch on remotely (as they were before [v.0.2.25]).

Diagnostics report

Tuya Zigbee diagnostics report id: 3d32dce9-82de-4029-bd17-b36d4c5478c6

The interview

"ids": { "modelId": "TS011F", "manufacturerName": "_TZ3000_gjnozsaz" }, "endpoints": { "endpointDescriptors": [ { "endpointId": 1, "applicationProfileId": 260, "applicationDeviceId": 266, "applicationDeviceVersion": 0, "_reserved1": 1, "inputClusters": [ 3, 4, 5, 6, 1794, 2820, 57344, 57345, 0 ], "outputClusters": [ 25, 10 ] }, { "endpointId": 242, "applicationProfileId": 41440, "applicationDeviceId": 97, "applicationDeviceVersion": 0, "_reserved1": 0, "inputClusters": [], "outputClusters": [ 33 ] } ], "endpoints": { "1": { "clusters": { "identify": { "attributes": [] }, "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" } } ] }, "onOff": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "onOff", "value": false, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 16385, "name": "onTime", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 16386, "name": "offWaitTime", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 32769, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 32770, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 20480, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 32768, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "metering": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "currentSummationDelivered", "value": 292, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 512, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 768, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 771, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 774, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ] }, "electricalMeasurement": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 1285, "name": "rmsVoltage", "value": 226, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1288, "name": "rmsCurrent", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1291, "name": "activePower", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "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": 77 }, { "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": "_TZ3000_gjnozsaz" }, { "acl": [ "readable", "reportable" ], "id": 5, "name": "modelId", "value": "TS011F" }, { "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": {} } } }

JohanBendz commented 4 months ago

Hi @ayhamdabbas, According to the diagnostic report the device acts as it should for a while and then it gets this error: 2024-02-09T13:29:22.009Z zigbee-clusters:cluster ep: 1, cl: electricalMeasurement (2820) received frame readAttributesStructured.response electricalMeasurement.readAttributesStructured.response { attributes: <Buffer 0b 05 00 29 00 00> } 2024-02-09T13:29:22.009Z zigbee-clusters:cluster ep: 1, cl: electricalMeasurement (2820) unknown command received: ZCLStandardHeader { frameControl: Bitmap [ directionToClient, disableDefaultResponse ], trxSequenceNumber: 45, cmdId: 1, data: <Buffer 0b 05 00 29 00 00> } { dstEndpoint: 1 } 2024-02-09T13:29:22.022Z zigbee-clusters:endpoint ep: 1, cl: electricalMeasurement (2820), error while handling frame unknown_command_received { meta: { dstEndpoint: 1 }, frame: ZCLStandardHeader { frameControl: Bitmap [ directionToClient, disableDefaultResponse ], trxSequenceNumber: 45, cmdId: 1, data: <Buffer 0b 05 00 29 00 00> } }

Boechie commented 4 months ago

I saw you asked to change battery, but this is mains powered. Now your comment is gone... :-)

JohanBendz commented 4 months ago

@ayhamdabbas I checked the code and nothing has been changed in this code since quite some time.. @Boechie yeah, no battery in this one.. handled several discussions and mixed them up. 😅

Boechie commented 4 months ago

Hi @ayhamdabbas, According to the diagnostic report the device acts as it should for a while and then it gets this error: 2024-02-09T13:29:22.009Z zigbee-clusters:cluster ep: 1, cl: electricalMeasurement (2820) received frame readAttributesStructured.response electricalMeasurement.readAttributesStructured.response { attributes: <Buffer 0b 05 00 29 00 00> } 2024-02-09T13:29:22.009Z zigbee-clusters:cluster ep: 1, cl: electricalMeasurement (2820) unknown command received: ZCLStandardHeader { frameControl: Bitmap [ directionToClient, disableDefaultResponse ], trxSequenceNumber: 45, cmdId: 1, data: <Buffer 0b 05 00 29 00 00> } { dstEndpoint: 1 } 2024-02-09T13:29:22.022Z zigbee-clusters:endpoint ep: 1, cl: electricalMeasurement (2820), error while handling frame unknown_command_received { meta: { dstEndpoint: 1 }, frame: ZCLStandardHeader { frameControl: Bitmap [ directionToClient, disableDefaultResponse ], trxSequenceNumber: 45, cmdId: 1, data: <Buffer 0b 05 00 29 00 00> } }

Hi @JohanBendz . I have no idea what this error means. Do we need to solve anything for that?

I did manage to get the sockets working (sort of). I think it was an unfortunate coincidence on the same time as your app update. I think 2 of the sockets lost power because of a water leakage (short circuiting and tripping 1 circuit breaker). I guess that this messed up the zigbee network in a severe way. After restoring power I did a PTP of the Homey and needed to repair 3 of the sockets before they started working. I now managed to get them all working again.

There is only 1 thing still: After repairing I reset all the settings of the repaired devices (reporting intervals from 60 to 10 seconds), because all settings went back to their defaults. There is 1 socket that stays slow (reporting after way more than 10 secs). I repaired and reset the settings for that one socket several times now, but its behaviour won't change. Do you have any idea what could cause that?

JohanBendz commented 4 months ago

Good to hear the devices are (mostly) working again, @Boechie. The issue with delayed reports, and even some not starting reporting for several hours or days after a device is included, remains a mystery I am trying to solve. It doesn't affect all devices, and there's not much to work with in terms of diagnostics, similar to the example above.

Regarding the diagnostics mentioned above, there's no need for any action on your part. It appears to be a stochastic issue, and if it resolves itself with the measures you've described, I'm unsure what else we can do. Disconnects, timeouts, etc., are issues that I find challenging to manage within the app. But, I'm actively investigating this issue and have an ongoing dialogue with Athom about these types of problems. If you find anything that resolves the issue or makes it less frequent, please let me know.

@ayhamdabbas, would be good to hear if your are able to solve your problems using the same method Boechie used.

Boechie commented 4 months ago

@JohanBendz Thank you for the reply. I just tested the faulty (slow) socket and it resolved itself over the weekend apparently. It now reports quickly.

Ayham is my colleagues and works in the same office, so when my problem is solved, his is too. :-)

@ayhamdabbas Could you close the issue as solved? Typical case of "It doesn't work. I don't know why. Now it works. I don't know why?" :-D

Boechie commented 4 months ago

@JohanBendz Thank you for the reply. I just tested the faulty (slow) socket and it resolved itself over the weekend apparently. It now reports quickly.

Ayham is my colleagues and works in the same office, so when my problem is solved, his is too. :-)

@ayhamdabbas Could you close the issue as solved? Typical case of "It doesn't work. I don't know why. Now it works. I don't know why?" :-D

@ayhamdabbas ?