Author Topic: FPP v2.x plugin integration  (Read 2350 times)

Offline Bshaver

  • Developer
  • ******
  • Join Date: Aug 2014
  • Location: Denver, CO
  • Posts: 1,426
  • Kudos: 22
FPP v2.x plugin integration
« on: January 11, 2019, 10:23:36 AM »
Yes, I saw the shell of it in the plugins.cpp file :)


Can you plug something in there to output to the plugins? Please?  --type: Plugin --data:<whatever the user put in>


Then the callbacks would have to register not only Media, but also ,Plugin

Denver Colorado
45,000 blinky blinks mix of pixels and 130 AC Channels (powered by Minleon & Lynx) ALL Powered by FPP and Falcon!

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPP v2.x plugin integration
« Reply #1 on: January 11, 2019, 12:14:09 PM »
Split off into a new topic to keep the plugin details out of the FPP v2.6 release thread.

Should this be --type Playlist?  I don't see --type Plugin in Plugins.cpp.
-
Chris

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPP v2.x plugin integration
« Reply #2 on: January 11, 2019, 02:10:33 PM »
One big issue, IMO, is mandating that all plugins are hosted in a repository in the FalconChristmas organization.    Thus, if the author "goes away", we can fix things.  To add a new plugin to the plugin page, we add the repo to FalconChristmas and then grant that original person write access to that one repo.

^^^  and quoting from another thread.

I'm fine with that, but am not sure how all plugin authors would feel about it.

I'm wondering about starting with a fresh slate until plugins have been confirmed as working.  If we come up with a new 'spec', an example plugin, etc. then we could move plugins over to the new spec and add them to the list of known working.  The example could include sample pages for UI, Config, and a plugin 'about' page.  We can add support for specifying the min/max FPP version required, etc..

Online Poporacer

  • Hero Member
  • *****
  • Join Date: Dec 2017
  • Location: Meridian Idaho
  • Posts: 644
  • Kudos: 9
Re: FPP v2.x plugin integration
« Reply #3 on: January 11, 2019, 06:58:15 PM »
I am trying to get the Event Date and Weather plugins to work and neither one works. I have a Pocket-Beagle with a Scroller from Dan Kulp running a P10 panel. When I try to go to the Event Date setup page, the page does not open. I just get the header and nothing in the body for the setup. I have a PI 3B and the setup page will show up.
If to err is human, I am more human than most people.

Offline jnealand

  • Developer
  • ******
  • Join Date: Aug 2013
  • Location: Kennesaw, GA
  • Posts: 2,948
  • Kudos: 68
Re: FPP v2.x plugin integration
« Reply #4 on: January 11, 2019, 07:13:35 PM »
@popracer  I believe that this topic is about plugin development standards and not about a specific plugin.  You should probably start a topic re the specific plugin that you are needing answers for and make sure that those words are in the title of the thread.
Jim Nealand
Kennesaw, GA all Falcon controllers, all 12v Master Remote Multisync with Pi and BBB P10 and P5

Offline mac50

  • Supporting Member
  • ******
  • Join Date: Sep 2014
  • Location: Cumberland County, Illinois
  • Posts: 64
  • Kudos: 2
Re: FPP v2.x plugin integration
« Reply #5 on: January 12, 2019, 02:35:26 AM »
I am trying to get the Event Date and Weather plugins to work and neither one works. I have a Pocket-Beagle with a Scroller from Dan Kulp running a P10 panel. When I try to go to the Event Date setup page, the page does not open. I just get the header and nothing in the body for the setup. I have a PI 3B and the setup page will show up.
Had same problem until I went to Events page and triggered RUN-MATRIX.sh and then full Event Date page loaded. Still have not text to appear on matrix using Event Date or Matrix Tools (but draw works ok).
But like Jim said this should probably on a new thread

Offline Bshaver

  • Developer
  • ******
  • Join Date: Aug 2014
  • Location: Denver, CO
  • Posts: 1,426
  • Kudos: 22
