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

Ubisys D1/S2 errors with Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist #22610

Closed
adriaandotcom opened this issue May 13, 2024 · 10 comments · Fixed by Koenkk/zigbee-herdsman-converters#7532
Labels
problem Something isn't working

Comments

@adriaandotcom
Copy link

adriaandotcom commented May 13, 2024

What happened?

When trying to set config with (zigbee2mqtt/0x001fee0000008009/set) this payload:

{
    "configure_device_setup": {
        "input_action_templates": [
            {
                "//_comment": "will automatically use endpoint 1",
                "type": "dimmer_double"
            }
        ]
    }
}
The same happens with this config (which I copied from an already set up Ubisys D1)
{
    "configure_device_setup": {
        "input_actions": [
            [
                0,
                7,
                2,
                6,
                0,
                1
            ],
            [
                0,
                6,
                2,
                8,
                0,
                5,
                0,
                50
            ],
            [
                0,
                11,
                2,
                8,
                0,
                3
            ],
            [
                1,
                7,
                2,
                6,
                0,
                0
            ],
            [
                1,
                6,
                2,
                8,
                0,
                5,
                1,
                50
            ],
            [
                1,
                11,
                2,
                8,
                0,
                3
            ]
        ],
        "input_configurations": [
            0,
            0
        ]
    }
}

I get:

[2024-05-13 06:57:08] error: 	z2m: Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'

It didn't previously happen for 2 other D1 devices I have (the other devices did error sometimes - don't have the logs anymore - so I upgraded z2m to the latest version to prevent submitting issues of an older version). I tried with a brand-new device, same issue. Tested with an S2 as well, same issue.

What did you expect to happen?

It would allow me to use configure_device_setup without erorrs.

How to reproduce it (minimal and precise)

  • Reset Ubisys D1
  • Update to latest version 2.4.0
  • Remove from z2m
  • Reset Ubisys D1
  • Adopt again
  • Sent configure_device_setup command

Zigbee2MQTT versions

  • 1.37.1
  • 1.37.1-dev commit: 09e51e0

Adapter firmware version

0x26580700

Adapter

ConBee II

Setup

Add-on on Home Assistant OS on Intel NUC

Debug log

[2024-05-13 06:36:52] info: 	z2m: Zigbee: allowing new devices to join.
[2024-05-13 06:36:55] info: 	zh:controller: Interview for '0x001fee0000008009' started
[2024-05-13 06:36:55] info: 	z2m: Device '0x001fee0000008009' joined
[2024-05-13 06:36:55] info: 	z2m: Starting interview of '0x001fee0000008009'
[2024-05-13 06:36:57] info: 	zh:controller: Succesfully interviewed '0x001fee0000008009'
[2024-05-13 06:36:57] info: 	z2m: Successfully interviewed '0x001fee0000008009', device has successfully been paired
[2024-05-13 06:36:57] info: 	z2m: Device '0x001fee0000008009' is supported, identified as: Ubisys Universal dimmer D1 (D1)
[2024-05-13 06:36:57] info: 	z2m: Configuring '0x001fee0000008009'
[2024-05-13 06:36:58] info: 	z2m: Successfully configured '0x001fee0000008009'
[2024-05-13 06:38:02] info: 	z2m: Zigbee: disabling joining new devices.
[2024-05-13 06:38:56] info: 	z2m: Changed config for device 0x001fee0000008009
[2024-05-13 06:38:58] info: 	z2m: Changed config for device 0x001fee0000008009
[2024-05-13 06:39:38] error: 	z2m: Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'
[2024-05-13 06:39:59] info: 	z2m: Checking if update available for '0x001fee0000008009'
[2024-05-13 06:40:00] info: 	z2m: No update available for '0x001fee0000008009'
[2024-05-13 06:40:27] error: 	z2m: Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'
[2024-05-13 06:44:40] error: 	z2m: Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'
[2024-05-13 06:53:27] info: 	z2m: Successfully changed options
[2024-05-13 06:57:08] error: 	z2m: Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'

Found some more debug info:

error 2024-05-13 15:15:08Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'
debug 2024-05-13 15:15:08 
Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist
    at getClusterDefinition (/app/node_modules/zigbee-herdsman/src/zcl/utils.ts:72:19)
    at Object.getCluster (/app/node_modules/zigbee-herdsman/src/zcl/utils.ts:177:29)
    at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/src/devices/ubisys.ts:314:43)
    at Publish.onMQTTMessage (/app/lib/extension/publish.ts:259:52)
    at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:23)
    at EventEmitter.emit (node:events:529:35)
    at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:115:22)
    at MQTT.onMessage (/app/lib/mqtt.ts:141:27)
    at MqttClient.emit (node:events:517:28)
    at handlePublish (/app/node_modules/mqtt/src/lib/handlers/publish.ts:172:11)
