ClusterClientObj<T>: {
    attributes: AttributeClients<T["features"], T["attributes"]>;
    commands: CommandServers<T["commands"]>;
    endpointId: number;
    events: EventClients<T["events"]>;
    id: ClusterId;
    isAttributeSupported: ((attributeId: AttributeId) => boolean);
    isAttributeSupportedByName: ((attributeName: string) => boolean);
    isCommandSupported: ((commandId: CommandId) => boolean);
    isCommandSupportedByName: ((commandName: string) => boolean);
    isEventSupported: ((eventId: EventId) => boolean);
    isEventSupportedByName: ((eventName: string) => boolean);
    isUnknown: boolean;
    name: string;
    revision: number;
    subscribeAllAttributes: ((options: {
        dataVersionFilters?: {
            clusterId: ClusterId;
            dataVersion: number;
            endpointId: EndpointNumber;
        }[];
        eventFilters?: TypeFromSchema<typeof TlvEventFilter>[];
        isFabricFiltered?: boolean;
        keepSubscriptions?: boolean;
        maxIntervalCeilingSeconds: number;
        minIntervalFloorSeconds: number;
    }) => Promise<void>);
    supportedFeatures: TypeFromPartialBitSchema<T["features"]>;
} & ClientAttributeGetters<T["attributes"]> & ClientGlobalAttributeGetters<T["features"]> & ClientAttributeSetters<T["attributes"]> & ClientAttributeSubscribers<T["attributes"]> & ClientAttributeListeners<T["attributes"]> & CommandServers<T["commands"]> & ClientEventGetters<T["events"]> & ClientEventSubscribers<T["events"]> & ClientEventListeners<T["events"]>

Strongly typed interface of a cluster client

Type Parameters

Type declaration

  • Readonlyattributes: AttributeClients<T["features"], T["attributes"]>

    Attributes of the cluster as object with named keys. This can be used to discover the attributes of the cluster programmatically.

  • Readonlycommands: CommandServers<T["commands"]>

    Commands of the cluster as object with named keys. This can be used to discover the commands of the cluster programmatically.

  • ReadonlyendpointId: number

    Endpoint ID the cluster is on.

  • Readonlyevents: EventClients<T["events"]>

    Events of the cluster as object with named keys. This can be used to discover the events of the cluster programmatically.

  • Readonlyid: ClusterId

    Cluster ID

  • isAttributeSupported: ((attributeId: AttributeId) => boolean)

    Returns if a given Attribute Id is present and supported at the connected cluster server.

      • (attributeId): boolean
      • Parameters

        Returns boolean

  • isAttributeSupportedByName: ((attributeName: string) => boolean)

    Returns if a given Attribute with provided name is present and supported at the connected cluster server.

      • (attributeName): boolean
      • Parameters

        • attributeName: string

        Returns boolean

  • isCommandSupported: ((commandId: CommandId) => boolean)

    Returns if a given Command Id is present and supported at the connected cluster server.

      • (commandId): boolean
      • Parameters

        Returns boolean

  • isCommandSupportedByName: ((commandName: string) => boolean)

    Returns if a given Command with provided name is present and supported at the connected cluster server.

      • (commandName): boolean
      • Parameters

        • commandName: string

        Returns boolean

  • isEventSupported: ((eventId: EventId) => boolean)

    Returns if a given Event Id is present and supported at the connected cluster server.

      • (eventId): boolean
      • Parameters

        Returns boolean

  • isEventSupportedByName: ((eventName: string) => boolean)

    Returns if a given Event with provided name is present and supported at the connected cluster server.

      • (eventName): boolean
      • Parameters

        • eventName: string

        Returns boolean

  • ReadonlyisUnknown: boolean

    Whether the cluster is unknown, means that we do not have types and schema information for it. Most likely no official cluster.

  • Readonlyname: string

    Cluster name

  • Readonlyrevision: number

    Cluster revision

  • ReadonlysubscribeAllAttributes: ((options: {
        dataVersionFilters?: {
            clusterId: ClusterId;
            dataVersion: number;
            endpointId: EndpointNumber;
        }[];
        eventFilters?: TypeFromSchema<typeof TlvEventFilter>[];
        isFabricFiltered?: boolean;
        keepSubscriptions?: boolean;
        maxIntervalCeilingSeconds: number;
        minIntervalFloorSeconds: number;
    }) => Promise<void>)

    Subscribe to all attributes of the cluster. This will subscribe to all attributes of the cluster. Add listeners to the relevant attributes you want to get updates for.

      • (options): Promise<void>
      • Parameters

        • options: {
              dataVersionFilters?: {
                  clusterId: ClusterId;
                  dataVersion: number;
                  endpointId: EndpointNumber;
              }[];
              eventFilters?: TypeFromSchema<typeof TlvEventFilter>[];
              isFabricFiltered?: boolean;
              keepSubscriptions?: boolean;
              maxIntervalCeilingSeconds: number;
              minIntervalFloorSeconds: number;
          }
          • OptionaldataVersionFilters?: {
                clusterId: ClusterId;
                dataVersion: number;
                endpointId: EndpointNumber;
            }[]
          • OptionaleventFilters?: TypeFromSchema<typeof TlvEventFilter>[]
          • OptionalisFabricFiltered?: boolean
          • OptionalkeepSubscriptions?: boolean
          • maxIntervalCeilingSeconds: number
          • minIntervalFloorSeconds: number

        Returns Promise<void>

  • ReadonlysupportedFeatures: TypeFromPartialBitSchema<T["features"]>

    Supported Features of the cluster