Re: FPP v2.x plugin integration
« Reply #6 on: January 12, 2019, 09:24:17 AM »
Split off into a new topic to keep the plugin details out of the FPP v2.6 release thread.

Should this be --type Playlist?  I don't see --type Plugin in Plugins.cpp.


There isn't one. But I understand what you are asking. The type playlist did nothing really for the longest time. type 'media' is what you would subscribe to.
So, if the plugin subscribes to the 'playlist' is that also doing the same thing? What is the benefit. There is type 'event' as well. It is unclear what the plugins should subscribe to. There is the new 'boot' subscription now which is handy and I think I will try to play with that a little especially with one of my plugins that needs setup at boot time.


IMO:
 --type playlist a user to subscribe to a specific playlist. That playlist could be configured in the individual plugin so ONLY events from that Playlist are processed.
--type plugin: a plugin is subscribing to all events directed at itself from the playlist. The playlist Plugin event (need to add the directed to plugin selection, with a default of "ALL") would receive to the plugin "--data <raw data from the playlist textbox>" This could be helpful for users to manually put in items such as "Artist: Name of Artist Title: Song Title" instead of overwriting it in the MP3 header of the MP3 file to be stripped off.  Much like we have the compressed UI information, could there be an ADVANCED UI - that could show metadata off the files we are reading the FSEQ and the MP3/MP4? File Size, Duration, Artist, Title, Codec/Wrapper.






Online Poporacer

  • Hero Member
  • *****
  • Join Date: Dec 2017
  • Location: Meridian Idaho
  • Posts: 644
  • Kudos: 9
Re: FPP v2.x plugin integration
« Reply #7 on: January 12, 2019, 09:44:22 AM »
Had same problem until I went to Events page and triggered RUN-MATRIX.sh and then full Event Date page loaded.
That didn't work for me :(
Quote
But like Jim said this should probably on a new thread
I will just wait and see what the outcome is

Online Poporacer

  • Hero Member
  • *****
  • Join Date: Dec 2017
  • Location: Meridian Idaho
  • Posts: 644
  • Kudos: 9
Re: FPP v2.x plugin integration
« Reply #8 on: January 12, 2019, 10:22:02 AM »

If we come up with a new 'spec', an example plugin, etc. then we could move plugins over to the new spec and add them to the list of known working.  The example could include sample pages for UI, Config, and a plugin 'about' page.  We can add support for specifying the min/max FPP version required, etc..
I think that would be a great idea, that way newcomers coming in would have some resources to look at to make things work instead of a list of Plugins and Script Repositories and no instructions on how to use them. I wouldn't mind helping out on this if you need it. I am not up to speed yet on how FPP and the Scripts/PHP all work together but I can learn (I do have some coding experience in C++, Python and a couple others but it has been a while and it wasn't at the level you guys are) But once things are working, I could help in putting together sample pages, and help pages or anything else you might need.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPP v2.x plugin integration
« Reply #9 on: January 12, 2019, 02:32:21 PM »
I am going to put some thought into this tonight.

Since I am working on writing a plugin for the viewer control web site, then I can also try to document and make changes on the FPP side as needed along the way.

I am also thinking that I want to convert the pluginData.php file to JSON as well.  Each plugin would be required to have its own JSON file with the plugin details including the FPP version requirements and we could make a script to pull the JSON for the compatible plugins together and  generate the master plugin JSON file in the main FPP git repository.

I also need to look at the old plugin playlist integration and get that upgraded for the new JSON playlist format if necessary and want to document some of this along the way so we can have a stub plugin that people can copy and build a new plugin from.

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 141
  • Kudos: 1
    • Crosslights Christmas
Re: FPP v2.x plugin integration
« Reply #10 on: January 14, 2019, 02:28:24 PM »
One big issue, IMO, is mandating that all plugins are hosted in a repository in the FalconChristmas organization.    Thus, if the author "goes away", we can fix things.  To add a new plugin to the plugin page, we add the repo to FalconChristmas and then grant that original person write access to that one repo.

