Git Product home page Git Product logo

sonos-api's Introduction

Sonos-API

Description

sonos-api is a easy and simple http api gatway to control the Sonos devices in the network.

The code is based on:

For compatibility it mimics the API of node-sonos-http-api by jishi

Installation

Sonos API is available as a Docker image, install with the following Docker command:

docker pull rdweerd/sonos-api

After installation the service is running on port 80

Usage

Swagger file http://<sonos-api>/docs

Currently supported endpoints:

/
/zones
/playall
/pauseall
/resumeall
/{zone_name}
/{zone_name}/{action}/{parameter}

Actions

/zones

Any call to http://:80/ and http://:80/zones will rescan the network for new Sonos devices and return all the zone information

/<zone_name>

Returns the info of a specific zone

Zone actions

Currently supported zone actions:

next

Next item in the queue

pause

Pauses playout

play

Starts playout

previous

Previous item in the queue

volume

Changes the volume of the zone. The parameter is absolute or relative. If the volume is prefixed with +/- it will be treated as a relative volume change

Examples:

/<zone_name>/volume/10      Sets the volume to 10 percent
/<zone_name>/volume/+10     Increases the volume with 10 percent
/<zone_name>/volume/-10     Decreases the volume with 10 percent

groupVolume

Changes the volume of the group where this zone is part of. The parameter is absolute or relative. If the volume is prefixed with +/- it will be treated as a relative volume change

Examples:

/<zone_name>/groupVolume/10      Sets the volume to 10 percent
/<zone_name>/groupVolume/+10     Increases the volume with 10 percent
/<zone_name>/groupVolume/-10     Decreases the volume with 10 percent

mute/option

Available values : on, off, toggle

groupMute/option

Available values : on, off, toggle

join/<zone_master>

Joins the zone into the zone_master

/<zone_name>/join/<zone_master>

leave

Leaves the group

favorites

list the favorites

queue

Returns the player queue

shuffle/option

Available values : on, off, toggle

repeat/option

Available values : on, off, toggle, one

play_mode/option

Available values : normal, shuffle_norepeat, shuffle, repeat_all, shuffle_repeat_one, repeat_one

favorite/

Selects and playes a favorite. Currently tested with Spotify playlists, TuneIn stations and deezer playlists

play_uri/

Plays uri (very experimental)

sonos-api's People

Contributors

richarddeweerd avatar tbard1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.