Manual Plugin installation / PI GPIOSupport

... it's not so easy!
I need some hints from the experts.

For my re-installation after disaster, now ahead Python 3.6, I need a plugin what original is not released for Python 3.
I changed some lines, so that it works with actual installation.
But I had problems to install it. The only method that had been successful was to copy it to
/home/pi/OctoPrint/venv/lib/python3.6/site-packages/octoprint/plugins/
Result: it works as it should, but I don't like it there. It's marked as "bundeled" now.
If I copy it to
/home/pi/OctoPrint/venv/lib/python3.6/site-packages/
it's ignored by OctoPrint. I guess there must be a list of plugins to load, that OctoPrint reads on startup?
Maybe someone can share some knowledge about internals to me.

As "thanks in advantage" attached some fast and durty low-level code to support GPIOs on a Pi by deamon, I assembled from shreds I cut from bigger programs I wrote.
It's more for internal use; it's not pessimistically written, like software to distribute should be.
But maybe there are some useful parts to others in it.

gpioservice.zip (4.8 KB)

Put it in ~/.octoprint/plugins. This is the data folder, that single file plugins are installed to. You can also use the plugin manager to upload your files so they will be recognised by OctoPrint.

Copying anything to site-packages is not going to work all that well, since the things that go in there have been installed by pip.

1 Like

In addition, full plugins can be created and installed by pip, and then OctoPrint will pick them up. For more details, see the plugin documentation, in particular the plugin tutorial

... so far it works now ...
It's just for knowlege: can anybody tell me where installed plugin are registered?
What is OctoPrint doing on startup to deceide which packages to load as plugins?
(Answer can short and technical. There if a lot of programming background knowledge)
Thanks in advantage.

When plugins are installed, they are registered in the entry point octoprint.plugin, you can poke the octoprint_setuptools package for full details of how this is done.

Or, it looks for all importable files that look like plugins in the folder said above.