/OctoPrint-SpoolManager

Plugin for managing Spools

Primary LanguageJavaScript

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:

  • OctoPrint 1.7.2: with Python 3.7.3

Included features

Basic attributes to be captured:

  • Spool basic attributes, like name, color, material, vendor ...
  • "Used length" and "Remaining weight"
  • Additional notes
  • CSV Export of "Legacy FilamentManager-Database" and SpoolManager
  • CSV Import function
  • Labels

UI features

  • Better error-feedback (more then just the "happy-path")
  • List all spools
  • Edit single spool
  • Copy single spool
  • Template spool
  • Sort spool table (Displayname, Last/First use, Remaining)
  • Force to select a spool before printing
  • Warn if not enough filament is present
  • Filter spool table
  • Table column visibility
  • Scan QR/Barcodes of a spool
  • Multi Tool support
  • Support for manual mid-print filament change

Planning / next features

  • External Database (IN PROGRESS)
  • PrintJobHistory integration PrintJobHistory-Plugin
  • Capture Spool-Image
  • ...more planing details could be found here

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.

  • "Only Release": Only stable and tested versions will be shown in the software-update section of OctoPrint
  • "Release & Candidate": Beside the stable release, you can also see the "release-candidates", like '''1.7.0rc3'''. The rc's includde new functionalty/bugfixes and are already tested by the community.. so by YOU ;-)
  • "Release & Candidate & under Development": Beside stable and rc, you will be informed about development versions. A development version like '''1.8.0.dev5``` could include a new (experimental) feature/bugfixs, but it is not fully tested by the community

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 OctoPrint/OctoPrint#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

spool_added, spool_selected

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

spool_deselected

 {
   'toolId': 1
 }

spool_deleted

 {
   '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