Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Send Commands To Clusters Which Share Same Cluster ID #686

Closed
danieledwardgeorgehitchcock opened this issue Mar 28, 2023 · 6 comments

Comments

@danieledwardgeorgehitchcock
Copy link
Contributor

danieledwardgeorgehitchcock commented Mar 28, 2023

There is an existing cluster in Herdsman manuSpecificUbisysDeviceSetup which has a cluster id of 64512

I created a new cluster manuSpecificAssaDoorLock which shares the same cluster id of 64512 or Hex 0xFC00

When trying to send a command to manuSpecificAssaDoorLock using the cluster id (as the cluster name cannot be used as far as I am aware), I get an error response stating that the cluster manuSpecificUbisysDeviceSetup has no command X.

This presents an interesting problem, as these manufacturer specific clusters can have overlapping cluster and command id's that have completely different functions so, cannot be merged together.

Is there a way to control which cluster (i.e. by name) Herdsman (and Z2M) uses?

Error message:

Zigbee2MQTT:debug 2023-03-28 07:33:45: Received MQTT message on 'zigbee2mqtt/0x000d6f0011141333/1/set' with data '{"command":{"cluster":64512,"command":18,"payload":{}}}'
Zigbee2MQTT:debug 2023-03-28 07:33:45: Publishing 'set' 'command' to '0x000d6f0011141333'
Zigbee2MQTT:error 2023-03-28 07:33:45: Publish 'set' 'command' to '0x000d6f0011141333' failed: 'Error: Cluster 'manuSpecificUbisysDeviceSetup' has no command '18''
Zigbee2MQTT:debug 2023-03-28 07:33:46: Error: Cluster 'manuSpecificUbisysDeviceSetup' has no command '18'
    at Object.getCommand (/app/node_modules/zigbee-herdsman/src/zcl/utils.ts:114:19)
    at Endpoint.command (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:781:33)
    at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/converters/toZigbee.js:54:26)
    at Publish.onMQTTMessage (/app/lib/extension/publish.ts:247:52)
    at EventEmitter.emit (node:events:525:35)
    at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:109:22)
    at MQTT.onMessage (/app/lib/mqtt.ts:140:27)
    at WebSocket.<anonymous> (/app/lib/extension/frontend.ts:126:27)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/app/node_modules/ws/lib/websocket.js:1184:20)
@danieledwardgeorgehitchcock danieledwardgeorgehitchcock changed the title Unable To Send Commands To Clusters Which Share Same ID Unable To Send Commands To Clusters Which Share Same Cluster ID Mar 28, 2023
@Koenkk
Copy link
Owner

Koenkk commented Mar 28, 2023

This is indeed a known issue, but why not just use the name instead of ID?

@danieledwardgeorgehitchcock
Copy link
Contributor Author

The frontend (I don't believe) allows for this so I thought this might be a limitation with ZH.. If it isn't, then I will raise it as an issue in that project instead..

@Koenkk
Copy link
Owner

Koenkk commented Mar 28, 2023

It would be better if we indeed allow specifying the cluster name instead of ID in the frontend.

@danieledwardgeorgehitchcock
Copy link
Contributor Author

Closing for now as I will raise it in the frontend project

@danieledwardgeorgehitchcock
Copy link
Contributor Author

danieledwardgeorgehitchcock commented Mar 28, 2023

@Koenkk - I am re-opening this issue as it appears that there is an issue with ZH. Please see attached log which shows the error response when using the cluster name instead of its id in an MQTT explorer message:

Zigbee2MQTT:debug 2023-03-28 13:23:46: Received MQTT message on 'zigbee2mqtt/0x000d6f0011141333/1/set' with data '{"command":{"cluster":"manuSpecificAssaDoorLock","command":18,"payload":{}}}'
Zigbee2MQTT:debug 2023-03-28 13:23:46: Publishing 'set' 'command' to '0x000d6f0011141333'
Zigbee2MQTT:error 2023-03-28 13:23:46: Publish 'set' 'command' to '0x000d6f0011141333' failed: 'Error: Cluster 'manuSpecificUbisysDeviceSetup' has no command 'getBatteryLevel''
Zigbee2MQTT:debug 2023-03-28 13:23:46: Error: Cluster 'manuSpecificUbisysDeviceSetup' has no command 'getBatteryLevel'
    at Object.getCommand (/app/node_modules/zigbee-herdsman/src/zcl/utils.ts:114:19)
    at Function.create (/app/node_modules/zigbee-herdsman/src/zcl/zclFrame.ts:55:25)
    at Endpoint.command (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:786:36)
    at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/converters/toZigbee.js:54:26)
    at Publish.onMQTTMessage (/app/lib/extension/publish.ts:247:52)
    at EventEmitter.emit (node:events:525:35)
    at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:109:22)
    at MQTT.onMessage (/app/lib/mqtt.ts:140:27)
    at MqttClient.emit (node:events:513:28)
    at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:1547:12)

@Koenkk
Copy link
Owner

Koenkk commented Mar 29, 2023

Fixed!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants