R&D - Sobble

Research and Development

Controlling a Sonos from your smartwatch

 

Sonos-pebble-watch

Our Sonos speakers are on all-day, every day. The thought of controlling these wireless speakers from our wrists seemed a natural experience progression. 

Whilst we love our Sonos speakers more than beer (well, that's not entirely true, but it's close). One of the main experience let downs is around controlling playback of the music. You can either open the app on your smartphone (which involves a number of clicks and swipes) or press the button on top. Sure a physical button is great, but this is a wireless speaker. I want the simplicity of a single button press, but without the "arduous" task of having to actually walk to the speaker.

Our solution was to develop a Sonos app for the Pebble Watch. We could then use the watch's buttons to play/stop/mute Sonos.

The Technology

Unfortunately for us, at the time, Sonos didn't offer an open API to control their devices with - although they are now. Presumably, this is because it's fundamentally a local experience. If you want to listen to music, then you need to be near the speakers. However, after some investigation, we found out the speakers use SOAP to communicate, with a number of local service endpoints to provide remote speakers with information about the network configuration and other such information. We now had the ability to query the Sonos system about itself, get the necessary speaker IPs, and issue commands. Great. But only via terminal.

The other gotcha was the Pebble tech stack. The watch apps were written in C++, but on button interaction simply issued commands to relevant event observers running on the Pebble app installed on your linked phone, this in turn then called javascript events listening in for the watch interaction events. 

In the end, we wrote a fairly complex javascript application that ran on the Pebble app. This had a number of initiation handlers that established connections with the local Sonos system and gained necessary speaker information. Then, on interaction with the Pebble watch, this would issue the relevant commands to the speakers on the system. The result was we could press a button on our wrist and this would start music playing. Fantastic!


The Launch

 The promotion banner

The promotion banner

We launched the app on the Pebble store and gained instant interest. Unsurprisingly, many Pebble owners were also Sonos owners. 

Features

  • Change between each Sonos zone
  • Skip, play, pause, mute and unmute
  • Pause all Sonos zones
  • 'Auto-find' Sonos zones (as long as it's connected subnet 192.168.0.*)

OTHER WORK