Answered

Can SmartThings can "Pause/Play" Sonos but does it *know* the current state?


Badge +1
  • Contributor III
  • 15 replies
For a variety of Home Automation tasks I would like to know whether Sonos is in "Play" or "Pause" state for the whole group and for each individual speaker.

I use SmartThings and Stringify - how can they (or another tool) see the current state of the Sonos?
icon

Best answer by controlav 9 January 2019, 16:46

The Sonos Cloud API will let you determine whether a group is in play or pause state. https://developer.sonos.com/reference/control-api/playback/getplaybackstatus/

I am unfamiliar with SmartThings and Stringify.

View original

3 replies

Userlevel 4
Badge +20
The Sonos Cloud API will let you determine whether a group is in play or pause state. https://developer.sonos.com/reference/control-api/playback/getplaybackstatus/

I am unfamiliar with SmartThings and Stringify.
Badge +1
This is brilliant - the API can provide the status of the groups ... I have a programming background ... but don't programme any more ... to get me started what do I need to do to obtain this information (I am not wanting to waste your time teaching me the basics but just wanting the key words that I need to resarch so that I can extract the data on the play back status (what I get back is it '0' or '1' of full details of the song playing? ... also then how do I get this information in a format so that I can use it as a trigger for other Home Automation tools.

Thanks,
Christopher
Userlevel 4
Badge +20
Firstly you need to Authorize your account against the Sonos outh2 endpoint, find the household (you likely only have one), find the group you want to control, then issue that above GET command. That site shows how to do these things - oauth is a bit tricky if you haven't done it before, the rest is normal REST (pun intended).

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

Accept cookies Cookie settings