Preset Management Quick Start Guide
Preset Management Quick Start Guide
Save your favorite music, radio stations, and playlists as 1-6 presets for instant access.
Overview
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.
Quick CLI Usage
1. See Current Presets
soundtouch-cli --host 192.0.2.100 preset list2. Store What’s Currently Playing
# Store current song/station as preset 1
soundtouch-cli --host 192.0.2.100 preset store-current --slot 13. Store Specific Content
Spotify Playlist
soundtouch-cli --host 192.0.2.100 preset store \
--slot 2 \
--source SPOTIFY \
--location "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M" \
--name "Today's Top Hits"Radio Station
soundtouch-cli --host 192.0.2.100 preset store \
--slot 3 \
--source TUNEIN \
--location "/v1/playback/station/s33828" \
--name "K-LOVE Radio"4. Use Your Presets
# Play preset 1
soundtouch-cli --host 192.0.2.100 preset select --slot 1
# Play preset 2
soundtouch-cli --host 192.0.2.100 preset select --slot 25. Remove Presets
# Remove preset 6
soundtouch-cli --host 192.0.2.100 preset remove --slot 6Getting Content Locations
To store specific content, you need the location parameter. Here’s how to get it:
Method 1: From Currently Playing Content
# Play the content you want to save, then:
soundtouch-cli --host 192.0.2.100 play nowExample output:
Now Playing:
Track: Bohemian Rhapsody
Artist: Queen
Source: SPOTIFY
Content Details:
Location: spotify:track:17GmwQ9Q3MTAz05OokmNNB ← Use this!Method 2: Convert Spotify URLs
If you have a Spotify web URL, convert it to a URI:
- URL:
https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M - URI:
spotify:playlist:37i9dQZF1DXcBWIGoYBM5M
Just replace https://open.spotify.com/ with spotify: and / with :.
Common Content Types
Spotify Content
# 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"Radio Stations
# TuneIn Radio
--source TUNEIN --location "/v1/playback/station/s33828"
# Internet Radio Stream
--source LOCAL_INTERNET_RADIO --location "https://stream.example.com/jazz"Local Music (NAS/USB)
# Album from local storage
--source STORED_MUSIC --location "album:983"
# Track from local storage
--source STORED_MUSIC --location "track:2579"Go Library Usage
Basic Operations
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.0.2.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)
}
}Smart Preset Management
// 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())
}Real-Time Preset Events
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 foreverPractical Examples
Family Setup
# Dad's morning playlist
soundtouch-cli --host 192.0.2.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.0.2.100 preset store \
--slot 2 --source SPOTIFY \
--location "spotify:playlist:cooking-vibes" \
--name "Kitchen Tunes"
# Kids' bedtime stories
soundtouch-cli --host 192.0.2.100 preset store \
--slot 3 --source TUNEIN \
--location "/v1/playback/station/bedtime-stories" \
--name "Bedtime Stories"Party Mode
# Upbeat party playlist
soundtouch-cli --host 192.0.2.100 preset store-current --slot 1
# Chill background music
soundtouch-cli --host 192.0.2.100 preset store-current --slot 2
# Dance music
soundtouch-cli --host 192.0.2.100 preset store-current --slot 3Smart Home Integration
# Morning routine (preset 1) - triggered by smart home at 7 AM
soundtouch-cli --host 192.0.2.100 preset select --slot 1
# Evening routine (preset 2) - triggered at sunset
soundtouch-cli --host 192.0.2.100 preset select --slot 2Troubleshooting
“Content is not presetable”
Not all content can be saved as presets:
- ✅ Works: Spotify, TuneIn, Internet Radio, Local Music
- ❌ Doesn’t work: Bluetooth, AUX, AirPlay (live sources)
Solution: Switch to a supported source first.
“All preset slots are occupied”
# See which presets you have
soundtouch-cli --host 192.0.2.100 preset list
# Remove one you don't need
soundtouch-cli --host 192.0.2.100 preset remove --slot 6
# Or overwrite an existing one
soundtouch-cli --host 192.0.2.100 preset store-current --slot 6Getting Spotify URIs
If you can’t find Spotify URIs:
- Play the content in Spotify on your SoundTouch
- Check what’s playing:
soundtouch-cli --host 192.0.2.100 play now - Copy the location from the output
Device Connection Issues
# Test connection first
soundtouch-cli --host 192.0.2.100 info
# If that fails, check:
# - Device IP address is correct
# - Device is powered on
# - Network connectivityBest Practices
Preset Organization
- Slot 1-2: Daily favorites (morning playlist, news)
- Slot 3-4: Mood music (workout, relaxation)
- Slot 5-6: Special content (party music, kids’ content)
Content Management
- Use descriptive
--nameparameters for easy identification - Store both individual tracks and playlists for variety
- Keep at least one slot free for temporary content
Automation Ideas
- Create shell scripts for common preset operations
- Use with smart home systems for scheduled music
- Integrate with calendar events (work music during work hours)
Next Steps
- 📖 Complete CLI Reference
- 🔧 Full Implementation Guide
- 📡 WebSocket Events Documentation
- 💻 Preset Management Example
- 📚 API Endpoints Overview
Need Help?
- 🐛 Bug Reports: Create an issue
- 💡 Feature Requests: Start a discussion
- ❓ Questions: Browse discussions
Last updated on