Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305

    Adding new / overloading existing command

    Hi - Is this possible to either add a new or (better) overlaoding a CLI command?

    I'm trying to resolve an old issue with all my bridges about volume management.

    When the volume is changed locally (on the upnp/cast/raop) player, I detect that and forward it to LMS using CLI using a setvolume command. Unfortunately, it's a "set" volume, so LMS issues a slimproto command in return that I receive and forward to the player, and if there is any small offset due to volume scales translation, that "echo" change can be detected or notified ... and it creates a loop.

    I've added timestamps and filters to that, but there is no good solution that works in all cases. The current version sets a timestamp on the "local" volume change detection and if a LMS slimproto command arrives within the next, say 500ms, it's discarded. It's not perfect as some LMS controller (iPeng or other) used to send a series of volume changes when you slide a cursor and in that case, some might be filtered out because of the filtering. They are wrongly detected as "echo" although they are legitimate commands.

    The best solution would be to have the option in LMS to just "notify" avolume change so that the GUI and controller listening to are notified, but no "set" should be issued. Hence, the initial question: ideally, I'd like to extend the "set volume" CLI command, add a boolean that says it's just a notofication, notify the listeners but *not* issue any slimproto command to players. I could as well add a slimproto command to notify volume change, but I still need the GUI/listener update and *no* slimproto command from LMS to be sent to players

    Thanks
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  2. #2
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,185

    Adding new / overloading existing command

    What I do in iPeng is that I use floating point volumes (e.g. 10.001) to differentiate my own changes from external ones to avoid loops.

    But generally itís the most complex topic Iím handling in iPeng, I also count my own commands.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  3. #3
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305
    Quote Originally Posted by pippin View Post
    What I do in iPeng is that I use floating point volumes (e.g. 10.001) to differentiate my own changes from external ones to avoid loops.

    But generally itís the most complex topic Iím handling in iPeng, I also count my own commands.
    I agree, I've sent a disproportionate amount of time trying to handle that properly, compared to many other features that should have been more complicated. Unfortunately, I'm not sure I can use the "signing" of volume because I receive the command through the audg slimproto and I use the "old" gain command of 0..128, but there is that "new" value of 16.16 and I might be able to use this, thanks for the suggestion
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  4. #4
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305

    Adding new / overloading existing command

    Quote Originally Posted by philippe_44 View Post
    I agree, I've sent a disproportionate amount of time trying to handle that properly, compared to many other features that should have been more complicated. Unfortunately, I'm not sure I can use the "signing" of volume because I receive the command through the audg slimproto and I use the "old" gain command of 0..128, but there is that "new" value of 16.16 and I might be able to use this, thanks for the suggestion
    I tried that but the audg command, even when using "new gain (16.16)", does not send any difference between 40 and 40.1, so I cannot make my own "special" volume id - too bad, that was a very good idea
    Last edited by philippe_44; 2017-09-19 at 22:57.
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

Posting Permissions

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