Sonos restore no longer working since new handler for Sonos


#1

1) Give a description of the problem
Since SmartThings put out a “new” connection to Sonos, “resume” and “restore” no longer work after playing a hosted MP3/alert

2) What is the expected behaviour?
If I’m listening to music, it used to pause the music, announce the alert, then continue with the music. This is what I expected.

3) What is happening/not happening?
Pauses music. Plays alert. Then nothing happens.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full

8/20/2020, 12:25:45 PM +816ms
+58ms ╔Stopping piston...
+139ms ╚Piston successfully stopped (82ms)
8/20/2020, 12:19:15 PM +123ms
+1ms ╔Received event [Office Lights].switch = off with a delay of 106ms
+68ms ║RunTime Analysis CS > 18ms > PS > 36ms > PE > 14ms > CE
+70ms ║Runtime (37321 bytes) successfully initialized in 36ms (v0.3.110.20191009) (68ms)
+71ms ║╔Execution stage started
+78ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+79ms ║║Cancelling condition #2's schedules...
+80ms ║║Condition #2 evaluated true (5ms)
+81ms ║║Cancelling condition #1's schedules...
+82ms ║║Condition group #1 evaluated true (state changed) (7ms)
+84ms ║║Cancelling statement #3's schedules...
+99ms ║║Executed physical command [Office Sonos].playTrackAndRestore([http://www.fleetmack.com/tts/welcomehome.mp3]) (9ms)
+100ms ║║Executed [Office Sonos].playTrackAndRestore (11ms)
+102ms ║╚Execution stage complete. (31ms)
+103ms ╚Event processed successfully (103ms)
8/20/2020, 12:19:05 PM +448ms
+1ms ╔Received event [Office Lights].switch = on with a delay of 95ms
+68ms ║RunTime Analysis CS > 17ms > PS > 33ms > PE > 18ms > CE
+71ms ║Runtime (37317 bytes) successfully initialized in 33ms (v0.3.110.20191009) (68ms)
+71ms ║╔Execution stage started
+78ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+79ms ║║Condition #2 evaluated false (4ms)
+80ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+82ms ║╚Execution stage complete. (11ms)
+83ms ╚Event processed successfully (83ms)
8/20/2020, 12:19:00 PM +462ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+258ms ║╔Subscribing to devices...
+302ms ║║Subscribing to Office Lights.switch...
+398ms ║║Subscribing to Office Sonos...
+399ms ║╚Finished subscribing (149ms)
+429ms ║Cancelling condition #2's schedules...
+430ms ║Cancelling condition #1's schedules...
+444ms ╚Piston successfully started (443ms)
8/20/2020, 12:17:48 PM +280ms
+0ms ╔Received event [Home].time = 1597947469952 with a delay of -1672ms
+103ms ║RunTime Analysis CS > 30ms > PS > 56ms > PE > 16ms > CE
+106ms ║Runtime (37480 bytes) successfully initialized in 56ms (v0.3.110.20191009) (104ms)
+107ms ║╔Execution stage started
+132ms ║║Executed physical command [Office Sonos].previousTrack() (14ms)
+133ms ║║Executed [Office Sonos].previousTrack (16ms)
+136ms ║╚Execution stage complete. (30ms)
+137ms ╚Event processed successfully (137ms)
8/20/2020, 12:17:29 PM +829ms
+1ms ╔Received event [Office Lights].switch = off with a delay of 112ms
+79ms ║RunTime Analysis CS > 22ms > PS > 43ms > PE > 14ms > CE
+81ms ║Runtime (37482 bytes) successfully initialized in 43ms (v0.3.110.20191009) (79ms)
+82ms ║╔Execution stage started
+88ms ║║Comparison (enum) off changes_to (string) off = true (0ms)
+90ms ║║Cancelling condition #2's schedules...
+91ms ║║Condition #2 evaluated true (6ms)
+92ms ║║Cancelling condition #1's schedules...
+92ms ║║Condition group #1 evaluated true (state changed) (7ms)
+94ms ║║Cancelling statement #3's schedules...
+117ms ║║Executed physical command [Office Sonos].playTrackAndResume([http://www.fleetmack.com/tts/welcomehome.mp3]) (17ms)
+118ms ║║Executed [Office Sonos].playTrackAndResume (19ms)
+121ms ║║Executed virtual command [Office Sonos].wait (0ms)
+123ms ║║Requesting a wake up for Thu, Aug 20 2020 @ 12:17:49 PM MDT (in 20.0s)
+126ms ║╚Execution stage complete. (45ms)
+128ms ║Setting up scheduled job for Thu, Aug 20 2020 @ 12:17:49 PM MDT (in 19.996s)
+133ms ╚Event processed successfully (133ms)
8/20/2020, 12:17:22 PM +274ms
+2ms ╔Received event [Office Lights].switch = on with a delay of 96ms
+70ms ║RunTime Analysis CS > 19ms > PS > 34ms > PE > 17ms > CE
+72ms ║Runtime (37478 bytes) successfully initialized in 34ms (v0.3.110.20191009) (70ms)
+73ms ║╔Execution stage started
+80ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+81ms ║║Condition #2 evaluated false (4ms)
+82ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+84ms ║╚Execution stage complete. (10ms)
+85ms ╚Event processed successfully (84ms)
8/20/2020, 12:17:17 PM +355ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+228ms ║╔Subscribing to devices...
+234ms ║║Subscribing to Office Lights.switch...
+299ms ║║Subscribing to Office Sonos...
+301ms ║╚Finished subscribing (81ms)
+329ms ║Cancelling condition #2's schedules...
+330ms ║Cancelling condition #1's schedules...
+337ms ╚Piston successfully started (337ms)
8/20/2020, 12:16:37 PM +134ms
+0ms ╔Received event [Home].time = 1597947398413 with a delay of -1279ms
+55ms ║RunTime Analysis CS > 17ms > PS > 29ms > PE > 8ms > CE
+57ms ║Runtime (37473 bytes) successfully initialized in 29ms (v0.3.110.20191009) (56ms)
+58ms ║╔Execution stage started
+76ms ║║Executed physical command [Office Sonos].previousTrack() (6ms)
+77ms ║║Executed [Office Sonos].previousTrack (7ms)
+79ms ║╚Execution stage complete. (21ms)
+80ms ╚Event processed successfully (80ms)
8/20/2020, 12:16:30 PM +210ms
+2ms ╔Received event [Office Lights].switch = off with a delay of 100ms
+166ms ║RunTime Analysis CS > 19ms > PS > 34ms > PE > 112ms > CE
+168ms ║Runtime (37479 bytes) successfully initialized in 34ms (v0.3.110.20191009) (166ms)
+169ms ║╔Execution stage started
+176ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+177ms ║║Cancelling condition #2's schedules...
+178ms ║║Condition #2 evaluated true (5ms)
+179ms ║║Cancelling condition #1's schedules...
+180ms ║║Condition group #1 evaluated true (state changed) (7ms)
+182ms ║║Cancelling statement #3's schedules...
+197ms ║║Executed physical command [Office Sonos].playTrackAndResume([http://www.fleetmack.com/tts/welcomehome.mp3]) (10ms)
+198ms ║║Executed [Office Sonos].playTrackAndResume (12ms)
+201ms ║║Executed virtual command [Office Sonos].wait (0ms)
+202ms ║║Requesting a wake up for Thu, Aug 20 2020 @ 12:16:38 PM MDT (in 8.0s)
+206ms ║╚Execution stage complete. (37ms)
+207ms ║Setting up scheduled job for Thu, Aug 20 2020 @ 12:16:38 PM MDT (in 7.996s)
+215ms ╚Event processed successfully (215ms)
8/20/2020, 12:16:18 PM +858ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+399ms ║╔Subscribing to devices...
+430ms ║║Subscribing to Office Lights.switch...
+601ms ║║Subscribing to Office Sonos...
+602ms ║╚Finished subscribing (216ms)
+661ms ╚Piston successfully started (659ms)
8/20/2020, 12:16:09 PM +39ms
+1ms ╔Received event [Office Lights].switch = on with a delay of 55ms
+54ms ║RunTime Analysis CS > 20ms > PS > 26ms > PE > 8ms > CE
+56ms ║Runtime (37464 bytes) successfully initialized in 26ms (v0.3.110.20191009) (54ms)
+57ms ║╔Execution stage started
+64ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+66ms ║║Cancelling condition #2's schedules...
+67ms ║║Condition #2 evaluated false (6ms)
+68ms ║║Cancelling condition #1's schedules...
+69ms ║║Condition group #1 evaluated false (state changed) (7ms)
+70ms ║╚Execution stage complete. (13ms)
+71ms ╚Event processed successfully (71ms)