<html><head></head><body><div class="ydpb8f03461yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">Great idea!</div><div dir="ltr" data-setdir="false">The only thing I would probably add is "tags" in the json file for documenting the plugins.</div><div dir="ltr" data-setdir="false">Nikolay</div><div><br></div>
        
        </div><div id="yahoo_quoted_5202370170" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Tuesday, July 14, 2020, 10:09:28 AM GMT+2, Jaunius Kapkan <jaunius@gmx.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv0640955806"><div>This sounds great! Would really ease up the installation process and allow less experienced users to add the additional features.<br clear="none"><br clear="none"><div dir="ltr"><p class="yiv0640955806MsoNormal" style="margin:0cm 0cm 0.0001pt;">Regards,</p><p class="yiv0640955806MsoNormal" style="margin:0cm 0cm 0.0001pt;"><b><span lang="EN-US" style="background-color:rgba(255, 255, 255, 0);">Jaunius Kapkan </span></b><i style="background-color:rgba(255, 255, 255, 0);">[Sent from cellphone]</i></p></div><div dir="ltr"><div class="yiv0640955806yqt3169348328" id="yiv0640955806yqtfd41801"><br clear="none"><blockquote type="cite">On 2020-07-14, at 08:57, Mark Webb-Johnson <mark@webb-johnson.net> wrote:<br clear="none"><br clear="none"></blockquote></div></div><div class="yiv0640955806yqt3169348328" id="yiv0640955806yqtfd71097"><blockquote type="cite"><div dir="ltr"></div></blockquote></div></div><div class="yiv0640955806yqt3169348328" id="yiv0640955806yqtfd16347"><div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">I feel that our plugin system offers a missed opportunity. By making small extensions to available functionality, we can use this system to do so much - and with a much lower complexity and barrier to entry compared to C++ ESP IDF development.</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">There are a couple of things I would like to now do:</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806"><ol class="yiv0640955806MailOutline"><li class="yiv0640955806">Implement a mechanism for plugins to directly extend the console command language (other than the current ’script exec PLUGIN.fn’).<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">Implement a plugin repository, and command line tools for managing plugins. We simply need to have a store and directory of available plugins, a way of searching/listing those, and a uniform way to install/remove plugins. Once this is done, perhaps someone can handle the web UI side of this, and perhaps that can even be done as a plugin :-)</li></ol></div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">I’m already working on #1. Just an extension to the existing script system to allow plugins to register commands, and to have the command register/deregister done automatically on plugin load/unload.</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">However, #2 is a little more tricky and I’m looking for feedback on the design of this. My idea is:</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806"><ul class="yiv0640955806MailOutline"><li class="yiv0640955806">Store the plugins in a new github/openvehicles/Open-Vehicle-Monitoring-System-3/plugins folder. Eventually the /plugin folder will all be migrated to here.<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">Each plugin has a unique name; the directory in /plugins.<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">Within each plugin directory, there is a <name>.json file (JSON format) with defined tags to describe the plugin. If the plugin delivers a web extension, that is in the ‘web’ subdirectory. If the plugin delivered a script extension, that is in the ’script’ directory. Documentation (in rst format) is in the ‘docs' directory. The JSON file would need the following, at a minimum:<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><ul class="yiv0640955806"><li class="yiv0640955806">Name: The plugin ID</li><li class="yiv0640955806">Title: One line title</li><li class="yiv0640955806">Group: Group for the plugin</li><li class="yiv0640955806">Version: The version string of the plugin</li><li class="yiv0640955806">Description: Longer textual description of the plugin</li><li class="yiv0640955806">Prerequisites: Prerequisites to be checked<br clear="none" class="yiv0640955806">(Each plugin installed provides name=version, the system provides system-level ones such as the version of firmware, and then the prerequisites is simple a list of <name><operator><version> as required)<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li></ul><li class="yiv0640955806">We can automatically build the documentation, and list, for all plugins for our <a rel="nofollow" shape="rect" class="yiv0640955806" target="_blank" href="http://docs.openvehicles.com">docs.openvehicles.com</a> (in a similar way to how it is done for /plugin now).<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">On a repository server, as part of a nightly build job, we can automatically build a single directory JSON file from the <name>,json descriptors. We can publish this, as well as a git export/checkout of the plugins, on a http download site.<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">On the module, we can store a list of repository servers (allowing the user to add/remove as they require).<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">Contributors/authors of plugins simply GitHub clone our repository, and issue pull requests as appropriate. They can also have their own private repository servers (just need to host the directory json file and associated code files) and add it to their modules.<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><li class="yiv0640955806">The ‘plugin’ command tree on the module will provide commands for:<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li><ul class="yiv0640955806"><li class="yiv0640955806">List installed repositories</li><li class="yiv0640955806">Add a new repository</li><li class="yiv0640955806">Remove a repository</li><li class="yiv0640955806">List installed plugins</li><li class="yiv0640955806">List/Search available plugins</li><li class="yiv0640955806">Install a plugin</li><li class="yiv0640955806">Remove a plugin</li><li class="yiv0640955806">Update a plugin<br clear="none" class="yiv0640955806"><br clear="none" class="yiv0640955806"></li></ul><li class="yiv0640955806">I would like to try to unify the web and script plugin systems a bit more closely. They are really two sides of the same coin (with some plugins providing both).</li></ul></div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">Does that make sense? Any suggestions/comments?</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><div class="yiv0640955806">Regards, Mark.</div><div class="yiv0640955806"><br clear="none" class="yiv0640955806"></div><span>_______________________________________________</span><br clear="none"><span>OvmsDev mailing list</span><br clear="none"><span>OvmsDev@lists.openvehicles.com</span><br clear="none"><span>http://lists.openvehicles.com/mailman/listinfo/ovmsdev</span><br clear="none"></div></div></div><div class="yqt3169348328" id="yqtfd40411">_______________________________________________<br clear="none">OvmsDev mailing list<br clear="none"><a shape="rect" ymailto="mailto:OvmsDev@lists.openvehicles.com" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a><br clear="none"><a shape="rect" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br clear="none"></div></div>
            </div>
        </div></body></html>