This page last changed on Aug 16, 2013 by hank.


1. Download and Install Node.js for your OS.

2. Download "Sonos HTTP API" Node server

Installation instructions

Start by fixing your dependencies. Invoke the following command:

npm install

This will download the necessary dependencies if possible (you will need git for this)

start the server by running

node server.js

Now you can control your system by invoking the following commands:

http://localhost:5005/{room name}/{action}[/{parameter}]
http://localhost:5005/living room/volume/15(will set volume for room Living Room to 15%)
http://localhost:5005/living room/volume/+1(will increase volume by 1%)
http://localhost:5005/living room/next(will skip to the next track on living room, unless it's not a coordinator)
http://localhost:5005/living room/pause(will pause the living room)

The actions supported as of today:
• play
• pause
• volume (parameter is absolute or relative volume. Prefix +/- indicates relative volume)
• seek (parameter is queue index)
• next
• previous
• state (will return a json-representation of the current state of player)

3. Setup OpenRemote to handle SONOS commands
Create HTTP commands in OR designer for all necessary controls you need like: play, pause, next, vol + etc.

These commands can now be connected to a button in Openremote.

Please note!
For command "state" also create a sensor and fill in JSONPath Expression to display requested info with a label in OR.

Example of a state json:

    "currentTrack": {
        "artist":"The Low Anthem",
        "title":"Charlie Darwin",
        "album":"Rough Trade - Counter Culture 2008",

4. To connect physical KNX buttons with Sonos commands
Create a command that's listening at the KNX bus for changes in the group address of that specific button, also create a sensor connected to the command.

Create a rule for each function of the button

That´s it!

Instructions made by Henrik Gjörloff

Special thanks to Jimmy Shimizu (jishi) creating the SONOS HTTP API.

rule.JPG (image/jpeg)
knx.png (image/png)
http.png (image/png)

Excellent, thanks.
What about moving this forum page into the documentation?

Posted by yannph at Aug 17, 2013 08:42

Hi Henrik, indeed great. As Yann Philippe suggests, would you be interested to creating a 'How to...Sonos' page as part of documentation?

Posted by pierre kil at Aug 18, 2013 11:23

Hi Pierre

Just give me the guidelines and i would be happy to do that!

Best Regards
Henrik Gjörloff

Posted by hank at Aug 19, 2013 09:12

Hi Henrik, thanks for the offer! We set-up a page: OpenRemote 2.0 How To - Sonos. It is an example of another product, but it shows the typical set-up. You should have access to edit it. So my suggestion is to just start from here and edit it. If you want to chat more about it, just e-mail me at pierreatopenremotedotorg

Posted by pierre kil at Aug 19, 2013 16:02

Hey Guys me Mark.Well i think that's an amazing tutorial along with coding & pics about integrate sons with open remote.Thanks!!

cross bridge load cells

Posted by markspend01 at Aug 21, 2013 19:53
Document generated by Confluence on Jun 05, 2016 09:30