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

feat: spoolman support #1119

Merged
merged 52 commits into from
Aug 6, 2023
Merged

feat: spoolman support #1119

merged 52 commits into from
Aug 6, 2023

Conversation

matmen
Copy link
Member

@matmen matmen commented Jul 7, 2023

Adds support for Spoolman (Arksine/moonraker#651)

done;

  • get spoolman state from moonraker / spoolman instance
  • check if spoolman is supported and configured
  • spool selection dialog on print start
    • metadata filters (search)
    • default to currently selected spool
  • Warning if remaining filament on spool might not be enough
  • Warning if filament types don't match
  • "Change Spool" option during print/idle
  • support selecting spools by QR code
  • docs
  • test mobile support
  • settings
    • setting to disable automatically showing the modal
    • setting to automatically open QR code detection (default camera?)
  • move QR detection to separate thread
  • display currently active spool in dashboard

todo:

  • let user select spool on print start through external API call
    • IMO not really needed with the Spoolman dashboard card, adds unnecessary complexity

Screenshots

Spool Selection modal on print start
image

Warning when trying to start a print without a spool selection
image

Not enough filament warning
image

Mismatched filament material warning
image

Spoolman dashboard card
image
image

Filtering spools
image

QR code scanning

image

Camera Selection on multi cam setup
image

Warning on unsupported code
image

Error on inexistant spool
image

Auto-closes when scanning a valid code (compatible pattern + ID exists in database), selects spool in modal
https://github.com/fluidd-core/fluidd/assets/25269274/30ba1f17-95dd-483c-a1c5-1ac067d9d7ba

@matmen matmen added the FR - Enhancement New feature or request label Jul 7, 2023
@Donkie
Copy link

Donkie commented Jul 8, 2023

Neat! Let me know if you need any further help integrating with Spoolman or have any ideas of how it can be improved upon :)

@matmen
Copy link
Member Author

matmen commented Jul 10, 2023

@Donkie I think having something like a spool list update event would be nice to have so changes can be reflected in the frontend in real time? Either sending the full spool list or just a subset of modified/created/deleted spools.
Currently this would either require explicit fetching of the list (in this case when creating the spool selection dialog) or manually reloading the page, which isn't the best UX wise imo

@Donkie
Copy link

Donkie commented Jul 12, 2023

@Donkie I think having something like a spool list update event would be nice to have so changes can be reflected in the frontend in real time? Either sending the full spool list or just a subset of modified/created/deleted spools.

Currently this would either require explicit fetching of the list (in this case when creating the spool selection dialog) or manually reloading the page, which isn't the best UX wise imo

Sure I could add that to my To-Do list

@pedrolamas pedrolamas added this to the 1.25 milestone Jul 26, 2023
matmen added 25 commits July 28, 2023 17:51
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
@matmen
Copy link
Member Author

matmen commented Aug 1, 2023

@pedrolamas Thanks for the feedback - should be fixed now 😉

pedrolamas
pedrolamas previously approved these changes Aug 3, 2023
pedrolamas and others added 2 commits August 4, 2023 17:01
to be reverted when QR scanning is available
ref: Donkie/Spoolman#10

Signed-off-by: Mathis Mensing <[email protected]>
@matmen matmen merged commit 7e7c8dc into fluidd-core:develop Aug 6, 2023
3 checks passed
@NonaSuomy
Copy link

"device camera (out of scope for now, requires secure context (HTTPS))"

Make the browser device camera work with non https local sources.

chrome://flags/#unsafely-treat-insecure-origin-as-secure

Enable the Insecure origins treated as secure

Add the address for your Spoolman/Fluidd server IP:Port that you want to ignore the secure origin policy for. Remember to include the port number too.

image

Save and restart Chrome.

Click enable on camera request when pops up.

@NonaSuomy
Copy link

NonaSuomy commented Aug 13, 2023

Instead of failing from a nonexisting QR code lookup can you make it check if it has the right properties? Say a new spool that has a Spoolman sticker already on it with all the fields embedded from the factory or friend and then ask if you want to add it to the Spoolman DB.

@matmen
Copy link
Member Author

matmen commented Aug 13, 2023

Instead of failing from a nonexisting QR code lookup can you make it check if it has the right properties? Say a new spool that has a Spoolman sticker already on it with all the fields embedded from the factory or friend and then ask if you want to add it to the Spoolman DB.

I don't think there's a point to have this in fluidd - we're just acting as the frontend for spool selection, not for the data management itself. All other data management actions (creating/editing vendors, filaments, spools) already happens in the Spoolman UI..

@matmen
Copy link
Member Author

matmen commented Aug 13, 2023

"device camera (out of scope for now, requires secure context (HTTPS))"

Make the browser device camera work with non https local sources.

chrome://flags/#unsafely-treat-insecure-origin-as-secure

Enable the Insecure origins treated as secure

Add the address for your Spoolman/Fluidd server IP:Port that you want to ignore the secure origin policy for. Remember to include the port number too.

image

Save and restart Chrome.

Click enable on camera request when pops up.

Thanks, I'll take a look at this in the following couple days and add it to #1149.

@NonaSuomy
Copy link

Instead of failing from a nonexisting QR code lookup can you make it check if it has the right properties? Say a new spool that has a Spoolman sticker already on it with all the fields embedded from the factory or friend and then ask if you want to add it to the Spoolman DB.

I don't think there's a point to have this in fluidd - we're just acting as the frontend for spool selection, not for the data management itself. All other data management actions (creating/editing vendors, filaments, spools) already happens in the Spoolman UI..

That's fine I've requested this as an addition in spoolman I'm just saying support the ability to tell spoolman that the spool is not in the database that was scanned how ever you are checking that so that spoolman can then add it from your scan.

Right now the QR-Code only has web+spoolman:s-1 encoded hopefully eventually there will be all the basic elements in the QR-Code to add a full DB entry. So in this case you would just have to fully post the QR-Code data to spoolman to add an entry.

@goodwin
Copy link

goodwin commented Aug 21, 2023

Are there any plans to make it working with Tool Changer support? For ex., using it with ERCF or other MMU

@pedrolamas
Copy link
Member

pedrolamas commented Aug 21, 2023

@goodwin currently there is no specific support for any type of MMU, but you might be able to achieve that by using macros: https://moonraker.readthedocs.io/en/latest/configuration/#setting-the-active-spool-from-klipper

@matmen matmen deleted the feat/spoolman branch December 9, 2023 17:48
@matmen
Copy link
Member Author

matmen commented Apr 6, 2024

@goodwin FYI toolchanger support has been implemented via #1324 and released in v1.28: https://docs.fluidd.xyz/features/spoolman#toolchanger-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants