Documentation for controlling and preserving Bose SoundTouch devices
Save your favorite music, radio stations, and playlists as 1-6 presets for instant access.
SoundTouch devices support 6 preset slots that can store your favorite content for instant access. This guide shows you how to manage presets using both the CLI and Go library.
soundtouch-cli --host 192.168.1.100 preset list
# Store current song/station as preset 1
soundtouch-cli --host 192.168.1.100 preset store-current --slot 1
soundtouch-cli --host 192.168.1.100 preset store \
--slot 2 \
--source SPOTIFY \
--location "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M" \
--name "Today's Top Hits"
soundtouch-cli --host 192.168.1.100 preset store \
--slot 3 \
--source TUNEIN \
--location "/v1/playbook/station/s33828" \
--name "K-LOVE Radio"
# Play preset 1
soundtouch-cli --host 192.168.1.100 preset select --slot 1
# Play preset 2
soundtouch-cli --host 192.168.1.100 preset select --slot 2
# Remove preset 6
soundtouch-cli --host 192.168.1.100 preset remove --slot 6
To store specific content, you need the location parameter. Here’s how to get it:
# Play the content you want to save, then:
soundtouch-cli --host 192.168.1.100 play now
Example output:
Now Playing:
Track: Bohemian Rhapsody
Artist: Queen
Source: SPOTIFY
Content Details:
Location: spotify:track:17GmwQ9Q3MTAz05OokmNNB ← Use this!
If you have a Spotify web URL, convert it to a URI:
https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5Mspotify:playlist:37i9dQZF1DXcBWIGoYBM5MJust replace https://open.spotify.com/ with spotify: and / with :.
# Playlist
--source SPOTIFY --location "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M"
# Album
--source SPOTIFY --location "spotify:album:4aawyAB9vmqN3uQ7FjRGTy"
# Artist
--source SPOTIFY --location "spotify:artist:6APm8EjxOHSYM5B4i3vT3q"
# Track
--source SPOTIFY --location "spotify:track:17GmwQ9Q3MTAz05OokmNNB"
# TuneIn Radio
--source TUNEIN --location "/v1/playbook/station/s33828"
# Internet Radio Stream
--source LOCAL_INTERNET_RADIO --location "https://stream.example.com/jazz"
# Album from local storage
--source STORED_MUSIC --location "album:983"
# Track from local storage
--source STORED_MUSIC --location "track:2579"
package main
import (
"fmt"
"log"
"github.com/gesellix/bose-soundtouch/pkg/client"
"github.com/gesellix/bose-soundtouch/pkg/models"
)
func main() {
// Create client
c := client.NewClient(&client.Config{
Host: "192.168.1.100",
Port: 8090,
})
// List current presets
presets, err := c.GetPresets()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Found %d presets\n", len(presets.Preset))
// Store current content as preset 1
err = c.StoreCurrentAsPreset(1)
if err != nil {
log.Fatal(err)
}
// Store Spotify playlist as preset 2
content := &models.ContentItem{
Source: "SPOTIFY",
Type: "uri",
Location: "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
SourceAccount: "username",
IsPresetable: true,
ItemName: "My Favorites",
}
err = c.StorePreset(2, content)
if err != nil {
log.Fatal(err)
}
// Select preset 1
err = c.SelectPreset(1)
if err != nil {
log.Fatal(err)
}
}
// Find next available slot automatically
nextSlot, err := c.GetNextAvailablePresetSlot()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Next available slot: %d\n", nextSlot)
// Check if current content can be saved
presetable, err := c.IsCurrentContentPresetable()
if err != nil {
log.Fatal(err)
}
if presetable {
c.StoreCurrentAsPreset(nextSlot)
}
// Get preset by ID
presets, _ := c.GetPresets()
preset := presets.GetPresetByID(1)
if preset != nil && !preset.IsEmpty() {
fmt.Printf("Preset 1: %s\n", preset.GetDisplayName())
}
Monitor preset changes in real-time using WebSocket events:
// Create WebSocket client
wsClient := c.NewWebSocketClient(nil)
// Handle preset updates
wsClient.OnPresetUpdated(func(event *models.PresetUpdatedEvent) {
fmt.Printf("Presets updated on device %s\n", event.DeviceID)
for _, preset := range event.Presets.Preset {
if !preset.IsEmpty() {
fmt.Printf(" Preset %d: %s (%s)\n",
preset.ID, preset.GetDisplayName(), preset.GetSource())
}
}
})
// Connect and listen
err := wsClient.Connect()
if err != nil {
log.Fatal(err)
}
defer wsClient.Close()
// Keep listening for events
select {} // Run forever
# Dad's morning playlist
soundtouch-cli --host 192.168.1.100 preset store \
--slot 1 --source SPOTIFY \
--location "spotify:playlist:morning-energy" \
--name "Dad's Morning Mix"
# Mom's cooking music
soundtouch-cli --host 192.168.1.100 preset store \
--slot 2 --source SPOTIFY \
--location "spotify:playlist:cooking-vibes" \
--name "Kitchen Tunes"
# Kids' bedtime stories
soundtouch-cli --host 192.168.1.100 preset store \
--slot 3 --source TUNEIN \
--location "/v1/playbook/station/bedtime-stories" \
--name "Bedtime Stories"
# Upbeat party playlist
soundtouch-cli --host 192.168.1.100 preset store-current --slot 1
# Chill background music
soundtouch-cli --host 192.168.1.100 preset store-current --slot 2
# Dance music
soundtouch-cli --host 192.168.1.100 preset store-current --slot 3
# Morning routine (preset 1) - triggered by smart home at 7 AM
soundtouch-cli --host 192.168.1.100 preset select --slot 1
# Evening routine (preset 2) - triggered at sunset
soundtouch-cli --host 192.168.1.100 preset select --slot 2
Not all content can be saved as presets:
Solution: Switch to a supported source first.
# See which presets you have
soundtouch-cli --host 192.168.1.100 preset list
# Remove one you don't need
soundtouch-cli --host 192.168.1.100 preset remove --slot 6
# Or overwrite an existing one
soundtouch-cli --host 192.168.1.100 preset store-current --slot 6
If you can’t find Spotify URIs:
soundtouch-cli --host 192.168.1.100 play now# Test connection first
soundtouch-cli --host 192.168.1.100 info
# If that fails, check:
# - Device IP address is correct
# - Device is powered on
# - Network connectivity
--name parameters for easy identification