Source code here: https://github.com/jishi/node-sonos-http-api
Sonos Web Controller draft (work in progress!): https://github.com/jishi/node-sonos-web-controller
Sonos IR control (requires lircd and IR reciever): https://github.com/jishi/node-sonos-remote-control
I know that there already is an attempt at this by this guy: http://forums.sonos.com/showthread.php?t=32643
, but I found it to be a bit lacking in functionality so I decided to write up my own.
I have created a simple web-based API using what I have, which could be useful for integrating stuff with other applications. This web based API is inspired by other RESTful APIs, however I don't think it follows the correct guidelines to be called a REST API.
IT supports most basic features like:
play, pause, seek, next, prev, volume, mute, setAVTransportURI
It also supports these advanced fatures:
State of player as JSON, zone info as JSON, Play favorite item, presets (grouping, volume, avTransportURI)
You can read more in the README for each project.
To run it as a service under linux, I suggest using pm2 (https://github.com/Unitech/pm2
). You need to run it in forked mode (-x)!
For Windows, you might try Winser http://jfromaniello.github.io/winser/