Custom cluster reports no attributes

Hi, I’ve implemented a custom cluster for the device, and I can send commands perfectly fine on the new cluster. Like the setAreaLight command is processed correctly when called on the cluster. I tried removing and readding the device twice.

'use strict';

const { ZCLDataTypes, Cluster } = require('zigbee-clusters');

const ATTRIBUTES = {
  chargerStatus: {
    id: 0x0000,
    type: ZCLDataTypes.enum8({
      0x00: 'Idle',
      0x01: 'Charging',
      0x02: 'Charged',
      0x03: 'Fault',
    }),
  },
  ...
  tagID: { id: 0x000F, type: ZCLDataTypes.string },
  ...
};

const COMMANDS = {
  ...
  setAreaLight: {
    id: 0xC2,
    args: {
      state: ZCLDataTypes.enum8({
        0x00: 'Off',
        0x01: 'On',
      }),
    },
  },
 
  ...
};

class NewDeviceCluster extends Cluster {

  static get ID() {
    return 0xF12C;
  }

  static get NAME() {
    return 'newDeviceName';
  }

  static get ATTRIBUTES() {
    return ATTRIBUTES;
  }

  static get COMMANDS() {
    return COMMANDS;
  }

}

module.exports = QudoChargerCluster;

I had to add it as a capability like this

{
  "type": "boolean",
  "title": {"en" :  "new device name"},
  "units": {"en" : ""},
  "getable": true,
  "setable": false,
  "uiComponent": null,
  "uiQuickAction": false,
  "icon": "/assets/icon.svg"
}

Calling the cluster like this to see what attributes I could work with…

 const attributes = await zclNode.endpoints[1].clusters.newDeviceName.discoverAttributes();
    this.log('Attributes:', attributes);

    const result = await zclNode.endpoints[1].clusters.newDeviceName.readAttributes([
      'chargerStatus',
    ]).catch((err) => {
      this.error(err);
    });

But for some reason I just get empty data back. All of these attributes should have read permissions on them.

  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) send frame ZCLStandardHeader {
  frameControl: [],
  data: newDeviceName.discoverAttributes { startValue: 0, maxResults: 255 },
  cmdId: 12,
  trxSequenceNumber: 1
} +1ms
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) received frame discoverAttributes.response newDeviceName.discoverAttributes.response {
  lastResponse: true,
  attributes: []
} +460ms
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) discover attributes [] +0ms
2024-06-13T12:54:45.959Z [log] [Homey:665877af2fb1e463cd51143e] [ManagerDrivers] [Driver:qudo] [Device:2ba120f3-5f85-4412-b4dd-435646a9f32a] Attributes: []
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) read attributes [ 0 ]  +1ms
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) send frame ZCLStandardHeader {
  frameControl: [],
  data: newDeviceName.readAttributes { attributes: [ 0 ] },
  cmdId: 0,
  trxSequenceNumber: 2
} +0ms
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) received frame readAttributesStructured.response newDeviceName.readAttributesStructured.response {
  attributes: <Buffer 00 00 86>
} +404ms
  zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) read attributes result { attributes: <Buffer 00 00 86> } +0ms
2024-06-13T12:54:46.363Z [log] [Homey:665877af2fb1e463cd51143e] [ManagerDrivers] [Driver:qudo] [Device:2ba120f3-5f85-4412-b4dd-435646a9f32a] Connector lock state: {}

@AndreasQlight reading the debug log, the device is reporting back that attribute 0 on cluster 61770 and endPoint 1 is an unsupported Attribute:

zigbee-clusters:cluster ep: 1, cl: newDeviceName(61740) received frame readAttributesStructured.response newDeviceName.readAttributesStructured.response {
  attributes: <Buffer 00 00 86>

As per the Zigbee specifications:

UNSUPPORTED_ATTRIBUTE 0x86 The specified attribute does not exist on the device

I guess that the attribute ID or type as specified is not correct.

I don’t have access to a Qudo Charger manual to point to the right definition.

In certain cases, manufacturer specific attributes require to add “manufacturerId” key to the attribute definition. That could resolve your problem.