diff --git a/.env.example b/.env.example index 1bbc0ba..c187082 100644 --- a/.env.example +++ b/.env.example @@ -43,16 +43,16 @@ CACHE_TTL=30s # Examples: # Single device with default port: -# PREFERRED_DEVICES="192.168.1.100" +# PREFERRED_DEVICES="192.0.2.100" # Single device with custom name: -# PREFERRED_DEVICES="Living Room@192.168.1.100" +# PREFERRED_DEVICES="Living Room@192.0.2.100" # Single device with custom port: -# PREFERRED_DEVICES="192.168.1.100:8091" +# PREFERRED_DEVICES="192.0.2.100:8091" # Multiple devices with mixed configurations: -PREFERRED_DEVICES="Living Room@192.168.1.100:8090;Kitchen@192.168.1.101;192.168.1.102:8091" +PREFERRED_DEVICES="Living Room@192.0.2.100:8090;Kitchen@192.0.2.101;192.0.2.102:8091" # Example — replace with your speakers' names and IPs: # PREFERRED_DEVICES="Living Room SoundTouch@192.0.2.10;Kitchen SoundTouch@192.0.2.11" diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7954a72..f458c48 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -163,7 +163,7 @@ body: label: Network Configuration description: Details about your network setup (if relevant to the issue) placeholder: | - - Device IP: 192.168.1.100 + - Device IP: 192.0.2.100 - Network type: WiFi/Ethernet - Router model: - Any firewalls or network restrictions: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index caab493..2ea7bb3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -131,7 +131,7 @@ body: render: go placeholder: | // Example of how you envision using this feature - client := soundtouch.New("192.168.1.100", 8090) + client := soundtouch.New("192.0.2.100", 8090) // Your desired API call result, err := client.NewFeature(options) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 927e54d..70818b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,7 +275,7 @@ jobs: func main() { // Test basic client creation - c := client.NewClientFromHost("192.168.1.100") + c := client.NewClientFromHost("192.0.2.100") fmt.Printf("Client created for %s\n", c.BaseURL()) // Test models can be imported diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8186f7b..33c8ce2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -358,7 +358,7 @@ jobs: func main() { // Create client - c := client.New("192.168.1.100", 8090) + c := client.New("192.0.2.100", 8090) // Get device info info, err := c.GetInfo() diff --git a/cmd/websocket-demo/main.go b/cmd/websocket-demo/main.go index 13a4eaa..3804e08 100644 --- a/cmd/websocket-demo/main.go +++ b/cmd/websocket-demo/main.go @@ -546,13 +546,13 @@ func printHelp() { fmt.Printf(" %s -discover\n", os.Args[0]) fmt.Println() fmt.Println(" # Connect to specific device and monitor volume events only") - fmt.Printf(" %s -host 192.168.1.10 -filter volume\n", os.Args[0]) + fmt.Printf(" %s -host 192.0.2.10 -filter volume\n", os.Args[0]) fmt.Println() fmt.Println(" # Monitor for 5 minutes with verbose output") - fmt.Printf(" %s -host 192.168.1.10 -duration 5m -verbose\n", os.Args[0]) + fmt.Printf(" %s -host 192.0.2.10 -duration 5m -verbose\n", os.Args[0]) fmt.Println() fmt.Println(" # Monitor now playing and volume events") - fmt.Printf(" %s -host 192.168.1.10 -filter nowPlaying,volume\n", os.Args[0]) + fmt.Printf(" %s -host 192.0.2.10 -filter nowPlaying,volume\n", os.Args[0]) fmt.Println() fmt.Println("Event Types:") fmt.Println(" 🎵 nowPlaying - Track changes, playback status") diff --git a/doc.go b/doc.go index 5346f64..cbe9ec3 100644 --- a/doc.go +++ b/doc.go @@ -27,7 +27,7 @@ // func main() { // // Create a client for your SoundTouch device // config := &client.Config{ -// Host: "192.168.1.100", +// Host: "192.0.2.100", // Port: 8090, // } // client := client.NewClient(config) @@ -70,7 +70,7 @@ // soundtouch-cli discover devices // // # Control a device -// soundtouch-cli --host 192.168.1.100 play start +// soundtouch-cli --host 192.0.2.100 play start // // # Supported Features // diff --git a/examples/account-management/main.go b/examples/account-management/main.go index 49215ad..7c05244 100644 --- a/examples/account-management/main.go +++ b/examples/account-management/main.go @@ -13,7 +13,7 @@ import ( func main() { // Configure the SoundTouch client config := &client.Config{ - Host: "192.168.1.100", // Replace with your device IP + Host: "192.0.2.100", // Replace with your device IP Port: 8090, Timeout: 10 * time.Second, } diff --git a/examples/advanced-audio-controls/main.go b/examples/advanced-audio-controls/main.go index 7d8eb9c..ac3e879 100644 --- a/examples/advanced-audio-controls/main.go +++ b/examples/advanced-audio-controls/main.go @@ -11,7 +11,7 @@ import ( func main() { // Configure your device - deviceIP := "192.168.1.100" // Replace with your SoundTouch device IP + deviceIP := "192.0.2.100" // Replace with your SoundTouch device IP // Create client soundtouchClient := client.NewClientFromHost(deviceIP) diff --git a/examples/content-selection/main.go b/examples/content-selection/main.go index 5ea8095..bb350c9 100644 --- a/examples/content-selection/main.go +++ b/examples/content-selection/main.go @@ -163,7 +163,7 @@ func demoLocalMusic(c *client.Client) error { location := "album:983" sourceAccount := "3f205110-4a57-4e91-810a-123456789012" // Example GUID itemName := "Welcome to the New" - containerArt := "http://192.168.1.14:8085/v1/albums/983/image" + containerArt := "http://192.0.2.14:8085/v1/albums/983/image" fmt.Printf(" Album: %s\n", itemName) fmt.Printf(" Location: %s\n", location) @@ -276,7 +276,7 @@ func printUsage() { fmt.Printf(" %s \n", os.Args[0]) fmt.Println() fmt.Println("Example:") - fmt.Printf(" %s 192.168.1.100\n", os.Args[0]) + fmt.Printf(" %s 192.0.2.100\n", os.Args[0]) fmt.Println() fmt.Println("Prerequisites:") fmt.Println("• SoundTouch device on your network") diff --git a/examples/navigation-station-demo/main.go b/examples/navigation-station-demo/main.go index 26245e6..ec7db07 100644 --- a/examples/navigation-station-demo/main.go +++ b/examples/navigation-station-demo/main.go @@ -239,7 +239,7 @@ func printUsage() { fmt.Printf(" %s \n", os.Args[0]) fmt.Println() fmt.Println("Example:") - fmt.Printf(" %s 192.168.1.100\n", os.Args[0]) + fmt.Printf(" %s 192.0.2.100\n", os.Args[0]) fmt.Println() fmt.Println("Prerequisites:") fmt.Println("• SoundTouch device on your network") @@ -247,7 +247,7 @@ func printUsage() { fmt.Println("• Device powered on and connected") fmt.Println() fmt.Println("CLI Equivalent Commands:") - fmt.Println("• Browse: soundtouch-cli --host 192.168.1.100 browse tunein") - fmt.Println("• Search: soundtouch-cli --host 192.168.1.100 station search-tunein --query jazz") - fmt.Println("• Add: soundtouch-cli --host 192.168.1.100 station add --source TUNEIN --token --name ") + fmt.Println("• Browse: soundtouch-cli --host 192.0.2.100 browse tunein") + fmt.Println("• Search: soundtouch-cli --host 192.0.2.100 station search-tunein --query jazz") + fmt.Println("• Add: soundtouch-cli --host 192.0.2.100 station add --source TUNEIN --token --name ") } diff --git a/examples/preset-management/main.go b/examples/preset-management/main.go index 2e18f03..28f4cf7 100644 --- a/examples/preset-management/main.go +++ b/examples/preset-management/main.go @@ -378,7 +378,7 @@ func printUsage() { fmt.Printf(" %s \n", os.Args[0]) fmt.Println() fmt.Println("Example:") - fmt.Printf(" %s 192.168.1.100\n", os.Args[0]) + fmt.Printf(" %s 192.0.2.100\n", os.Args[0]) fmt.Println() fmt.Println("Prerequisites:") fmt.Println("• SoundTouch device on your network") diff --git a/examples/service-availability/main.go b/examples/service-availability/main.go index 48cf5c5..c7b4145 100644 --- a/examples/service-availability/main.go +++ b/examples/service-availability/main.go @@ -16,7 +16,7 @@ func main() { host := getSoundTouchHost() if host == "" { fmt.Println("Usage: go run main.go ") - fmt.Println(" or: SOUNDTOUCH_TEST_HOST=192.168.1.100 go run main.go") + fmt.Println(" or: SOUNDTOUCH_TEST_HOST=192.0.2.100 go run main.go") os.Exit(1) } diff --git a/examples/zone-slave-operations/main.go b/examples/zone-slave-operations/main.go index 792c104..be50581 100644 --- a/examples/zone-slave-operations/main.go +++ b/examples/zone-slave-operations/main.go @@ -11,7 +11,7 @@ import ( func main() { // Configure your device - deviceIP := "192.168.1.100" // Replace with your SoundTouch device IP + deviceIP := "192.0.2.100" // Replace with your SoundTouch device IP // Create client soundtouchClient := client.NewClientFromHost(deviceIP) @@ -24,7 +24,7 @@ func main() { masterDeviceID := "ABCD1234EFGH" // Replace with actual master device ID slaveDeviceID := "WXYZ5678IJKL" // Replace with actual slave device ID - slaveIP := "192.168.1.101" // Replace with actual slave IP + slaveIP := "192.0.2.101" // Replace with actual slave IP err := soundtouchClient.AddZoneSlave(masterDeviceID, slaveDeviceID, slaveIP) if err != nil { @@ -117,7 +117,7 @@ func main() { fmt.Println("\n8. Error handling example...") // Try to add a non-existent device to demonstrate error handling - err = soundtouchClient.AddZoneSlave("INVALID123", "NOTFOUND456", "192.168.1.999") + err = soundtouchClient.AddZoneSlave("INVALID123", "NOTFOUND456", "192.0.2.999") if err != nil { fmt.Printf("⚠️ Expected error for invalid operation: %v\n", err) fmt.Println(" This demonstrates proper error handling for invalid device IDs or IPs") diff --git a/pkg/client/client.go b/pkg/client/client.go index 89f4d34..921812a 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -9,7 +9,7 @@ // Create a client and control your SoundTouch device: // // config := &client.Config{ -// Host: "192.168.1.100", +// Host: "192.0.2.100", // Port: 8090, // Timeout: 10 * time.Second, // } @@ -74,10 +74,10 @@ // // // Create a new zone with multiple speakers // newZone := &models.ZoneRequest{ -// Master: "192.168.1.100", +// Master: "192.0.2.100", // Members: []models.MemberEntry{ -// {IP: "192.168.1.101"}, -// {IP: "192.168.1.102"}, +// {IP: "192.0.2.101"}, +// {IP: "192.0.2.102"}, // }, // } // err = client.SetZone(newZone) @@ -120,7 +120,7 @@ // The Config struct supports various options: // // config := &client.Config{ -// Host: "192.168.1.100", +// Host: "192.0.2.100", // Port: 8090, // Timeout: 15 * time.Second, // UserAgent: "MyApp/1.0", @@ -901,7 +901,7 @@ func (c *Client) SelectLocalInternetRadio(location, sourceAccount, itemName, con // // Example: // -// err := client.SelectLocalMusic("album:983", "3f205110-4a57-4e91-810a-123456789012", "Welcome to the New", "http://192.168.1.14:8085/v1/albums/983/image") +// err := client.SelectLocalMusic("album:983", "3f205110-4a57-4e91-810a-123456789012", "Welcome to the New", "http://192.0.2.14:8085/v1/albums/983/image") func (c *Client) SelectLocalMusic(location, sourceAccount, itemName, containerArt string) error { if location == "" { return fmt.Errorf("location cannot be empty") diff --git a/pkg/models/doc.go b/pkg/models/doc.go index 2feb63d..67d3c95 100644 --- a/pkg/models/doc.go +++ b/pkg/models/doc.go @@ -41,10 +41,10 @@ // Creating zone configurations: // // zone := models.Zone{ -// Master: "192.168.1.100", +// Master: "192.0.2.100", // Members: []models.ZoneMember{ -// {IPAddress: "192.168.1.101"}, -// {IPAddress: "192.168.1.102"}, +// {IPAddress: "192.0.2.101"}, +// {IPAddress: "192.0.2.102"}, // }, // } // @@ -89,7 +89,7 @@ // // device := models.DiscoveredDevice{ // Name: "Living Room", -// Host: "192.168.1.100", +// Host: "192.0.2.100", // Port: 8090, // SerialNo: "AA123456789", // Location: "/device.xml", diff --git a/pkg/service/amazon/zeroconf.go b/pkg/service/amazon/zeroconf.go index 94cf608..8d09509 100644 --- a/pkg/service/amazon/zeroconf.go +++ b/pkg/service/amazon/zeroconf.go @@ -9,7 +9,7 @@ var ErrAddUserNoOp = zeroconf.ErrAddUserNoOp // PushAmazonCredentials pushes Amazon Music credentials to a speaker using the // ZeroConf DH key exchange protocol. Falls back to simplified token push if // the speaker does not support DH (older firmware). -// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.1.10:8200/zc". +// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.10.10:8200/zc". func PushAmazonCredentials(zcBaseURL, username, accessToken string) error { return zeroconf.PushCredentials(zcBaseURL, username, accessToken) } diff --git a/pkg/service/handlers/web/index.html b/pkg/service/handlers/web/index.html index bdbd0d2..0cb0369 100644 --- a/pkg/service/handlers/web/index.html +++ b/pkg/service/handlers/web/index.html @@ -148,7 +148,7 @@ Note: These URLs must be accessible from your SoundTouch devices. Use the IP address of this server on your local network - (e.g., http://192.168.1.100:8000) rather than + (e.g., http://192.0.2.100:8000) rather than localhost.

