{"_id":"586add4b7f27f439005b5780","__v":0,"user":"573b7f42fdc9d320001b777d","category":{"_id":"5859e859e3306d1900126725","project":"568bdc1483d2061900d86cdc","__v":0,"version":"582789aabe5c080f00a5a7fe","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-12-21T02:26:33.525Z","from_sync":false,"order":5,"slug":"edge-server","title":"Edge Server"},"parentDoc":null,"project":"568bdc1483d2061900d86cdc","version":{"_id":"582789aabe5c080f00a5a7fe","__v":10,"project":"568bdc1483d2061900d86cdc","createdAt":"2016-11-12T21:29:14.915Z","releaseDate":"2016-11-12T21:29:14.915Z","categories":["582789abbe5c080f00a5a7ff","582789abbe5c080f00a5a800","582789abbe5c080f00a5a801","582789abbe5c080f00a5a802","582789abbe5c080f00a5a803","582789abbe5c080f00a5a804","582789abbe5c080f00a5a805","582789abbe5c080f00a5a806","582789abbe5c080f00a5a807","582789abbe5c080f00a5a808","5827ea984ca29e0f00137a9e","583df597887db62f00644283","583df5d9c622791900e78da5","5845cd8763c11b250037967d","5845d13063c11b2500379681","5859e859e3306d1900126725","587aeb9a01cf3a0f008359eb","587c422af45e2d0f005e200d","587d84dc82f6f30f004ceee5"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta2","version_clean":"0.0.0","version":"0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-02T23:07:55.080Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"The `droplit-plugin-sonos` plugin allows the Edge to communicate with Sonos speakers. The plugin works with speakers that go through the Sonos bridge as well as those that are connected directly to the local Wi-Fi network.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Speaker groups\",\n  \"body\": \"Sonos speakers have the ability to group speakers together so that the same media may be played through multiple speakers.\\n\\nWhen speakers are grouped, the properties and methods on `BinarySwitch`, `MediaControl`, and `MediaInfo` will be for the group; whereas `AudioOutput` will be for the individual speaker.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Services\"\n}\n[/block]\n## BinarySwitch\nThe `BinarySwitch` service is used to switch a device `on` or `off`.\n\n### properties\n`switch` — The on/off state of the switch. Valid values are `on` and `off`.\n\n### methods\n`switchOn` — Sets switch to `on`.\n`switchOff` — Sets switch to `off`.\n\n## AudioOutput\nThe `AudioOutput` service is used to control the audio of the device.\n\n### properties\n`volume` — The volume level of the device audio. The value is an integer from `0`–`100` representing a percentage.\n`mute` — Whether the device audio is muted. The value is a boolean.\n\n### methods\n`mute` — Mutes the audio.\n`unmute` — Unmutes the audio.\n`stepUp` — Increments the volume by 5 absolute percentage points.\n`stepDown` — Decrements the volume by 5 absolute percentage points.\n\n## MediaControl\nThe `MediaControl` service is used to control the media state of the device.\n\n### properties\n`state` — The playing state of the device. Valid values are `play`, `pause`, and `stop`.\n\n### methods\n`next` — Plays the next track.\n`pause` — Pauses the media.\n`play` — Plays the media.\n`previous` — Plays the previous track.\n\n## MediaInfo\nThe `MediaInfo` service is used display information about media. All properties are ReadOnly.\n\n### properties\n`albumArt` — The URI to the album art for the currently playing album.\n`albumTitle` — Album name of the media’s current track\n`artist` — Artist name of the media’s current track\n`nextAlbumTitle` — Album name of the media’s next track\n`nextArtist` — Artist name of the media’s next track\n`nextTrackName` — Name of the media’s next track\n`trackName` — Name of the media’s current track\n\n## Indicator\nThe `Indicator` service is used to figure out the identity of a physical device through an innocuous action.\n\n### methods\n`blink` — Blinks the light on the Sonos speaker. Note that Sonos speakers do not allow the LED to blink when the volume is set to 0.","excerpt":"A Plugin for talking with Sonos speakers","slug":"plugin-sonos","type":"basic","title":"Sonos Plugin"}

Sonos Plugin

A Plugin for talking with Sonos speakers

The `droplit-plugin-sonos` plugin allows the Edge to communicate with Sonos speakers. The plugin works with speakers that go through the Sonos bridge as well as those that are connected directly to the local Wi-Fi network. [block:callout] { "type": "info", "title": "Speaker groups", "body": "Sonos speakers have the ability to group speakers together so that the same media may be played through multiple speakers.\n\nWhen speakers are grouped, the properties and methods on `BinarySwitch`, `MediaControl`, and `MediaInfo` will be for the group; whereas `AudioOutput` will be for the individual speaker." } [/block] [block:api-header] { "type": "basic", "title": "Services" } [/block] ## BinarySwitch The `BinarySwitch` service is used to switch a device `on` or `off`. ### properties `switch` — The on/off state of the switch. Valid values are `on` and `off`. ### methods `switchOn` — Sets switch to `on`. `switchOff` — Sets switch to `off`. ## AudioOutput The `AudioOutput` service is used to control the audio of the device. ### properties `volume` — The volume level of the device audio. The value is an integer from `0`–`100` representing a percentage. `mute` — Whether the device audio is muted. The value is a boolean. ### methods `mute` — Mutes the audio. `unmute` — Unmutes the audio. `stepUp` — Increments the volume by 5 absolute percentage points. `stepDown` — Decrements the volume by 5 absolute percentage points. ## MediaControl The `MediaControl` service is used to control the media state of the device. ### properties `state` — The playing state of the device. Valid values are `play`, `pause`, and `stop`. ### methods `next` — Plays the next track. `pause` — Pauses the media. `play` — Plays the media. `previous` — Plays the previous track. ## MediaInfo The `MediaInfo` service is used display information about media. All properties are ReadOnly. ### properties `albumArt` — The URI to the album art for the currently playing album. `albumTitle` — Album name of the media’s current track `artist` — Artist name of the media’s current track `nextAlbumTitle` — Album name of the media’s next track `nextArtist` — Artist name of the media’s next track `nextTrackName` — Name of the media’s next track `trackName` — Name of the media’s current track ## Indicator The `Indicator` service is used to figure out the identity of a physical device through an innocuous action. ### methods `blink` — Blinks the light on the Sonos speaker. Note that Sonos speakers do not allow the LED to blink when the volume is set to 0.