- Follow the instructions on the dash-test project to configure your Dash button and install all the other requirements (including scapy).
- Install the additional requirements for this project using
pip install -r requirements.txt'.
- Make sure your computer is on the same subnet as your Sonos players (usually the same Wifi network is fine). Discover the name of all of the players on the network by running
python ./list_players.py
The list will look something like this:
"Garage"
"Kitchen"
"Study"
"Dining Room"
The double quotation marks around the player names are inserted to delineate when long payer names with spaces start and end. Do not copy the quotes in the next step. - In print_current_uri.py, edit line 26 to set the sonos_player_name to the name of the player you want to steam to.
- Using your usual Sonos controller (e.g. the Sonos phone app), manually start the player you selected to play the stream that you want to trigger when you push the Dash button.
- Run
python ./print_current_uri.py
to print the uri of the broadcast stream you want to trigger when the Dash button is pressed. It will look something like:
media_uri: x-sonosapi-stream:s34804?sid=254&flags=32
- In play_stream.py, edit line 13 to point to the name of the Sonos player you want the Dash button to trigger.
- Edit line 43 to contain the uri of the media stream (e.g. for KQED enter
sonos.play_uri('x-sonosapi-stream:s34804?sid=254&flags=32', title='KQED)
). You must enter a title, but it can be anything. - Edit line 60 to reference the ethernet MAC address of your Dash button (see the dash-test project project for instructions on how to discover the MAC ID)
- Run
python ./play_stream.py
to play the stream on the target Sonos player when the Dash button is pressed. - CTRL-C exits the program.
-
Notifications
You must be signed in to change notification settings - Fork 0
KeanWong/dash-sonos-stream
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Stream a radio station to a Sonos player at the push of a Amazon Dash button
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published