Thursday, November 21, 2013

Web Controller/API for Sonos System

There is node.js Sonos API and web controller interface being written by Jishi over at the Sonos forums. You can follow development and report bugs in this thread on the Sonos forums.

The webcontroller is still under development and has some issues with queues at the moment, but the primary features such as grouping, play/stop/etc and volume seem to work correctly. You can see from the screenshot below it appears a clone of the desktop controller and looks great!


Screenshot of the current state of the web based Sonos controller.
This was my first real foray into node.js and git platforms, something I had somehow managed to avoid until now. I wanted to run the web server on my old Drobo-FS so I first needed to install git and node.js from droboports.com.

To install I then changed directory to the DroboApps folder and ran the following commands:
  1. git clone https://github.com/jishi/node-sonos-web-controller (download the latest master build from the git repository)
  2. npm install (install all of the required dependancies) 
    Terminal showing installation commands
  3. cd node-sonos-web-controller
  4. node server.js (start the node.js web application)
    Service running. You can see it has automatically detected my zones.

You can update the project to the latest development master at any time by running "git pull" from the node-sonos-web-controller folder.
Issued that I encountered were: 
  1. The default apache installation I had installed on my Drobo-FS was running on port 8080. I just killed it as I wasn't using it anyway.
  2. I received "http not found" errors when trying to run "npm install" to get the required modules. Most likely this was a Drobo git/SSL build specific issue and I managed to bypass it with the following command: "git config --global http.sslVerify false"
It's a great project, I'm looking forward to seeing how far they go with it and if eventually new features are even added, such as requiring a PIN code, party mode etc.

No comments:

Post a Comment