Answered

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

  • 9 January 2019
  • 3 replies
  • 595 views

Badge +1
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

View original

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

3 replies

Userlevel 7
Badge +23
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).
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 7
Badge +23
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.