OllisGit / OctoPrint-SpoolManager

Plugin for managing Spools
169 stars 59 forks source link

OctoPrint-SpoolManager

[Version]() [Released]() GitHub Releases (by Release)

The OctoPrint-Plugin manages all spool informations and stores it in a database.

Support my Efforts

This plugin, as well as my other plugins were developed in my spare time. If you like it, I would be thankful about a cup of coffee :)

More coffee, more code

Tested with:

Included features

Basic attributes to be captured:

UI features

Planning / next features

Screenshots

listSpools-tab selectSpools-sidebar selectSpools-dialog editSpool-dialog

scanSpool-dialog

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/OllisGit/OctoPrint-SpoolManager/releases/latest/download/master.zip

After installation, you can listen on three release channels (since 1.6.0). What does this mean: Each channel has its own release-version and each release has a different kind of functionality and stability.

Changing between each release is done via the "Software Update section" in the settings. release-channels

Hint: "Easy-switching" is possible with OctoPrint-Version 1.8.0 (see https://github.com/OctoPrint/OctoPrint/issues/4238). At the meantime you need to uninstall and install the version you like from the selected channel...or stay in one channel ;-)

Versions

see Release-Overview


Developer - Section

Events

Plugin sends the following custom events to the eventbus like this:

eventManager().fire(eventKey, eventPayload)
EventKeys
plugin_spoolmanager_spool_weight_updated_after_print
plugin_spoolmanager_spool_selected
plugin_spoolmanager_spool_deselected
plugin_spoolmanager_spool_added
plugin_spoolmanager_spool_deleted

HINT: In combination with the MQTT Plugin you can subscribe e.g. to this topic:

octoPrint/event/plugin_spoolmanager_spool_deselected

Payload

_spooladded, _spoolselected

 {
   'databaseId': 23,
   'toolId': 1,
   'spoolName':'Fancy Spool',
   'material':'ABS',
   'colorName':'dark red',
   'remainingWeight': 1234
 }

_spooldeselected

 {
   'toolId': 1
 }

_spooldeleted

 {
   'databaseId': 23
 }

Other Plugins could listen to this events in there python-code like this:

eventmanager.subscribe("plugin_spoolmanager_spool_selected", self._myEventListener)

or use octoprint.plugin.EventHandlerPlugin with something like this:

def on_event(self, event, payload):
    if event == "plugin_spoolmanager_spool_selected":
        ## do something usefull

Used UI-Tools


docker-compose up

_

docker-compose down --volumes

_

docker-compose run postgres bash