debug 2024-05-13 15:15:08MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'configure_device_setup' to '0x001fee0000008009' failed: 'Error: Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist'","meta":{"friendly_name":"0x001fee0000008009"},"type":"zigbee_publish_error"}'

Maybe this commit in Koenkk/zigbee-herdsman-converters src/devices/ubisys.ts is related?

@adriaandotcom adriaandotcom added the problem Something isn't working label May 13, 2024
@sjorge
Copy link
Sponsor Contributor

sjorge commented May 13, 2024

@Koenkk could this be the race again were the customClusters are not yet added ?

The D1 should have it, as it has the correct extend: https://github.com/Koenkk/zigbee-herdsman-converters/blob/f5ed0bfb5508a28efe507fff8d2578f39c0db4f1/src/devices/ubisys.ts#L832

@adriaandotcom adriaandotcom changed the title Ubisys D1 errors with Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist Ubisys D1/S2 errors with Cluster with name 'manuSpecificUbisysDeviceSetup' does not exist May 13, 2024
@Koenkk
Copy link
Owner

Koenkk commented May 14, 2024

@sjorge I don't think so, it's happening even 20 secs after z2m startup.

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 14, 2024

@sjorge I don't think so, it's happening even 20 secs after z2m startup.

So that would mean they don't get added at all then, somehow 🤔

@adriaandotcom
Copy link
Author

Can I help with more debugging info? I have ~30 Ubisys devices lying around :)

When running generated_external_definition I get:

const {deviceEndpoints, identify, onOff, electricityMeter, commandsOnOff, commandsLevelCtrl, commandsColorCtrl} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['D1 (5503)'],
    model: 'D1 (5503)',
    vendor: 'ubisys',
    description: 'Automatically generated definition',
    extend: [deviceEndpoints({"endpoints":{"1":1,"2":2,"3":3,"4":4,"232":232}}), identify(), onOff({"powerOnBehavior":false}), electricityMeter(), commandsOnOff({"endpointNames":["2","3"]}), commandsLevelCtrl({"endpointNames":["2","3"]}), commandsColorCtrl({"endpointNames":["2","3"]})],
    meta: {"multiEndpoint":true},
};

module.exports = definition;

Both model and zigbeeModel have the (5503) in them, but I don't see that in src/devices/ubisys.ts#L764. Not sure if relevant.

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 17, 2024

It matches on this line https://github.com/Koenkk/zigbee-herdsman-converters/blob/010319fc669fbdc2d7ef9ad3aa12ee4f3c540a0e/src/devices/ubisys.ts#L763

The D1 and R0 are the only devices I don't have and I can't replicate with my S1/S2/J1 which get the clusters extended the same way.

I'm not sure what is wrong, my guess would be the modernExtend somehow not adding the cluster.

@Koenkk is there and easy way to check on a running instance?

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 17, 2024

I'm able to replicate on latest dev, it was fine right after i merged the change though 🤷

I won't have time this weekend to dig further, but should have some time on monday.

I don't immediately see what would break it. I wonder if it somehow has to do with not setting a
manufacturer code for that cluster. The other ubisys ones do set it

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 17, 2024

@Koenkk I have a theory:

https://github.com/Koenkk/zigbee-herdsman-converters/blob/010319fc669fbdc2d7ef9ad3aa12ee4f3c540a0e/src/devices/ubisys.ts#L314

We pass {} as the 3rd argument, I believe it's calling:
https://github.com/Koenkk/zigbee-herdsman/blob/a2bede94b93fbbb35236d71aeeada1a8533268ba/src/zspec/zcl/utils.ts#L232-L236

So the 3rd argument would be customClusters ... so we're passing a empty list of customClusters, so that is why the call doesn't find it? (I'm not usual dev setup so I can't test this)

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 18, 2024

@adriaandotcom Seems my theory from yesterday was correct, Koenkk/zigbee-herdsman-converters#7532 should fix this.

@adriaandotcom
Copy link
Author

Amazing. Can I test with the dev branch?

@sjorge
Copy link
Sponsor Contributor

sjorge commented May 20, 2024

It got merged into zhc, and there has been a zhc release, so I think it should be in dev already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants