This defines conformance to the Speaker device type. This feature controls the speaker volume of the device.

To control unmute/mute, the On/Off cluster shall be used. A value of TRUE for the OnOff attribute shall represent the volume on (not muted) state, while a value of FALSE shall represent the volume off (muted) state. For volume level control, the Level cluster shall be used.

A dedicated endpoint is needed because the On/Off cluster can also be used for other purposes, such as for power control.

The decision to use Level and On/Off clusters for volume (rather than defining a new audio control cluster) was made in order to treat volume in a fashion consistent with lighting which also uses these clusters and has matching functional requirements.

MatterSpecification.v13.Device § 10.4

interface SpeakerDevice {
    behaviors: {
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    };
    defaults: StateOf<{
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }>;
    deviceClass: DeviceClassification;
    deviceRevision: number;
    deviceType: DeviceTypeId;
    name: "Speaker";
    requirements: typeof SpeakerRequirements;
    set(defaults: InputStateOf<{
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }>): With<For<{
        behaviors: {
            onOff: typeof OnOffServer;
        } & {
            levelControl: typeof LevelControlServer;
        };
        deviceRevision: 1;
        deviceType: 34;
        name: "Speaker";
        requirements: typeof SpeakerRequirements;
    }>, {
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }>;
    with<const BL>(...behaviors: BL): With<For<{
        behaviors: {
            onOff: typeof OnOffServer;
        } & {
            levelControl: typeof LevelControlServer;
        };
        deviceRevision: 1;
        deviceType: 34;
        name: "Speaker";
        requirements: typeof SpeakerRequirements;
    }>, With<{
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }, BL>>;
}

Hierarchy (view full)

Properties

behaviors: {
    onOff: typeof OnOffServer;
} & {
    levelControl: typeof LevelControlServer;
}
defaults: StateOf<{
    onOff: typeof OnOffServer;
} & {
    levelControl: typeof LevelControlServer;
}>

Access default state values.

deviceRevision: number
deviceType: DeviceTypeId
name
requirements: typeof SpeakerRequirements

Methods

  • Define an endpoint like this one with different defaults. Only updates values present in the input object.

    Parameters

    Returns With<For<{
        behaviors: {
            onOff: typeof OnOffServer;
        } & {
            levelControl: typeof LevelControlServer;
        };
        deviceRevision: 1;
        deviceType: 34;
        name: "Speaker";
        requirements: typeof SpeakerRequirements;
    }>, {
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }>

  • Define an endpoint like this one with additional and/or replacement server behaviors.

    Type Parameters

    • const BL extends List

    Parameters

    • Rest...behaviors: BL

    Returns With<For<{
        behaviors: {
            onOff: typeof OnOffServer;
        } & {
            levelControl: typeof LevelControlServer;
        };
        deviceRevision: 1;
        deviceType: 34;
        name: "Speaker";
        requirements: typeof SpeakerRequirements;
    }>, With<{
        onOff: typeof OnOffServer;
    } & {
        levelControl: typeof LevelControlServer;
    }, BL>>