@@ -379,7 +379,7 @@ diff --git a/pkg/service/spotify/zeroconf.go b/pkg/service/spotify/zeroconf.go index 0e3ed96..c8a835f 100644 --- a/pkg/service/spotify/zeroconf.go +++ b/pkg/service/spotify/zeroconf.go @@ -15,7 +15,7 @@ func ZeroConfGetInfo(zcBaseURL string) ([]byte, error) { // PushSpotifyCredentials pushes Spotify credentials to a speaker using the full // ZeroConf DH key exchange protocol. Falls back to simplified token push if // the speaker does not support DH (older firmware). -// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.1.10:8200/zc". +// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.10.10:8200/zc". func PushSpotifyCredentials(zcBaseURL, username, accessToken string) error { return zeroconf.PushCredentials(zcBaseURL, username, accessToken) } diff --git a/pkg/service/zeroconf/zeroconf.go b/pkg/service/zeroconf/zeroconf.go index 0146933..f8b8a2d 100644 --- a/pkg/service/zeroconf/zeroconf.go +++ b/pkg/service/zeroconf/zeroconf.go @@ -300,7 +300,7 @@ func GetInfo(zcBaseURL string) ([]byte, error) { // PushCredentials pushes OAuth credentials to a speaker using the ZeroConf DH // key exchange protocol. If getInfo fails (older firmware without DH support), // it falls back to the simplified tokenType=accesstoken approach. -// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.1.10:8200/zc". +// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.10.10:8200/zc". func PushCredentials(zcBaseURL, username, accessToken string) error { base, err := validateZcBaseURL(zcBaseURL) if err != nil { diff --git a/scripts/prepare-release.sh b/scripts/prepare-release.sh index 88f4136..9648c96 100755 --- a/scripts/prepare-release.sh +++ b/scripts/prepare-release.sh @@ -133,7 +133,7 @@ import ( func main() { // Create client - c := client.New("192.168.1.100", 8090) + c := client.New("192.0.2.100", 8090) // Get device info info, err := c.GetInfo() @@ -161,10 +161,10 @@ Download the CLI tool for your platform from the releases below: ./soundtouch-cli -discover # Get device information -./soundtouch-cli -host 192.168.1.100 -info +./soundtouch-cli -host 192.0.2.100 -info # Monitor real-time events -./soundtouch-cli -host 192.168.1.100 -nowplaying +./soundtouch-cli -host 192.0.2.100 -nowplaying \`\`\` ## 🧪 Tested Hardware diff --git a/scripts/spotify/spotify-prime-speaker.sh b/scripts/spotify/spotify-prime-speaker.sh index e6cbcaa..9ec58b0 100644 --- a/scripts/spotify/spotify-prime-speaker.sh +++ b/scripts/spotify/spotify-prime-speaker.sh @@ -14,7 +14,7 @@ # ./spotify-prime-speaker SPEAKER_IP ACCESS_TOKEN # # Example: -# ./spotify-prime-speaker 192.168.1.143 BQDj...your_token... +# ./spotify-prime-speaker 192.0.2.143 BQDj...your_token... # # How to get an access token: # - Spotify Developer Console: https://developer.spotify.com diff --git a/tests/integration/http-client/http-client.env.json b/tests/integration/http-client/http-client.env.json index c909d4e..5bad6ed 100644 --- a/tests/integration/http-client/http-client.env.json +++ b/tests/integration/http-client/http-client.env.json @@ -6,8 +6,8 @@ "serialNumber": "K12345", "productCode": "SoundTouch test", "productSerialNumber": "237983", - "gatewayIp": "192.168.1.1", - "deviceIp": "192.168.1.100", + "gatewayIp": "192.0.2.1", + "deviceIp": "192.0.2.100", "macAddress1": "B05ECAFE", "macAddress2": "B05ECAFF", "accountId": "7654321", @@ -29,8 +29,8 @@ "serialNumber": "K12345", "productCode": "SoundTouch test", "productSerialNumber": "237983", - "gatewayIp": "192.168.1.1", - "deviceIp": "192.168.1.100", + "gatewayIp": "192.0.2.1", + "deviceIp": "192.0.2.100", "macAddress1": "B05ECAFE", "macAddress2": "B05ECAFF", "accountId": "7654321",