I’m trying to let my SONOS speaker play a Welcome-Jingle when a WLAN-device is newly connected.
The music played when the device is detected should be stopped to play the jingle and resumed afterwards.
Using the code posted below, it works only sometimes.
The jingle starts playing, however to music played before(a favorite radio station) isn’t restored all the time. I’m unable to determine any logic when it does run as expected and when not.
Item Juergen_WLAN changed to ON
Thread::sleep(1000) 'give SONOS a break to react on comands
Thread::sleep(25000) /* the single MP3-File in the playlist runs for 20 secs, 5 secs added for savety */