April 29, 2012 at 12:00 am

SoCo Frees Sonos Digital Music System for Web, Text-Message Control

soco music hack day sydney 2012 rahim sonawalla rovi


SYDNEY, AUSTRALIA — When Sonos released an API to let developers build music apps that could talk to its excellent line of connected speakers for the home, we expected a deluge of neat stuff, but it never showed.

That changed this weekend, with the creation of SoCo (pictured above) and SonoShell (below), whose potential for music fans is not only evident, but whose underpinnings will let other app developers make even more clever helper apps to let owners of Sonos digital music systems get more out of their hardware investments.

Rahim Sonawalla, product manager at Rovi, built these apps at Music Hack Day Sydney on top of the Sonos API to give people more ways to send music to their Sonos systems, other than using the official player software — even by sending text messages to the speakers.

First, he had to hack the Sonos controller.

sonoshell music hack day sydney

SonoShell is the command-line-interface version of Sonawalla's creation. It lets hacker-y programmer-y types send commands like Play, Pause, and Next (skip) to their Sonos machines without firing up the usual software.

“They’ve never documented the API for the controller itself, so you can’t control the Sonos,” Sonawalla told Evolver.fm. “This weekend I basically sat down with a packet sniffer and reverse-engineered their client to figure out how to create a controller.” After that, he was able to create the SonoShell command-line interface pictured to the right, which lets you control playback and request music about the currently-playing song.

After that, he said, it’s a simple matter of writing code to create apps that can activate the Sonos as an alarm clock in the morning, control it with a web interface like the SoCo one he built this weekend (pictured above).

“The Sonos controller right now is just a native app, so there’s not a lot of functionality,” explained Sonawalla. “With a web app, people can build extras that tie into it. The Favorite button [in SoCo] automatically adds it to an Rdio playlist for all your favorites from Sonos.”

SoCo also includes artist information and reviews from Rovi, in addition to web-based buttons for Play, Skip, Rewind, and so on, but that’s just the beginning, now that Sonawalla has figured out how to control Sonos — an ability he intends to give other programmers by releasing his code so they can use it too.

“Because we’re now controlling it without going through the native app, we can do things the native app can’t do,” said Sonawalla. “SoCo is an example of a customized interface that you wouldn’t be able to do with the native app. Another one is that the native Sonos app can only control the Sonos when you’re on the [same] WiFi [network] as the speakers. I’ve also set it up so you can control your Sonos so if you left your house, and you’re like, ‘Aw, I forgot, my music’s still running,’ you could just text Pause, for example, to the phone number of the Sonos.”

In one of the most impressive Music Hack Days we’ve attended, this was a standout. Sonawalla intends to clean up his documentation and code and make it available to future Hack Day attendees. We expect even more neat Sonos apps to emerge (finally) as a result.

Read Evolver.fm’s full coverage of Music Hack Day Sydney.