Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spoolman Support #12

Open
GunbleR opened this issue Dec 16, 2024 · 3 comments
Open

Spoolman Support #12

GunbleR opened this issue Dec 16, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@GunbleR
Copy link

GunbleR commented Dec 16, 2024

Havent tried yet, may be usefull to add optional serial number to tag to differanciate between old and new simmilar spools.
Mainly for spool managers if they decide to implement support for it

@spuder
Copy link
Owner

spuder commented Dec 16, 2024

Thanks for the idea.

As I don't have much experience with spool-man or any other databases, what might this look like?

Is a serial number unique per spool or unique per rfid tag?

The tags already have a UID that could be used.

AA-BB-CC-DD (mifare classic)
AA-BB-CC-DD-EE-FF (ultralight/NTAG)

@bofh69
Copy link

bofh69 commented Dec 18, 2024

In Spoolman you create a filament and then from the filament you can create one or more spools. Each filament and each spool get their own ID (just an integer right now). When you use Spoolman with OctoPrint or Klipper & Moonraker you need to tell them which spool is in use by using Spoolman's spool ID. They then use it to report the filament usage to Spoolman.

Spoolman has a REST API that can do almost everything the web interface can do. You can configure Spoolman with custom fields for both its filament and spool records as needed.

With nfc2klipper, I first create new spools in Spoolman, then create the tags from Spoolman's data. The tags only contain the filament and spool IDs. The filament ID is used in my gcode to verify the right filament is used and ask me to change spool if the wrong filament is loaded (thus I can change to new spools with the same material and the verification still passes).

If you create the tags first, you can lookup the filament id in Spoolman (or create it if missing with the data from the tag. You would need to find the vendor/manufacturer too for that), then create a spool and there use a custom field for the UID.

You can't search in Spoolman via custom fields, but you can get all spools matching a certain filament name, material, vendor/manufacturer, or simply get all spools and then search for it in that way.

EDIT:
I sometimes reuse old tags for my spool. If you want to support that use case you might need to find and remove the UID from old spools if you go that way, but perhaps that's needed. I think you don't get archived spool data back by the REST API, but I'm unsure about that.

EDIT2:
In the latest version of spoolman (0.21) they've added external_id for both filaments and spools. They can be used when searching for records. That seems to work greate with the tags' UID.

@spuder spuder added enhancement New feature or request help wanted Extra attention is needed labels Jan 15, 2025
@spuder spuder changed the title FR: Spool SN field Spoolman Support Jan 15, 2025
@thijstriemstra
Copy link
Contributor

Duplicate of #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants