Sonos to resume previous state (Track + Volume) after notification


#1

1) Give a description of the problem
When music is playing and an alert comes through, i want to snapshot the (volume and track time) then after the alert happens revert back to the previous state and restore (volume and track time) saved and continue play.

2) What is the expected behavior?
I want my sonos speaker to revert back to previous state before notification

3) What is happening/not happening?
Speaker not playing after alert, when i press play on sonos app it repeats the notifications alert. (Kitchen door has been opened)

I’m not if i’m doing this correctly but can someone please help me achieve what i’m trying to do?
I have access to Sonos API if this will help me achieve this.


#2

I had the same exact problem with SONOS speakers.
When reading other forums (Smartthings and Sonos) I ended up giving on this idea because looked like it’s a common problem.
My solution was, after annoucement, playing another track.
IF trigger happens…
with
SONOS
speak text “XXXX”
wait 5 seconds
Play URI…“XXXX”

But i would love to see someone is solving this…


Sonos - Play Track & Resume Play
#3

Do you have the Sonos api?

This looks promising, pulling the Json info from the speaker and saving it then trying to send it back to the Sonos speaker to continue where it left off. I was able to pull the data but not sure how to send the Json info back to the speaker.

Parsing JSON data