Announcement

Collapse
No announcement yet.

When Pause -> Playing player is started but state is updated 12 sec later

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

    When Pause -> Playing player is started but state is updated 12 sec later

    Im keeping track of the Sonos State. This is Stopped, Pause or Playing.
    When going from Playing -> Pause the state is updated almost immediate.
    When going from Pause -> Playing the player is started immediate but the state is updated almost 12 seconds later.
    Why does this takes so long?

    Thank you

    #2
    Originally posted by wallee View Post
    Im keeping track of the Sonos State. This is Stopped, Pause or Playing.
    When going from Playing -> Pause the state is updated almost immediate.
    When going from Pause -> Playing the player is started immediate but the state is updated almost 12 seconds later.
    Why does this takes so long?

    Thank you
    Baring an issue with your network or PC, it depends on what content you have selected to play. You have to keep in mind that any Sonos player, is not really playing real-time, it builds up a stream and depending on the BW and latency, it will take longer to build up that buffer, so it could take some time. For example, most streaming radiostations, takes many seconds to build up its streaming buffer. The player will go from stopped (or paiused) to transition to play. The PI suppresses the transition state so it could take seconds before the player reports playing state to the PI.

    Comment


      #3
      Originally posted by dcorsus View Post

      Baring an issue with your network or PC, it depends on what content you have selected to play. You have to keep in mind that any Sonos player, is not really playing real-time, it builds up a stream and depending on the BW and latency, it will take longer to build up that buffer, so it could take some time. For example, most streaming radiostations, takes many seconds to build up its streaming buffer. The player will go from stopped (or paiused) to transition to play. The PI suppresses the transition state so it could take seconds before the player reports playing state to the PI.
      Thanks for explaination. Im using the Spotify service. Then i have to program my events and take into account this delay.

      Comment


        #4
        Originally posted by wallee View Post

        Thanks for explaination. Im using the Spotify service. Then i have to program my events and take into account this delay.
        if you explain what it is you are trying to do, maybe we (I) can help? Screenshots of your events tends to make things clear

        Comment


          #5
          wallee
          Another question I should have asked (because 12 seconds sound long), how do you time this? Are you looking at your web-browser and see when the status changes on your browser or is this based on events you timed or logs (timestamps) you analyzed?
          Just note that the browser updates state on a polling cycle, so depending on the periodicity setting of the polling, it will add to delayed updates in the browser.

          Comment


            #6
            Originally posted by dcorsus View Post
            wallee
            Another question I should have asked (because 12 seconds sound long), how do you time this? Are you looking at your web-browser and see when the status changes on your browser or is this based on events you timed or logs (timestamps) you analyzed?
            Just note that the browser updates state on a polling cycle, so depending on the periodicity setting of the polling, it will add to delayed updates in the browser.
            Hi,
            I checked the timestamps in the HS log. I tryed many times but the delay from 12 seconds stays the same.

            Comment


              #7
              I have the same issue. SONOS shows 'stopped'. I hit play on the SONOS app on the phone and start counting. It's 10-12 seconds before any triggered events start (starting my audio equipment through HS, etc). Here's the Event I'm using for when SONOS changes state to PLAYING. Otherwise I love the PI and this is more of a small nuisance than anything.

              Comment


                #8
                Originally posted by OmahaRob View Post
                I have the same issue. SONOS shows 'stopped'. I hit play on the SONOS app on the phone and start counting. It's 10-12 seconds before any triggered events start (starting my audio equipment through HS, etc). Here's the Event I'm using for when SONOS changes state to PLAYING. Otherwise I love the PI and this is more of a small nuisance than anything.
                See my previous postings, what is it you are trying to play? If it is streaming services, depending on your network bandwidth and latency, it could take seconds and the play event is only generated by the player (the PI just acts upon what it is sent) when the play actually starts, which will be different from when you hit play.

                Here are a couple of things to try;

                1/ when you hit play on the sonos app, when does the music actually start? Immediately? What is the delta between music actually playing and the trigger of the event? I had tuneIn channels that could easily take 10 seconds to buffer up before playing starts.
                2/ if you set the debug level to errors and events (don't change the UPNP debug level), create a very simple event, that just instructs the player to play, trigger the event and capture the log. We can now see exactly when the play event was issued and when we start seeing events from the player and determine where the delay is happening. You can post the log if you want, glad to look at it.

                Comment


                  #9
                  I try some things:
                  When loading a local mp3 file the delay is very short, only 1/2 seconds.
                  When using Apple Music or Spotify services when hitting the play button music is immediate started but the player state is update 10/12 seconds later.
                  As you said before when the sonos player is also 10/12 seconds delaying then the plugin cant do much about it.
                  Mabe there is another method to get the actually playstate? I also see that the album cover is updated really fast.


                  Comment

                  Working...
                  X