Fix PlayNotificationBeep to use GET instead of POST

- Fixed HTTP method mismatch: /playNotification endpoint expects GET, not POST
- Updated PlayNotificationBeep() to use existing c.get() method with StationResponse model
- Resolves HTTP 400 errors when using 'soundtouch-cli sp beep' command
- Verified working with SoundTouch 20 hardware
- Added comprehensive troubleshooting documentation
- Updated feature history with bug fix details

Fixes: go run ./cmd/soundtouch-cli --host <device> sp beep
Previously failed with: 'API request failed with status 400'
Now works correctly alongside: curl http://<device>:8090/playNotification
This commit is contained in:
Tobias Gesellchen
2026-02-02 09:44:27 +01:00
parent 630757a0a1
commit 1ec3c6950c
4 changed files with 106 additions and 1 deletions
+2 -1
View File
@@ -1677,7 +1677,8 @@ func (c *Client) PlayCustom(playInfo *models.PlayInfo) error {
// PlayNotificationBeep plays a notification beep on the device
func (c *Client) PlayNotificationBeep() error {
return c.post("/playNotification", nil)
var status models.StationResponse
return c.get("/playNotification", &status)
}
// postPlayInfo sends a PlayInfo request to the /speaker endpoint