Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1

    Plugin development primer?

    I hope I'm posting this in the right forum: Is there any introduction or tutorial on plugin development for LMS? I've browsed the Wiki, but all I could find there seemed rather dated with a lot of broken links to example code e.g.

    Did I just not look closely enough? If not on the Wiki, are there any other resources to get me started? Or am I on my own here?

    Thanks in advance for any help!

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,864
    Quote Originally Posted by Manul View Post
    I hope I'm posting this in the right forum: Is there any introduction or tutorial on plugin development for LMS? I've browsed the Wiki, but all I could find there seemed rather dated with a lot of broken links to example code e.g.

    Did I just not look closely enough? If not on the Wiki, are there any other resources to get me started? Or am I on my own here?

    Thanks in advance for any help!
    No real documentation - best to look at other plugins (start with simple one first and ask questions in this forum.

    Plugins can do a wide variety of things (e.g. support new music source, support new music formats, support non squeezebox devices, display news list, provide additional info to tracks, control remote devices) so no one set of docs could cover all possibilities.

    If you outline your ideas - then it is possible that you can modify or at least use as a baseline an existing plugin.

  3. #3
    Thanks for the quick reply!

    Quote Originally Posted by bpa View Post
    If you outline your ideas - then it is possible that you can modify or at least use as a baseline an existing plugin.
    My idea is basically to realise what's listed on http://wiki.slimdevices.com/index.php/PluginIdeas as VolumeControlApplet, i.e. a plugin that allows to control playback volume from LMS via external means.

    I've found the Denon AVR plugin which still seems to be available in the Google Code archive but since it's rather dated, I wasn't sure whether it would be a good starting point. Has the plugin API changed a lot since LMS 7.2 or would this plugin still a good base from which to start experimenting? Any other suggestions or pointers?

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,864
    Quote Originally Posted by Manul View Post
    Thanks for the quick reply!



    My idea is basically to realise what's listed on http://wiki.slimdevices.com/index.php/PluginIdeas as VolumeControlApplet, i.e. a plugin that allows to control playback volume from LMS via external means.

    I've found the Denon AVR plugin which still seems to be available in the Google Code archive but since it's rather dated, I wasn't sure whether it would be a good starting point. Has the plugin API changed a lot since LMS 7.2 or would this plugin still a good base from which to start experimenting? Any other suggestions or pointers?
    APIs haven't changed much.

    "a plugin that allows to control playback volume from LMS via external means."
    Not sure what this means.
    Was the Denon AVR plugin supposed to control a Denon system from LMS.
    Alternatively, if you mean you want to control an SB player volume from outside of LMS - then why not use the CLI and /or HTTP/JSON command. Why does it have to be a plugin ?

    BTW Applets are not the same as Plugins. Applets are implemented inside Touch or Radio or Controller and I wouldn't even try to implement one. The idea on the wiki page is for an Applet and not a Plugin - basically to change the Controller and make it independent of LMS.
    Last edited by bpa; 2019-04-09 at 15:08.

  5. #5
    Quote Originally Posted by bpa View Post
    Was the Denon AVR plugin supposed to control a Denon system from LMS.
    At least that's how I understand it.

    Quote Originally Posted by bpa View Post
    Alternatively, if you mean you want to control an SB player volume from outside of LMS - then why not use the CLI and /or HTTP/JSON command. Why does it have to be a plugin ?
    Because it's the other way round: I want to control an "outside" volume (i.e. that of an external amp connected to a Pi running squeezelite) from LMS.

    If I understand it correctly, the CLI command "getexternalvolumeinfo" was created specifically for this purpose.

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,864
    Quote Originally Posted by Manul View Post
    At least that's how I understand it.
    OK

    Because it's the other way round: I want to control an "outside" volume (i.e. that of an external amp connected to a Pi running squeezelite) from LMS.
    What sort of device ?
    What is the form of the control - serial , TCP , IR ?

    How do you visualise the menu layout and the actual "control" ? How will users use it ?
    There are 4 types of GUI: Web GUI, an older SB player, New Touch/Radio/Controller, Apps. They have different APIs but if designed "correctly" a single implementation may cover them all but if you want custom interface (e.g. a slkider) - then you need to implement 4 interfaces.

    The interface could be "hidden" - (i.e. only setup is needed) via volume control synced to a real player.

    If I understand it correctly, the CLI command "getexternalvolumeinfo" was created specifically for this purpose.
    You're right - so this is not suited. (edit on second thoughts maybe it is - need more details on your device - CLI make for a much simpler application)
    Last edited by bpa; 2019-04-09 at 16:33.

  7. #7
    Quote Originally Posted by Manul View Post
    If I understand it correctly, the CLI command "getexternalvolumeinfo" was created specifically for this purpose.
    Holy cow, I just saw DenonSerial listed in the official API docs and had *totally* forgotten about writing that code! Nine years ago...?!

    DenonSerial is free software, so of course feel free to grab & modify it as you see fit. Apologies for the code quality! If you just look for the &enqueue( references in lib/Plugin/DenonSerial/Plugin.pm you should see what needs changing.
    owner of the stuff at https://tuxreborn.netlify.com/
    (which used to reside at www.tux.org/~peterw/)
    Note: The best way to reach me is email or PM, as I don't spend much time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  8. #8
    Okay, maybe it's best if I just describe what I want to achieve:

    I have three instances of squeezelite running, all connected to external amplifiers. I would like to control the volume on these amplifiers via the LMS volume control.

    Having found

    <playerid> getexternalvolumeinfo <taggedParameters>

    This notification notifies a client that a plugin supports volume change capability for a player.
    in the CLI documentation, I assumed I would need to write a plugin.

    I don't think the actual type of player matters too much since I need a way to intercept the volume control first, but for completeness: One of the amplifiers is a networked AV receiver that can be controlled by a python app/script. The other two can be controlled via IR, I have wifi to IR gateways for that purpose.

    I hope I managed to make my intentions somewhat clearer, if not, please don't hesitate to ask.

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,864
    Quote Originally Posted by Manul View Post
    Okay, maybe it's best if I just describe what I want to achieve:

    I have three instances of squeezelite running, all connected to external amplifiers. I would like to control the volume on these amplifiers via the LMS volume control.

    Having found



    in the CLI documentation, I assumed I would need to write a plugin.

    I don't think the actual type of player matters too much since I need a way to intercept the volume control first, but for completeness: One of the amplifiers is a networked AV receiver that can be controlled by a python app/script. The other two can be controlled via IR, I have wifi to IR gateways for that purpose.

    I hope I managed to make my intentions somewhat clearer, if not, please don't hesitate to ask.
    A bit clearer. First,I think if you avoid a plugin - you'll end up with a simpler solution.

    At a guess the Denon solution is a start but I think operation of device volume control by overlaying the LMS volume control is getting very tricky. I think IRBlaster is more appropriate starting point - can be loaded form Plugins tab

    But understanding how you would the system to function may also clarify things.
    If connected volume control is matched to squeezelite volume controls - then both will go up and down - I think not very desirable.
    Do you want squeezelite player volume control to be disabled (e.g. locked at 100%) and the connected device to have all the volume control ? I don;t know if LMS/queezelite has this capability.

    I think IRblaster does the second. The mods need for your situation would be the control.

  10. #10
    Quote Originally Posted by bpa View Post
    But understanding how you would the system to function may also clarify things.
    If connected volume control is matched to squeezelite volume controls - then both will go up and down - I think not very desirable.
    Why not? I think having both volume controls in sync would be a perfect solution. That would only work for the AV receiver case of course, because for the IR controlled systems, there's no way to read out their current volume. My idea of an ideal solution in this case would be that LMS would just present the volume up/down control and not try to display the current volume at all.

    I guess the distinction between relative and absolute volume control in getexternalvolumeinfo comes from that same line of thought, but to me it's not quite clear how LMS treats players which report either or both capabilities.

    Quote Originally Posted by bpa View Post
    I don;t know if LMS/queezelite has this capability.
    Neither do I, but I'd like to find out.

Posting Permissions

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