I am so glad this is happening — for the hack value itself, but also because a genuinely useful application might result.
I love Sonos, their devices are way ahead of the competition. But their app just plain sucks. What is the most important function of a remote control app? Adjusting volume — and yet the useful range for the volume control occupies less than a percent of the entire touchscreen. It is very difficult to adjust the volume. And Sonos gives you no way to set the useful range, so you often end up blasting your ears with monstrously loud music, because you didn't tap the control just right.
This has been reported to Sonos numerous times and yet we still have to suffer with the crippled volume control.
The volume control is pretty bad, but the insult added to that injury is that it actually used to be better. You used to be able to click anywhere in the range and jump right to that spot on the range.
Further, it is not very granular at all. If you have a playbar, you may have noticed that the difference between mute and the very next volume up from mute is pretty high.
Sonos is not going to fix any of this. They do not care about your complaints about the app. People have been complaining and filing bug reports and pointing out simple UI improvements for years and it does nothing. They have made it clear that they do not care.
I am an early adopter (2005) and own about 12 of these devices and I have been disappointed and dismayed by the UI and the capability of their apps since day one.
The author didn't look very hard. Their API is documented (more or less) at http://musicpartners.sonos.com/. It's more descriptive via language than laying out all end points. Registration is required.
After initial UPnP search, you get a URL for a descriptive xml file. Sonos operates over the SOAP protocol.
If you want your client to be notified of changes, you have to subscribe to each event type with a max of 3600 second timeout, then resubscribe. It's not necessary but the system supports unsubscribing too.
One specific thing you have to hack is this. If you want to switch to a different music service, you have to include the user id used to sign into that service (Pandora, Rdio, etc). This data is returned in a base64 encoded, encrypted blob. There's no way to decrypt it unless you can figure out how to crack the key out of the device.
Fortunately you only need the user id. There's another undocumented endpoint that returns some info that includes all the usernames, just no passwords. But it doesn't match the them to their services. You then have to send requests with all combinations of usernames and services and get the responses. Once these are returned, just store the relationships.
I'm writing this from memory, sorry for the specific details. If anyone is interested, contact me through my email in my profile and I'll get the info from some code I wrote recently.
This is awesome. Submissions like this harken back to the early days of Slashdot and things like the CueCat and Linksys router reverse engineering. I'd love to see more of these hardware+software hacks show up on HN.
Indubitably! These kinds of submissions are the only reason why I return to HN daily and wade through the endless submissions that break the off-topic guidelines [1], and yet get upvoted anyways.
I bought a Play:3 a few months back and was also dissatisfied with the given OS X/iOS apps - I'm currently working on enabling AirPlay support for Sonos devices. (http://stephen.github.io/airsonos/)
Holy crap, this is exactly what I've been looking for! Amazing! I hope you plan to continue with this project for some time - I've always wondered why Sonos doesn't do this themselves!
This is awesome. How are you able to do it? The sonos doesn't have native support for it. Lack of airplay and needing a dedicated wireless network was what put me off the sonos.
I was hoping someone was hacking the sonos itself and replacing the software. The hardware looks awesome but the fact that it can't connect to an existing wireless network and that you can't stream live audio to it makes it very limited. I bought one and ended up returning it when I realized I couldn't use it for something basic as sound for a movie on my laptop.
It's not really that novel. When I wrote a Sonos client (2007) there were a few out there already. Getting things working did involve a lot of time in Netmon (nee: Wireshark), and reading UPnP specs.
I created an app using some of nathanborrors work that let's you browse through all of the Sonos Music services (Like Rdio, Spotify, Pandora, iHearRadio, etc). Setup your account, browse through your collections and play them on your system. I should submit a pull request to see if I can get this integrated into this project!
I also have an app on the App Store that turns your Sonos System into a wireless PA system. The current version is a little buggy but an update is coming shortly that makes it
much more stable. You can check it out here:
Coincidentally, I just released a Sonos CLI NPM package over easter [1] that builds on some work done by others [2]. It is targeted primarily at circumventing the Spotify search functionality in the Sonos app, that more often than not times out and fails to give results. I just started using it at the office for quick playback control, and it takes away a lot of the frustration I have with the app.
There are rumours that Sonos are considering opening up their platform to 3rd-party developers. Given they have recently dropped the bridge requirement, and the abundance of AirPlay-compatible speakers (plus WiFi-direct based alternative to Sonos, Panasonic have released one) I think they are perhaps starting to feel the competitive heat. I for one can't wait until Instacast or Downcast can send audio to a Sonos without having to go via an Airport Express as an AirPlay bridge.
In case it's useful to anyone, if you want something that costs $25 instead of a few hundred, Airfoil by RogueAmoeba[1] is great. It's just software: you basically need to leave an iOS/Android device next to your amplifier, and you can stream to it from other devices. I use it for music; AFAIK there would be a lag between image and sound for a video source.
Geo Fencing is where you use the GPS coordinates of a 'virtual area' to determine whether you are 'inside the fence' or outside of it. Think of it as virtual lines in the sand, and whenever your phone determines you've crossed a line, it does something ..
Through reading the context, it means a scheme in which a phone uses its GPS to detect exceeding a specified radius from the house and setting off an alarm. All you need to do is set a position (the house) and an alarm radius (greater than the normal error bounds for GPS) and you will always know if the phone is where it's supposed to be.
I wish someone would hack Sonos to make its network communication more reliable. Every time you turn it off you have to press the two buttons on top to make it find the bridge again. Several times.
[+] [-] jwr|12 years ago|reply
I love Sonos, their devices are way ahead of the competition. But their app just plain sucks. What is the most important function of a remote control app? Adjusting volume — and yet the useful range for the volume control occupies less than a percent of the entire touchscreen. It is very difficult to adjust the volume. And Sonos gives you no way to set the useful range, so you often end up blasting your ears with monstrously loud music, because you didn't tap the control just right.
This has been reported to Sonos numerous times and yet we still have to suffer with the crippled volume control.
Here is hoping that there will be an alternative.
[+] [-] rsync|12 years ago|reply
Further, it is not very granular at all. If you have a playbar, you may have noticed that the difference between mute and the very next volume up from mute is pretty high.
Sonos is not going to fix any of this. They do not care about your complaints about the app. People have been complaining and filing bug reports and pointing out simple UI improvements for years and it does nothing. They have made it clear that they do not care.
I am an early adopter (2005) and own about 12 of these devices and I have been disappointed and dismayed by the UI and the capability of their apps since day one.
Good luck with your project!
[+] [-] andrewjshults|12 years ago|reply
[+] [-] seear|12 years ago|reply
[+] [-] geuis|12 years ago|reply
After initial UPnP search, you get a URL for a descriptive xml file. Sonos operates over the SOAP protocol.
If you want your client to be notified of changes, you have to subscribe to each event type with a max of 3600 second timeout, then resubscribe. It's not necessary but the system supports unsubscribing too.
One specific thing you have to hack is this. If you want to switch to a different music service, you have to include the user id used to sign into that service (Pandora, Rdio, etc). This data is returned in a base64 encoded, encrypted blob. There's no way to decrypt it unless you can figure out how to crack the key out of the device.
Fortunately you only need the user id. There's another undocumented endpoint that returns some info that includes all the usernames, just no passwords. But it doesn't match the them to their services. You then have to send requests with all combinations of usernames and services and get the responses. Once these are returned, just store the relationships.
I'm writing this from memory, sorry for the specific details. If anyone is interested, contact me through my email in my profile and I'll get the info from some code I wrote recently.
[+] [-] chrissnell|12 years ago|reply
[+] [-] icebraining|12 years ago|reply
[+] [-] provost|12 years ago|reply
[1] http://ycombinator.com/newsguidelines.html
[+] [-] caseyf7|12 years ago|reply
[+] [-] theswan|12 years ago|reply
I bought a Play:3 a few months back and was also dissatisfied with the given OS X/iOS apps - I'm currently working on enabling AirPlay support for Sonos devices. (http://stephen.github.io/airsonos/)
Would love feedback from any Sonos users!
[+] [-] owenwil|12 years ago|reply
[+] [-] pedrocr|12 years ago|reply
[+] [-] berberous|12 years ago|reply
Would be awesome if it worked though! I would want it as a menubar app though.
[+] [-] pedrocr|12 years ago|reply
[+] [-] klochner|12 years ago|reply
Looks like a cool project, I just find it hard to believe he used wireshark to figure out the API on his own, given that he acknowledges:
Sorry to be cynical, my BS meter just went through the roof.[+] [-] n1mda|12 years ago|reply
Perhaps I could continue developing a Sonos API for SonosKit (I have a few improvements on a local repo)
[+] [-] enigmo|12 years ago|reply
https://github.com/NathanHowell/Sonority https://github.com/NathanHowell/upd2 <-- update image extractor
A few of us went a bit further, found some telnet backdoors and cracked the root password.
[+] [-] nthnb|12 years ago|reply
[+] [-] thejosh|12 years ago|reply
[+] [-] drewying|12 years ago|reply
I created an app using some of nathanborrors work that let's you browse through all of the Sonos Music services (Like Rdio, Spotify, Pandora, iHearRadio, etc). Setup your account, browse through your collections and play them on your system. I should submit a pull request to see if I can get this integrated into this project!
You can see the project here: https://github.com/drewying/Sonos-Music-Services-Browser
I also have an app on the App Store that turns your Sonos System into a wireless PA system. The current version is a little buggy but an update is coming shortly that makes it much more stable. You can check it out here:
https://itunes.apple.com/us/app/sonos-voice/id689673100?mt=8
[+] [-] japers|12 years ago|reply
[1] https://www.npmjs.org/package/sonos_cli [2] https://www.npmjs.org/package/sonos
[+] [-] jimmcslim|12 years ago|reply
[+] [-] Myrmornis|12 years ago|reply
[1] https://www.rogueamoeba.com/airfoil/speakers.php
[+] [-] splitbrain|12 years ago|reply
[+] [-] fit2rule|12 years ago|reply
[+] [-] lutusp|12 years ago|reply
[+] [-] whatusername|12 years ago|reply
Essentially - hook into the Phone's location services and perform actions based on either entering or leaving a certain location/radius.
[+] [-] zrgiu_|12 years ago|reply
[+] [-] patrickk|12 years ago|reply
[1]http://www.raspberrypi.org/meet-jasper-open-source-voice-com...
[+] [-] digitalboss|12 years ago|reply
Works great - cool to see the Sonos web interface for the zones.
[+] [-] berberous|12 years ago|reply
[+] [-] nthnb|12 years ago|reply
[+] [-] gadders|12 years ago|reply
[+] [-] rsync|12 years ago|reply
I've been using their equipment since 2005 and they have never reliably interconnected over the wireless.
Just spare yourself the trouble and wire them physically - they will be flawless.
[+] [-] omnibrain|12 years ago|reply
[+] [-] cpayne624|12 years ago|reply
[+] [-] elyrly|12 years ago|reply