Home of the Squeezebox™ & Transporter® network music players.
Page 187 of 194 FirstFirst ... 87137177185186187188189 ... LastLast
Results 1,861 to 1,870 of 1937
  1. #1861
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    6,593
    Quote Originally Posted by Jobarr View Post
    My volume seems to get set to about 3% (2.999999...) every time I pause or stop and doesn't necessarily get reset when I press play again. Is this happening to anyone else? Any workarounds?
    There is a setting to allow LMS to control the volume. One of the options is only when playing. Could be related to that. Try changing the setting.

    Sent from my Pixel 3a using Tapatalk

  2. #1862
    Junior Member
    Join Date
    Jan 2021
    Posts
    7
    Quote Originally Posted by slartibartfast View Post
    There is a setting to allow LMS to control the volume.
    Both "only when playing" and "transparent forward" cause the issue. They also do other weird things, like sometimes the volume jumps all over the place and has to be reset multiple times before stabilizing. "Ignore all changes" works, but then I can't change the volume from LMS. I am not sure exactly where the issue lies, but it doesn't seem to matter which Chromecast device I use (Shield TV, Google Home Max, JVC Link 300, etc.). I thought it might even be the Material Skin for LMS, but changing that doesn't seem to help either, so I think it is the bridge or LMS itself. I don't have any other speakers to test with but Chromecast ones.

    At this point I have gone ahead and made Node-Red / Home Assistant reset the volume to a normal level if it drops under 3%, but that is kind of annoying too.
    Last edited by Jobarr; 2021-01-06 at 02:00.

  3. #1863
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    6,593
    Quote Originally Posted by Jobarr View Post
    Both "only when playing" and "transparent forward" cause the issue. They also do other weird things, like sometimes the volume jumps all over the place and has to be reset multiple times before stabilizing. "Ignore all changes" works, but then I can't change the volume from LMS. I am not sure exactly where the issue lies, but it doesn't seem to matter which Chromecast device I use (Shield TV, Google Home Max, JVC Link 300, etc.). I thought it might even be the Material Skin for LMS, but changing that doesn't seem to help either, so I think it is the bridge or LMS itself. I don't have any other speakers to test with but Chromecast ones.

    At this point I have gone ahead and made Node-Red / Home Assistant reset the volume to a normal level if it drops under 3%, but that is kind of annoying too.
    I have seen the volume jump around but I don't use it enough to know if that is common. Are you transcoding to FLAC or passing the audio straight through?

    Sent from my Pixel 3a using Tapatalk

  4. #1864
    Junior Member
    Join Date
    Jan 2021
    Posts
    7
    Quote Originally Posted by slartibartfast View Post
    Are you transcoding to FLAC or passing the audio straight through?
    Transcoding/decoding to pcm with flow.

  5. #1865
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,942
    Quote Originally Posted by Jobarr View Post
    Both "only when playing" and "transparent forward" cause the issue. They also do other weird things, like sometimes the volume jumps all over the place and has to be reset multiple times before stabilizing. "Ignore all changes" works, but then I can't change the volume from LMS. I am not sure exactly where the issue lies, but it doesn't seem to matter which Chromecast device I use (Shield TV, Google Home Max, JVC Link 300, etc.). I thought it might even be the Material Skin for LMS, but changing that doesn't seem to help either, so I think it is the bridge or LMS itself. I don't have any other speakers to test with but Chromecast ones.

    At this point I have gone ahead and made Node-Red / Home Assistant reset the volume to a normal level if it drops under 3%, but that is kind of annoying too.
    Are you using the control from the CC device as well? Going to 0 is due to what LMS does when pausing. It sends a volume 0 *before* the pause command ...

    Also, please post a log so I can see all volume commands exchanged
    Last edited by philippe_44; 2021-01-06 at 02:30.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  6. #1866
    Junior Member
    Join Date
    Jan 2021
    Posts
    7
    Quote Originally Posted by philippe_44 View Post
    Are you using the control from the CC device as well? Going to 0 is due to what LMS does when pausing. It sends a volume 0 *before* the pause command ...

    Also, please post a log so I can see all volume commands exchanged
    No, I am only controlling the volume via LMS when this happens. Would it be possible to just ignore it when LMS tries to set the volume to 0? I don't really see why that is even necessary.

    Does this log have what you need? Starting from 2.9999999329447746% (according to Home Assistant, 3% in LMS UI), I played a track, set the volume to 43% (according to the UI, looks like 42 in the log), pressed pause, the volume dropped back to 2.9...%, pressed play and it didn't go back up.

    log.txt

    Edit: I have also seen the stream start playing again on its own after pausing, but that is harder to make happen.
    Last edited by Jobarr; 2021-01-06 at 03:08.

  7. #1867
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,942

    Announce: CastBridge = integrate Chromecast players with LMS (squeeze2cast)

    Quote Originally Posted by Jobarr View Post
    No, I am only controlling the volume via LMS when this happens. Would it be possible to just ignore it when LMS tries to set the volume to 0? I don't really see why that is even necessary.
    As a bridge, I have no idea why the volume is set to 0 or not, so I have to forward it. Remember it happens *before* the request to pause is received, so I don’t know why volume is being changed. User request or pausing???
    Does this log have what you need? Starting from 2.9999999329447746% (according to Home Assistant, 3% in LMS UI), I played a track, set the volume to 43% (according to the UI, looks like 42 in the log), pressed pause, the volume dropped back to 2.9...%, pressed play and it didn't go back up.

    log.txt

    Edit: I have also seen the stream start playing again on its own after pausing, but that is harder to make happen.
    Yes, the log is good. When you say the volume does not come back, what do you have in the UI? 43% or 3%?

    The culprit seems to be volume feedback. This is a difficult feature where you can change the volume on the player or using another controller and it will be reflected on LMS and becomes the "official" volume. Now, every command sent by LMS creates an "echo" volume returned by the player. When the "echo" equals the command, then I consider that echo shall be ignored. Now, remember echo are asynchronous, I don't know where they come from. So when I receive and "echo", if it is NOT equals (enough) to my request, I assume it's a direct user interaction with the device and that volume now becomes the "official" volume for LMS.

    In your case, the CC devices acts funny with volume and *refuses* to go to 0. It's stuck at 0.03, so I order 0 and later I see volume is 3... I can only assume that 3 has been set by another mean and then I tell LMS "volume is 3 now" .... Your player *should* set the volume to 0 when it is asked to, not to 0.03.

    I believe it’s a bug in the CC device but I’ve added a version with yet another parameter to disable feedback
    Last edited by philippe_44; 2021-01-06 at 20:05.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  8. #1868
    Junior Member
    Join Date
    Jan 2021
    Posts
    7
    Quote Originally Posted by philippe_44 View Post
    As a bridge, I have no idea why the volume is set to 0 or not, so I have to forward it. Remember it happens *before* the request to pause is received, so I don’t know why volume is being changed. User request or pausing???
    Ah ha. That makes sense now! Thanks for explaining.

    Quote Originally Posted by philippe_44 View Post
    When you say the volume does not come back, what do you have in the UI? 43% or 3%?
    It showed the 3% if I remember right. That is, it started at 3, I turned it up, paused it, it dropped to 3% on the device and in the UI and never returned after playing again.

    Quote Originally Posted by philippe_44 View Post
    The culprit seems to be volume feedback.
    That fits perfectly with what I have seen, some sort of echo feedback loop. It probably kept trying to set it to 0%, seeing it bumped up to 3%, and then assumed that 3% was the correct value that I set manually, so it never saw a need to return to 43%. Even times when the volume seems to jump around and needs to be reset several times before stabilizing, it seems like LMS is constantly trying to catch up with what the device is doing while making things worse by also adjusting the device at the same time, causing it to have to catch up again. In any case, no matter what value I set the device to in the UI, it is never exactly that value on the device. It is always off by some small amount.

    Quote Originally Posted by philippe_44 View Post
    I believe it’s a bug in the CC device but I’ve added a version with yet another parameter to disable feedback
    The fact that it is not going to 0 might be a bug, but I have definitely seen this weird feedback loop behavior on multiple devices from multiple manufacturers (Nvidia, Google, and JVC). I just updated and will try disabling the feedback to LMS. I can definitely live without that function, and that sounds like it might solve the issue. Thanks a lot.

    I am still seeing an odd bug occasionally where it starts playing again after pausing it or even pausing it after playing. I am having a had time reproducing it, but I think I caught it here once: log2.txt. Might this be the same issue? Is it possible that LMS is seeing the "playing" or "paused" status with a slight delay and then playing or pausing when it shouldn't? Maybe it would make sense to ignore all feedback for x seconds after any change?

    Edit: Disabling the volume feedback is working well so far! (5+ hours, with lots of pausing and resuming)
    Last edited by Jobarr; 2021-01-07 at 08:30.

  9. #1869
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,942
    Quote Originally Posted by Jobarr View Post
    Ah ha. That makes sense now! Thanks for explaining.


    It showed the 3% if I remember right. That is, it started at 3, I turned it up, paused it, it dropped to 3% on the device and in the UI and never returned after playing again.



    That fits perfectly with what I have seen, some sort of echo feedback loop. It probably kept trying to set it to 0%, seeing it bumped up to 3%, and then assumed that 3% was the correct value that I set manually, so it never saw a need to return to 43%. Even times when the volume seems to jump around and needs to be reset several times before stabilizing, it seems like LMS is constantly trying to catch up with what the device is doing while making things worse by also adjusting the device at the same time, causing it to have to catch up again. In any case, no matter what value I set the device to in the UI, it is never exactly that value on the device. It is always off by some small amount.


    The fact that it is not going to 0 might be a bug, but I have definitely seen this weird feedback loop behavior on multiple devices from multiple manufacturers (Nvidia, Google, and JVC). I just updated and will try disabling the feedback to LMS. I can definitely live without that function, and that sounds like it might solve the issue. Thanks a lot.

    I am still seeing an odd bug occasionally where it starts playing again after pausing it or even pausing it after playing. I am having a had time reproducing it, but I think I caught it here once: log2.txt. Might this be the same issue? Is it possible that LMS is seeing the "playing" or "paused" status with a slight delay and then playing or pausing when it shouldn't? Maybe it would make sense to ignore all feedback for x seconds after any change?

    Edit: Disabling the volume feedback is working well so far! (5+ hours, with lots of pausing and resuming)
    I'll look into the log, but I can't ignore the feedback because this is what allows me to confirm me that (e.g.) playback has started and that would have many ramification in the state machine to inform LMS of the status. In addition, I really hate using timers, usually they are crutches that ultimately lead to disaster. In any case, for command like play/pause/stop, the cast protocol offers a transaction ID that I'm using to discard any status information ID that is older than the most recent request ID, so it should be filtered out (I mean a "'paused" status polled after a "play" request has been sent will have a transaction ID lower than the play request ID and will be ignored). I'll investigate to see if there is some race condition.

    Still, the volume has a filtering timer to avoid ping-pong of the echo effect (i.e. when I send a command, every feedback is ignored within 1 sec) but volume is not an event, it's a status (like everything), that's why the "request 0 and read -anytime- that 3 got set" in your case was still failing, no filtering loop would have avoided that, no transaction ID would either.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  10. #1870
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,942
    I looked at the log:
    First, the pause request is sent by LMS. It is acknowledged and confirmed to the LMS "side" of the bridge
    Code:
    [09:14:42.732774] process_strm:238 [0xba14c0] strm command p
    [09:14:42.732791] process_strm:268 [0xba14c0] pause (interval:0)
    [09:14:42.732811] sq_callback:257 callback for Living room Shield (4)
    [09:14:42.732845] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"PAUSE","requestId":379,"mediaSessionId":1}
    [09:14:42.732864] CastSimple:199 [0xc28d40]: Immediate PAUSE (id:379)
    [09:14:42.732883] sendSTAT:169 [0xba14c0]: STAT:[STMp] msplayed 55781
    [09:14:42.781611] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:379) PAUSED
    [09:14:42.800856] stream_thread:436 [0xba14c0] streambuf read 90112 bytes
    [09:14:43.733051] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:43.777300] CastSocketThread:731 [0xc28d40]: type:RECEIVER_STATUS (id:378)
    [09:14:43.777526] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":380,"mediaSessionId":1}
    [09:14:43.825689] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:380) PAUSED
    [09:14:44.733668] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:44.826001] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":381,"mediaSessionId":1}
    [09:14:44.873767] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:381) PAUSED
    [09:14:44.873884] _SyncNotifyState:485 Living room Shield: Cast pause
    [09:14:44.873938] sq_notify:633 [0xba14c0] track paused at 7650736
    Then we are paused for a few seconds and every second there is a status poll
    Code:
    [09:14:45.874089] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":382,"mediaSessionId":1}
    [09:14:45.921726] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:382) PAUSED
    [09:14:46.001162] process:500 [0xba5880] strm
    [09:14:46.001233] process_strm:241 [0xba5880] strm command t
    [09:14:46.001253] sendSTAT:169 [0xba5880]: STAT:[STMt] msplayed 0
    [09:14:46.001385] process:500 [0xbc32c0] strm
    [09:14:46.002119] process_strm:241 [0xbb6780] strm command t
    [09:14:46.002177] sendSTAT:169 [0xbb6780]: STAT:[STMt] msplayed 0
    [09:14:46.922072] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":383,"mediaSessionId":1}
    [09:14:46.974692] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:383) PAUSED
    [09:14:47.003116] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:47.975029] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":384,"mediaSessionId":1}
    [09:14:48.004048] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:48.021718] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:384) PAUSED
    Suddenly, the Cast side of the bridge receives an unsolicited status that says that the chromecast device is playing, as if somebody pressed on "play" from the device (or a controller) directly
    Code:
    [09:14:49.004779] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:49.022034] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":385,"mediaSessionId":1}
    [09:14:49.069836] CastSocketThread:728 [0xc28d40]: type:MEDIA_STATUS (id:385) PAUSED
    [09:14:50.005508] sendSTAT:169 [0xba14c0]: STAT:[STMt] msplayed 55781
    [09:14:50.071407] _SyncNotifyState:455 [0xc28d40]: Cast playing
    [09:14:50.071509] sq_notify:601 [0xba14c0] resume notification (paused time 14985)
    [09:14:50.071530] sq_notify:621 [0xba14c0] unsollicited play
    [09:14:50.071705] cli_open_socket:186 [0xba14c0]: opened CLI socket 29
    [09:14:50.073168] process:500 [0xba14c0] audg
    [09:14:50.073266] process_audg:406 [0xba14c0] (old) audg gainL: 0 gainR: 0
    [09:14:50.079542] SendCastMessage:235 [0x7f5b300091c0]: Cast sending: {"type":"GET_STATUS","requestId":386,"mediaSessionId":1}
    [09:14:50.079648] sq_callback:257 callback for Living room Shield (7)
    So I don't know what to say... the whole process is compliant to what is expected, it just seems that the CC decides to restart and his own...
    Last edited by philippe_44; 2021-01-07 at 20:08.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •