Author Topic: Playing music on Sonos and have Voice alert  (Read 424 times)

Offline notchy

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-1
Playing music on Sonos and have Voice alert
« on: August 31, 2017, 09:53:16 am »
I have a question.
I have music playing on my Sonos and then I have a voice alert occur when my front door is opened.

The alert works and then the music stops. How do I get the music to continue ?

My luup code in the script

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",
                 {URIToPlay="x-file-cifs://SERVER/Data/Notifications/FrontDoorOpen.mp3", Volume=50},
                 9)

Offline notchy

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-1
Re: Playing music on Sonos and have Voice alert
« Reply #1 on: September 01, 2017, 07:26:52 am »
Just an update to my issue, I resolved it by actually using the "Say" parameter and the previous music resumes play. So all is good now.

Example: this is what i use now instead of playing an .mp3 file.
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
                 {Text="The Front door is open", Language="en", GroupZones="ALL",
                  Volume=40, SameVolumeForAll="true"}, 888)