Announcement

Collapse
No announcement yet.

Feature request

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Feature request

    As my system has grown, I have discovered that if a linkgroup grows over 8 clients, the announcement can begin before the linkgroup can be fully built within the Sonos clients. The result is that some clients may be skipped or may come into the group after the announcement has finished.

    Would it be possible to add a configuration option to build in a delay for the announcement to be sent to give the linkgroup more time to build? I have looked at the Sonos devices with the Sonos app and it appears a 3-5 second delay is enough for all 12 of my clients to be added to a linkgroup. I do not announce to more than 9 clients at a time. I tried to do this in my master control script, but since the plug-in doesn't start building the linkgroup until the hs.speak command has been sent, there is no way to build in a delay. Hopefully this makes sense.

    If this delay could be in the Sonos.ini file, it could be written by an immediate script if one wanted to change the delay.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    #2
    + 1!!



    Would be nice to have acces to this feature outside of script too


    edit: Creating an event with :

    Action 1: link the group
    Action 2: add a delay
    Action 3: speak something in ex. $SONOS$All$

    I presume with your post that it will change nothing and the group will be created two times ( action 1 and 3)

    Comment


      #3
      Originally posted by Summerguy View Post
      + 1!!



      Would be nice to have acces to this feature outside of script too


      edit: Creating an event with :

      Action 1: link the group
      Action 2: add a delay
      Action 3: speak something in ex. $SONOS$All$

      I presume with your post that it will change nothing and the group will be created two times ( action 1 and 3)
      I would like the delay to be a value on the config page. If one wanted to, this value could be changed by a script, but it would probably be fine to arbitrarily enter a value on the config page and never touch it.

      I think you are correct. It is my understanding that when the hs.speak command is sent or a speak action from an event is initiated, the plug-in first builds the linkgroup, then speaks. I don't know what it does if the group is already linked.

      An alternate solution would be if the plug-in "knows" when a linkgroup has been built and to hold the TTS until it is complete. I have watched the groups build in the Sonos app and with 4 or 5 clients the group gets built prior to the announcement beginning. With 8 or more clients the group is still being assembled when the announcement starts.

      EDIT: I just tested building a Linkgroup first, then speaking to the linkgroup second and I get the following error:

      Mar-18 5:14:49 PM Sonos Warning Warning in SaveCurrentTrackInfo for zoneplayer - Upstairs Bath Track info is being stored and overwriting previously stored info

      I'm guessing the build linkgroup triggered from the master device first stores the current state of the players, then builds the linkgroup. The following speak action repeats the process. This could lead to the Sonos client not reverting to their pre-announcement state and linking.
      Last edited by randy; March 18, 2018, 06:19 PM.
      HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        Originally posted by rprade View Post
        I would like the delay to be a value on the config page. If one wanted to, this value could be changed by a script, but it would probably be fine to arbitrarily enter a value on the config page and never touch it.

        I think you are correct. It is my understanding that when the hs.speak command is sent or a speak action from an event is initiated, the plug-in first builds the linkgroup, then speaks. I don't know what it does if the group is already linked.

        An alternate solution would be if the plug-in "knows" when a linkgroup has been built and to hold the TTS until it is complete. I have watched the groups build in the Sonos app and with 4 or 5 clients the group gets built prior to the announcement beginning. With 8 or more clients the group is still being assembled when the announcement starts.

        EDIT: I just tested building a Linkgroup first, then speaking to the linkgroup second and I get the following error:

        Mar-18 5:14:49 PM Sonos Warning Warning in SaveCurrentTrackInfo for zoneplayer - Upstairs Bath Track info is being stored and overwriting previously stored info

        I'm guessing the build linkgroup triggered from the master device first stores the current state of the players, then builds the linkgroup. The following speak action repeats the process. This could lead to the Sonos client not reverting to their pre-announcement state and linking.
        Quite interesting that some players are late grouping.
        Here are the steps the PI takes:
        1/ save state all players involved
        2/ stop play on source player
        3/ link all participating players to source (this goes in parallel, the PI doesn't wait)
        4/ wait for source player to be in right state (stopped)
        5/ convert text to file
        6/ instruct source player to play.


        It has always been that the last step is the one that takes the longest but I've seen Sonos introducing different behavior over the years wrt to how players get linked and nowadays there is a ton of messages flooding the system and yes, the more players you have the more messages go between all the players. If on top of that, you have many players participating, you have a big flood.

        So there are 3 ways you could experiment.

        First there are two settings in the .ini file you can play with (note these values are only read at init of the PI)

        AnnouncementWaitBetweenPlayers=2
        AnnouncementWaitforPlayTime=0

        The first is on 10th of a second and will increase the overall wait linear with the # of participating players.
        The second is a check against your overall time and is in seconds.

        However, if you want to script, perhaps your best option is to use SAPI tages and build a silence delay in your text at the start of the string ex. <silence msec='500'/>

        Dirk




        Comment


          #5
          Originally posted by dcorsus View Post
          Quite interesting that some players are late grouping.
          Here are the steps the PI takes:
          1/ save state all players involved
          2/ stop play on source player
          3/ link all participating players to source (this goes in parallel, the PI doesn't wait)
          4/ wait for source player to be in right state (stopped)
          5/ convert text to file
          6/ instruct source player to play.


          It has always been that the last step is the one that takes the longest but I've seen Sonos introducing different behavior over the years wrt to how players get linked and nowadays there is a ton of messages flooding the system and yes, the more players you have the more messages go between all the players. If on top of that, you have many players participating, you have a big flood.

          So there are 3 ways you could experiment.

          First there are two settings in the .ini file you can play with (note these values are only read at init of the PI)

          AnnouncementWaitBetweenPlayers=2
          AnnouncementWaitforPlayTime=0

          The first is on 10th of a second and will increase the overall wait linear with the # of participating players.
          The second is a check against your overall time and is in seconds.

          However, if you want to script, perhaps your best option is to use SAPI tages and build a silence delay in your text at the start of the string ex. <silence msec='500'/>

          Dirk


          I am already using a SAPI tag for delay, but it would be better if i could apply it to all announcements rather than having to add it to every speak action.

          My settings are currently:
          AnnouncementWaitforPlayTime=0
          AnnouncementWaitBetweenPlayers=0

          I'll play with those settings in the ini file. They may do the trick. Give me a few days and I will post back.
          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment

          Working...
          X