If the parameter is required and it is missing, or ignored due to an incorrect type, you will receive an ERROR_MISSING_PARAMETER. So if your integration sends a parameter with a value of “”, Sonos ignores it. For example, null is not an accepted type. Sonos ignores parameter values of the wrong type. The Control API requires some parameters and some are optional. Likewise, parameters that must have strings can accept these strings as numbers. Parameters that must have numbers can accept these numbers as strings (for example, volume). Players also accept custom object types, such as playback objects. For example, the muted parameter in the setMute command requires a boolean value. This can be a string, number, boolean, null, object, or array. While JSON is not type-specific, Control API parameters must have specific types for their values. The Sonos Control API uses HTTP for routing and JSON in the body of the request for including additional parameters, if any. See Discover to learn how to find households, groups, and players. Players must be part of the same household to be part of a group. Transport controls, such as play, pause, skip to next track, and skip to previous track, target groups rather than individual players. Users can easily move players from one group to another without interrupting playback. All players in a group play the same audio in synchrony. Sonos players are always in groups, even if the group has only one player. If all of the players in a household are moved to a different network, the householdId will remain the same. For example, if a user moves some players from a household to a different network, the players that were moved will use a different householdId. The value will change if players are moved to a different network. The householdId is stable with one exception. Users can add and remove players from a household.Įach household is represented by a householdId. For example, one household may represent an owner’s home system, while another may represent their vacation home system. An account can include multiple households. It also allows these owners to authenticate with third-party clients such as your integration.Ī household is a set of players on the same network under an account. We look forward to how you’ll use it to deliver the ultimate home music experience.Ī Sonos account includes product registration and contact information about the owner of a Sonos system. This overview will guide you through the structure of the Control API. Players broadcast events to subscribed clients with information about the state of the Sonos system. The protocol consists of commands and events. A player can be an all-in-one smart speaker such as the One or a device, such as the Amp, that sends audio to connected speakers. The Sonos Control API is a JSON-based application protocol for controlling audio playback on Sonos players.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |