Bose Soundtouch

The Bose Soundtouch wireless speaker product line runs a web server on the speaker to accept queries and control commands.

FrBa TCL can send commands to the Bose Soundtouch wireless network speaker. The Bose API uses HTTP GET and POST messages with XML data. You can control the speaker's volume and switch to a preset from within TCL. Uses the Http package. Simple examples:

package require http
set url "http://soundtouch:8090"
# power on with key press and release
::http::geturl $url/key -query "<?xml version=\"1.0\" ?><key state=\"press\" sender=\"Gabbo\">POWER</key>"
::http::geturl $url/key -query "<?xml version=\"1.0\" ?><key state=\"release\" sender=\"Gabbo\">POWER</key>"

# request current volume, returns xml
set [::http::geturl $url/volume](body)

# request list of presets, returns xml
set [::http::geturl $url/presets](body)

# change volume to 30% using HTTP POST
::http::geturl $url/volume -query "<?xml version=\"1.0\" ?><volume>30</volume>"

# change to preset 3 of 6 using HTTP POST
::http::geturl $url/key -query "<?xml version=\"1.0\" ?><key state=\"release\" sender=\"Gabbo\">PRESET_3</key>"

The official Bose Soundtouch app available from https://downloads.bose.com/ced/soundtouch/soundtouch_controller_app/index.html

I am currently developing an TCL/TK interface to the speaker to control some of its basic functions:

Set Power On/off

Get What is currently playing

Get/Set speaker volume

Get/Set channel presets 1-6

Comments are welcome.