Bose SoundTouch Toolkit

Documentation for controlling and preserving Bose SoundTouch devices

View the Project on GitHub gesellix/Bose-SoundTouch

SCMUDC Enrichment Implementation Summary

Overview

This document summarizes the implementation of SCMUDC (Sound Control Management Usage Data Collection) event enrichment in the AfterTouch toolkit. The enhancement provides human-readable analysis of device telemetry data to improve usability and debugging capabilities.

Problem Solved

Previously, SCMUDC telemetry events were stored as raw JSON with Base64-encoded XML content, making them difficult to analyze. Users had to manually decode content to understand what device interactions were being recorded.

Solution Implemented

1. Backend Enrichment (pkg/service/proxy/)

New File: scmudc.go

Enhanced File: recorder.go

2. Frontend Enhancement

Updated HTML (pkg/service/handlers/web/index.html)

Enhanced JavaScript (pkg/service/handlers/web/js/script.js)

Event Origin Clarification

Based on analysis of recorded data:

Origin Source Description Example Events
gabbo SoundTouch App Mobile/desktop app UI interactions Play, Pause, Power via app
console Device Hardware Physical buttons on speaker Preset buttons, hardware power
device Internal System Automatic device responses Content playback, system actions

Enhanced .http File Format

Before (Raw)

### POST /v1/scmudc/A81B6A536A98
POST /v1/scmudc/A81B6A536A98
Host: events.api.bosecm.com
...

{"envelope":...,"payload":{"events":[{"data":{"contentItem":"PD94bWw..."}}]}}

After (Enriched)

### POST /v1/scmudc/A81B6A536A98
// Origin: Internal System (device)
// Action: play-item
// Command: Billie Eilish - bad guy (instrumental version)
// Summary: Device: Spotify: Billie Eilish - bad guy (instrumental version)
//
// Decoded Content:
// - Source: SPOTIFY
// - Item: Billie Eilish - bad guy (instrumental version)
// - Account: gesellix
// - Artwork: https://i.scdn.co/image/ab67616d0000b273...
//
// Full XML Content:
// <?xml version="1.0" encoding="UTF-8"?>
// <ContentItem source="SPOTIFY" type="tracklisturl" ...>
//     <itemName>Billie Eilish - bad guy (instrumental version)</itemName>
//     <containerArt>https://i.scdn.co/image/ab67616d0000b273...</containerArt>
// </ContentItem>
POST /v1/scmudc/A81B6A536A98
...


> {%
    // Response: 200 OK
    // SCMUDC Event Analysis:
    // - Origin: Internal System (device)
    // - Action: play-item
    // - Summary: Device: Spotify: Billie Eilish - bad guy (instrumental version)
    // - Content: Billie Eilish - bad guy (instrumental version)
    // - Account: gesellix
%}

Web UI Enhancement

Interactions Table

Event Details Display

📱 ▶️ Play Button                    (Simple app action)
🔄 🎵 Billie Eilish - bad guy... (...)  (Complex device event with details)
🎛️ ⭐ Preset 5                        (Hardware preset button)

Detailed Popover

For complex events, clicking “(…)” shows:

Implementation Benefits

For Users

For Developers

For Analysis

File Structure

pkg/service/proxy/
├── scmudc.go                 # New: SCMUDC enrichment logic
├── recorder.go               # Enhanced: Enrichment integration
│
pkg/service/handlers/web/
├── index.html                # Enhanced: New table column
├── js/script.js              # Enhanced: SCMUDC display logic
│
docs/
├── scmudc-events-analysis.md # New: Analysis documentation
├── SCMUDC-ENRICHMENT-IMPLEMENTATION.md  # This file

Technical Decisions

Base64 Decoding Strategy

Icon Selection

Backward Compatibility

Future Enhancement Opportunities

  1. Event Correlation: Link device events to user actions
  2. Statistics Dashboard: Origin-based usage analytics
  3. Content Recommendations: Track listening patterns
  4. Device Health: Monitor interaction frequency and patterns
  5. Export Features: CSV/JSON export of enriched event data

Testing Considerations

This implementation significantly improves the usability of SCMUDC telemetry data while maintaining full backward compatibility and raw data access for advanced users.