Giter Site home page Giter Site logo

sonos's Introduction

SonosUPnP

This library makes interfacing an Arduino with your Sonos system a breeze. The library supports both controlling and reading the state of your Sonos components. Playing URIs, files, online radio stations, playlists, and line-in is supported as well as the most common commands like play, pause, skip, mute, volume and speaker grouping. What sets this library apart from similar libraries written for the Arduino platform it its ability to read the state of most of the Sonos functions: getting source, player state, track number, track position, volume and more. The library is relatively compact and has a small enough memory footprint to run on the Arduino Uno and Duemilanove.

ESP8266:
For an ESP8266 port, have a look this fork: github.com/antonmeyer/sonos

Getting Started:

Note:
If you download the libraries as ZIP files from GitHub, "-master" will be added to the end of the file names. You need to rename the files, such that e.g. "microxpath-master.zip" becomes "microxpath.zip", before adding the libraries to your Ardiono libraries folder.

Arduino Example Sketch:
In the Arduino example sketch I've implemented a simple serial protocol that allows executing some of the Sonos commands that are supported by the library. Here's a list of supported commands:

pl = Play
pa = Pause
st = Stop
pr = Previous track
nx = Next track
fi = Play test file (file path must be changed for this to work)
ht = Play http stream (you need access to the music service WIMP)
ra = Play radio (works if your speakers are connected to the internet)
li = Play line in (only works if the device has an AUX input)
gr = Group speakers (Living Room, Bathroom and Bedroom)
ug = Ungroups speakers
re = Toggle repeat
sh = Toggle shuffle
lo = Toggle loudness
mu = Toggle mute
52 = Set volume level 52 (range is 00 - 99)
b5 = Set bass level -5 (range is 0 to -9)
B5 = Set bass level +5 (range is 0 to +9)
t3 = Set treble level -3
T0 = Set treble level normal

sonos's People

Contributors

tmittet avatar

Watchers

 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.