Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11
    Senior Member
    Join Date
    Apr 2005
    Location
    Honiton, Devon, UK
    Posts
    1,955
    Quote Originally Posted by mherger View Post
    > In the INSTALL.XML file for various plugins, I see an <ID> attribute
    > containing a rather long hex number.
    > What is the significance of this, and how do I generate an appropriate
    > ID for my plugin?


    It should be a unique string. I usually use
    https://www.uuidgenerator.net to generate a UUID.
    OK, happy to do that, but out of curiosity what is its actual purpose? Is it mandatory?
    Until recently: Transporter -> ATC SCM100A, now sold :-(
    House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro/HiFiBerry DSP) -> Meridian 218 -> Meridian M6

  2. #12
    Senior Member
    Join Date
    Apr 2005
    Location
    Honiton, Devon, UK
    Posts
    1,955
    OK, making progress. I decided that all I really needed to do was switch the Meridian 218 on & off with the Squeezebox player, so used Felix's PowerSwitchII as a starting point.

    I put my plugin into /usr/local/slimserver/Cache/Plugins, restarted LMS, and the new plugin is listed as installed in the web interface Plugins tab.
    I was able to activate it on an SB3 I have via the Extras menu, and it works - turns the Merdian 218 on & off as expected.

    BUT... I want to use it with a SBR, and I can't see how it can be activated on that. (Presumably I'd have the same issue if I wanted to use it on a Squeezelite player).

    (Note: I had already removed the code inherited from PowerSwitchII that checks whether the player is a Transporter or SB2/3, but I don't think that's relevant - I haven't even got as far as activating the plugin on the SBR).

    My next thought was that maybe the way PowerSwitchII is configured uses some kind of legacy mechanism only available on the older players with a display.

    So I took a look at the PowerSave plugin (which I already have active on the SBR) and noticed that it includes a PLAYER.HTML file that presents the various options in the LMS Settings web interface, and a SETTINGS.PM file that looks like it processes the settings selected in the PLAYER.HTML page. So I built a simple equivalent and placed it with the rest of my plugin. After restarting LMS, a SETTINGS option appeared next to my new plugin, but clicking it results in:
    Code:
    404 Not Found: plugins/Extensions/settings/plugins/M218/settings/player.html
    I had a poke around, but as far as I can see none of the directories on the server called Extensions have anything to do with PowerSave in them.

    I tried moving my new plugin to /usr/local/slimserver/Cache/InstalledPlugins/Plugins (which is where PowerSave was installed), but that didn't help.

    So I'm kind of stuck at this point. There seem to be so many possible places where the various files might belong. Can anyone can give some more guidance?

    If it's relevant, I'm using piCorePlayer as my server, running LMS 7.9.2
    Until recently: Transporter -> ATC SCM100A, now sold :-(
    House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro/HiFiBerry DSP) -> Meridian 218 -> Meridian M6

  3. #13
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,569

    LMS Plugin Development

    > So I took a look at the PowerSave plugin (which I already have active on
    > the SBR) and noticed that it includes a PLAYER.HTML file that presents
    > the various options in the LMS Settings web interface, and a SETTINGS.PM
    > file that looks like it processes the settings selected in the
    > PLAYER.HTML page. So I built a simple equivalent and placed it with the
    > rest of my plugin. After restarting LMS, a SETTINGS option appeared next
    > to my new plugin, but clicking it results in:
    >
    > Code:
    > --------------------
    > 404 Not Found: plugins/Extensions/settings/plugins/M218/settings/player.html
    > --------------------


    I think it would be good to share your code if you wanted some qualified
    help. It's hard to follow what you do by your descriptions only.

    > I tried moving my new plugin to
    > /usr/local/slimserver/Cache/InstalledPlugins/Plugins (which is where
    > PowerSave was installed), but that didn't help.


    Don't mess with that folder. It's managed by LMS' plugin manager. It
    doesn't like to get confused by you adding/removing stuff there.

  4. #14
    Senior Member
    Join Date
    Apr 2005
    Location
    Honiton, Devon, UK
    Posts
    1,955
    Quote Originally Posted by mherger View Post
    I think it would be good to share your code if you wanted some qualified
    help. It's hard to follow what you do by your descriptions only.
    OK, I've zipped up what I've created and attached it here.
    I placed all of these files in the /usr/local/slimserver/Cache/Plugins directory.
    After restarting LMS, here's what happens:
    - The plugins tab on the LMS web interface shows the new plugin as active, and it has a Settings link
    - Clicking the Settings link results in 404 Not Found: plugins/Extensions/settings/plugins/M218/settings/player.html
    - The plugin is available on a SB3 via the Extras menu, and I can enable/disable it as hoped
    - When it's enabled on the SB3, it works as expected

    I think if someone can help me figure out how to integrate the player.html and Settings.pm files, I may have a chance of enabling the plugin on other players (eg. SBR, Squeezelite, etc)

    Quote Originally Posted by mherger View Post
    > I tried moving my new plugin to
    > /usr/local/slimserver/Cache/InstalledPlugins/Plugins (which is where
    > PowerSave was installed), but that didn't help.

    Don't mess with that folder. It's managed by LMS' plugin manager. It
    doesn't like to get confused by you adding/removing stuff there.
    OK, understood. I only tried there because that's where I found the PowerSave plugin.
    Attached Files Attached Files
    Until recently: Transporter -> ATC SCM100A, now sold :-(
    House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro/HiFiBerry DSP) -> Meridian 218 -> Meridian M6

  5. #15
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,643
    Quote Originally Posted by cliveb View Post
    OK, understood. I only tried there because that's where I found the PowerSave plugin.
    Cache/Installed/Plugins is only used for plugin managed by Plugin manager downloaded from repositories.

    If you look at WebUI Settings/Information - it lists the plugins directories. - you'll see a number of directories including Cached/InstalledPlugins/Plugins and Slim/Plugin.

    Manaully installed user plugins (what you want) go into a Plugins directory at a top level (exact location depends on OS) - do not install in Slim/Plugin as that is for LMS supplied plugins.

  6. #16
    Senior Member
    Join Date
    Apr 2005
    Location
    Honiton, Devon, UK
    Posts
    1,955
    Quote Originally Posted by bpa View Post
    Cache/Installed/Plugins is only used for plugin managed by Plugin manager downloaded from repositories.

    If you look at WebUI Settings/Information - it lists the plugins directories. - you'll see a number of directories including Cached/InstalledPlugins/Plugins and Slim/Plugin.

    Manaully installed user plugins (what you want) go into a Plugins directory at a top level (exact location depends on OS) - do not install in Slim/Plugin as that is for LMS supplied plugins.
    On my LMS server (running on piCorePlayer, so the OS is piCore Linux), WebUI/Settings/Information lists these plugin folders:
    /usr/local/slimserver/Cache/InstalledPlugins/Plugins, /usr/local/slimserver/Plugins, /usr/local/slimserver/Cache/Plugins

    So I presume that I should put my plugin into /usr/local/slimserver/Plugins - but no such folder exists.

    Is it that LMS is prepared to use plugins if the folder happens to be there, but that the folder may not exist?
    Can I just create that folder and put my plugin there? (I don't want to just try it without some reassurance, in case it breaks LMS).
    Until recently: Transporter -> ATC SCM100A, now sold :-(
    House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro/HiFiBerry DSP) -> Meridian 218 -> Meridian M6

  7. #17
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,427
    My suggestion (which Michael has said before that he does not like but it works great for me) ...

    Make a real plugin package and a repo file ... and host the repo file on a web server somewhere.
    Configure your LMS to use that (private) repo file and let it install into Cache/InstalledPlugins/Plugins/<pluginname>

    Then when you want to try out some changes ... simply use WinSCP to copy over the changed files into that folder (overwriting what LMS put there) and restart LMS (no need to update the install.xml at this point).

    If you uninstall the plugin then LMS will remove all of the files ... so always make the changes that you think you want to keep on your desktop system.

    To do it 100% properly you could package up each speculative change and update install.xml, make a new zip file and update the repo file (new checksum and version) but that is a lot of extra work to do while you are trying out small changes.

    There is scope for confusion ... particularly after you have made an official release where you try something out and then forget to push an official update to the zip/repo ... but since you have not released anything to the outside world yet then this does not really matter.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  8. #18
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,569

    LMS Plugin Development

    > After restarting LMS, here's what happens:

    You need to initialize the Settings in your plugin. Add

    use Plugins::M218::Settings;

    at the top of it, and in initPlugin() you do:

    Plugins::M218::Settings->new();

    Instead of dealing with a pCP's folders I'd recommend you run LMS on
    your local dev machine. This allows you to easily restart LMS without
    having to copy files around etc.

  9. #19
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,569

    LMS Plugin Development

    > Cache/Installed/Plugins is only used for plugin managed by Plugin
    > manager downloaded from repositories.


    Cache/InstalledPlugins is managed, Cache/Plugins is not. It's LMS
    Plugins folder on pCP.


  10. #20
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,569

    LMS Plugin Development

    > My suggestion (which Michael has said before that he does not like but
    > it works great for me) ...


    But it's so much more complicated than needed... and risks to mess with
    the managed plugins folder.

    I never zip the files before release. I edit them right from inside
    their folder where LMS picks them up whenever I restart LMS.

Posting Permissions

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