^^^  and quoting from another thread.

I'm fine with that, but am not sure how all plugin authors would feel about it.

I'm wondering about starting with a fresh slate until plugins have been confirmed as working.  If we come up with a new 'spec', an example plugin, etc. then we could move plugins over to the new spec and add them to the list of known working.  The example could include sample pages for UI, Config, and a plugin 'about' page.  We can add support for specifying the min/max FPP version required, etc..




This sounds like a fantastic idea.

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 141
  • Kudos: 1
    • Crosslights Christmas
Re: FPP v2.x plugin integration
« Reply #11 on: January 14, 2019, 02:31:21 PM »
I am going to put some thought into this tonight.

Since I am working on writing a plugin for the viewer control web site, then I can also try to document and make changes on the FPP side as needed along the way.

I am also thinking that I want to convert the pluginData.php file to JSON as well.  Each plugin would be required to have its own JSON file with the plugin details including the FPP version requirements and we could make a script to pull the JSON for the compatible plugins together and  generate the master plugin JSON file in the main FPP git repository.

I also need to look at the old plugin playlist integration and get that upgraded for the new JSON playlist format if necessary and want to document some of this along the way so we can have a stub plugin that people can copy and build a new plugin from.


Just wondering would your script check all branches?  If I have a plugin for fpp 1 and then create a new branch for 2.1 and then a new branch for 2.6 would that cause a problem, or would master branch always be what is checked?

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPP v2.x plugin integration
« Reply #12 on: January 14, 2019, 03:41:45 PM »
Just wondering would your script check all branches?  If I have a plugin for fpp 1 and then create a new branch for 2.1 and then a new branch for 2.6 would that cause a problem, or would master branch always be what is checked?

I'm thinking that the script would have a list of sources it would use.  The script in the FPP v2.6 directory might have one set of sources while the script in FPP v2.7 might have another, and these sources could be any branch allowing the plugin author to have different branches for different FPP versions..  The script handles the dependency checking once to build the JSON rather than having to check every time a viewer opens the plugin page.

Offline Bshaver

  • Developer
  • ******
  • Join Date: Aug 2014
  • Location: Denver, CO
  • Posts: 1,426
  • Kudos: 22
Re: FPP v2.x plugin integration
« Reply #13 on: January 15, 2019, 05:49:52 AM »
If I may add - a run time variable that is the FPP version running. There was some breakage in the parameters passed to some of the daemons that caused inconsistencies in a few of my plugins that relied on other plugins. And versions of those binaries.


Anyway, I like this idea. and will like to start migrating to something like this. Also, the vetting process to get a plugin into the list. Users should be able to add a plugin outside of the list.


I have had a Unraid nas in the past where you could post a URL to the plugin, and it adds it for you. Untars the information, etc. Possibly some deploy mechanism like that?

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPP v2.x plugin integration
« Reply #14 on: January 15, 2019, 10:34:20 AM »
If I may add - a run time variable that is the FPP version running. There was some breakage in the parameters passed to some of the daemons that caused inconsistencies in a few of my plugins that relied on other plugins. And versions of those binaries.

Anyway, I like this idea. and will like to start migrating to something like this. Also, the vetting process to get a plugin into the list. Users should be able to add a plugin outside of the list.

I was thinking about the version checking and have a patch to have fppversion.sh create a fppversion.php file to mirror the fppversion.c file that we have in the src directory.  These files get rebuilt anytime we compile, so they should always has the latest version info.

I agree on making it easy to install plugins from other sources.  I'm thinking that you would enter the URL of the plugin's git repository and the UI would download the plugin's .json file to get and display the info about the plugin just like it does for the plugins in the main list.  For upgrading and uninstalling, the UI would merge the list of installed plugins with the list of plugins in the main list.  Since I am at the point where I want to start getting some testers on the Viewer Control plugin and web site, I am going to start taking a look at this side of the plugin install.

 

Back to top