-
Notifications
You must be signed in to change notification settings - Fork 77
Hacking
Sonos is hard to work with. The only way to interface with the system is an undocumented SOAP API. Yay!
The best way to get started is reading soco.py. @rahims did a lot of hard work getting a lot of stuff implemented.
You can run sonos discover
to get the IP of one of your devices. All of the Sonos stuff communicates on port 1400
.
Open http://DEVICE_IP:1400/status
for all kinds of goodies.
Open http://DEVICE_IP:1400/xml/device_description.xml
for lots of stuff about the device. Here's a list of endpoints:
- AlarmClock
- MusicServices
- DeviceProperties
- SystemProperties
- ZoneGroupTopology
- GroupManagement
I don't know what all of these do yet. Dying to learn.
Something else of note in that response is a PLAY:3 is a Sonos PLAY:3 Media Server
and a Sonos PLAY:3 Media Renderer
. They each have a subset of the endpoints. I'm not sure if it matters though.
- Download Wireshark.
- Start capturing
- From the menu, choose Analyze > Decode As...
- Choose HTTP from the list and click Apply
- In the filter bar, enter
tcp.port == 1400 && http
to see just Sonos traffic.