Appearance
traits/speaker.proto
Table of Contents
traits/speaker.proto
DescribeVolumeRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
GetSpeakerVolumeRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | fields to fetch relative the the AudioLevel type |
PullSpeakerVolumeRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | fields to fetch relative the the AudioLevel type | |
updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullSpeakerVolumeResponse
Field | Type | Label | Description |
---|---|---|---|
changes | smartcore.types.AudioLevelChange | repeated | Changes since the last message |
UpdateSpeakerVolumeRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to update the state for | |
volume | smartcore.types.AudioLevel | The updated volume value | |
delta | bool | Only supported for AudioLevel.gain. Update the value relative to the current value. | |
update_mask | google.protobuf.FieldMask | The fields we intend to update relative to the AudioLevel type |
VolumeSupport
VolumeSupport describes the capabilities of devices implementing this trait
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis | |
volume_attributes | smartcore.types.FloatAttributes | Attributes associated with the gain property of the speaker. Note that a step value that is the same as the bounds implies that the speaker only supports mute | |
mute_support | smartcore.types.MuteSupport | How is mute implemented by the device. Can help to customise behaviour of interfaces to the device, e.g. by disallowing gain change when muted |
SpeakerApi
Trait for devices that support some kind of audio output. The most basic is a simple on/off speaker, it's optional to support volume adjustment on a scale.
For the sakes of this trait "volume" means the combination of a gain and a mute state.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetVolume | GetSpeakerVolumeRequest | .smartcore.types.AudioLevel | Get the current state of the volume for the device |
UpdateVolume | UpdateSpeakerVolumeRequest | .smartcore.types.AudioLevel | update the volume state for the device |
PullVolume | PullSpeakerVolumeRequest | PullSpeakerVolumeResponse stream |
SpeakerInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeVolume | DescribeVolumeRequest | VolumeSupport | Get information about how a named device implements volume features |