Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
456 stars 277 forks source link

Description of additional discover commands. #978

Closed kirovilya closed 1 month ago

kirovilya commented 2 months ago

Allow general commands to be sent through the endpoint.

Later add general device converters and send these commands to the device from the developer console or via MQTT. This is for developers of new converters so that they can find out the attributes of the clusters. Unfortunately, devices do not report all of their attributes and commands. Some don't report anything.

For example:

zigbee2mqtt/0xa4c138b8c414612e/1/set {"discover":{"cluster": 6, "options":{}}}

Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":3,"manufacturerCode":null,"commandIdentifier":13},"Payload":{"discComplete":1,"attrInfos":[{"attrId":65533,"dataType":33},{"attrId":16385,"dataType":33},{"attrId":16386,"dataType":33},{"attrId":32769,"dataType":48},{"attrId":32770,"dataType":48},{"attrId":20480,"dataType":48}]},"Command":{"ID":13,"name":"discoverRsp","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32}]}},"address":41775,"endpoint":1,"linkquality":255,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'

zigbee2mqtt/0xa4c138b8c414612e/2/set {"discoverExt":{"cluster": "manuSpecificTuya_3", "options":{}}}

Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":17,"manufacturerCode":null,"commandIdentifier":22},"Payload":{"discComplete":1,"attrInfos":[{"attrId":53264,"dataType":48,"access":7},{"attrId":53280,"dataType":48,"access":7}]},"Command":{"ID":22,"name":"discoverExtRsp","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"access","type":32}]}},"address":41775,"endpoint":2,"linkquality":232,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
Koenkk commented 1 month ago

Nice refactor, thanks!