Skip to content

Feature: Add Spoolman Compatability #4771

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

Draft
wants to merge 84 commits into
base: main
Choose a base branch
from

Conversation

Ocraftyone
Copy link
Contributor

@Ocraftyone Ocraftyone commented Mar 29, 2024

Add Spoolman support to OrcaSlicer!

Spoolman is a self-hosted database of your spools of filament and how much has been used. This update now allows OrcaSlicer to directly access your Spoolman database to create and update filament profiles. One central database of all of your spool settings means less time inputting filament parameters.

Currently, this implementation is designed to only work with Klipper printers that have moonraker also set up with Spoolman. A macro can then be called at the beginning of each spool's custom gcode to load the spool via moonraker. Moonraker will then track how much filament was used and report that back to Spoolman.

Demo:
spoolman demo

Filament config values that are set

Spoolman Specific:

  • spoolman_spool_id
  • spoolman_remaining_weight
  • spoolman_used_weight
  • spoolman_remaining_length
  • spoolman_used_length
  • spoolman_archived

Filament Options:

  • filament_type
  • filament_vendor
  • filament_cost
  • filament_density
  • filament_diameter
  • nozzle_temperature_initial_layer (set by adding 5 degrees to normal temp)
  • nozzle_temperature
  • hot_plate_temp_initial_layer (set by adding 5 degrees to normal temp)
  • hot_plate_temp
  • default_filament_colour

Other ideas to expand functionality:

  • Check if spool has enough material to finish print upon slicing
  • Add option to "consume" filament upon upload
  • Store the entire filament configuration in Spoolman (via the Spoolman API's "extras" section)

Possible Changes:
Statistics are currently a config value that is updated upon request, but I am considering making it so they are just pulled when you select a Spoolman spool This has been implemented.

Moonraker Docs on how to setup Spoolman integration: https://moonraker.readthedocs.io/en/latest/configuration/#spoolman
Spoolman Project: https://github.com/Donkie/Spoolman

fixes #2955

-Spoolman utility class that fetches the spools, creates filament presets, and updates filament presets
-Add config entries for all needed values
make the config argument const. Allows more flexibility when calling it and in its current implementation, non-const access is not needed.
add force and detach options to create function

move call to get_filament_id past failure checks in the create function. It takes a few seconds to run and it is better to not run it if you don't have to

create get_name_from_spool function
Wouldn't load the filament if the "inherits" preset is not a base preset. The check is now done and it gets the base preset's parent if it needs to.
Added dialog itself

Added as it an item on the PlaterPresetCombobox

New extra renderer that renders a color in a dataview cell
# Conflicts:
#	src/libslic3r/Preset.cpp
#	src/slic3r/CMakeLists.txt
Merge in previous commit had a conflict that caused compile error.

Refactor code from merge to make it more readable

Add Refresh statement in the update to fix weird artifacting after selecting certain host types
Add Spoolman::is_server_valid()

Check validity of server in SpoolmanImportDialog and in Tab when clicking the update buttons

Hide the update buttons if Spoolman ID is 0

Check results from spool update when updating spools
@Ocraftyone
Copy link
Contributor Author

Ocraftyone commented Mar 29, 2024

@Noisyfox I did a refactor of a few lines of PhysicalPrinterDialog in 4ec7c12 that makes it a bit more readable with my changes. I don't believe I broke any of the functionality of your SimplyPrint integration, but if you could take a look at it and confirm, it would be much appreciated.

Also minor fix regarding hiding scrollbars
@YanceyA
Copy link

YanceyA commented Mar 29, 2024

This is great! Big kudos for the work.

@Zimbo111
Copy link

If Spoolman could be integrated like this, it would be great. Many thanks for the work . I hope it will be implemented

@CooperGerman
Copy link

can't wait to see this integrated =)

@Ocraftyone
Copy link
Contributor Author

I was taking a bit of a break from this to work on the CMake system overhaul PR. Moving back to this to hopefully get it finished up 😊

…poolman-support

# Conflicts:
#	src/libslic3r/Preset.cpp
@besser
Copy link

besser commented Apr 20, 2024

@Ocraftyone this integration you did was awesome!!!
Can't wait to see this integrated too :)

@Jesibu
Copy link

Jesibu commented May 12, 2024

Can't wait to see this released :)

@StuSerious
Copy link

Spoolman is now able to pull from a global database of filaments, materials and manufacturers (see https://github.com/Donkie/SpoolmanDB), should you be interested in implementing it as a feature (say to search for your new spool directly in the slicer) I'd be willing to help test/develop!

@Kareem1211
Copy link

I'm very excited to try this great feature, how can I test it?

@Ocraftyone
Copy link
Contributor Author

I'm very excited to try this great feature, how can I test it?

#4771 (comment)

I will update this comment with a link to the latest files. Just click the link and get the correct file for your OS.

@AlexTheGreat1971
Copy link

AlexTheGreat1971 commented Feb 23, 2025

I would like to be able to synchronize Orca with Spoolman server across all Orca's filaments and use synchronization data even if there is no connection with the server. Now, when changing the filament and trying to slice, you constantly get a warning from Orca that there is not enough filament and you have to go into the properties of the filament and update its data from Spoolman server.

@cdedwards
Copy link

This will be great when it's working as expected along with Happy-Hare and Mainsail integration. I do have a problem though with the spoolman filament dialog. There is no way to increase the size of the window that's created by Orca to display Spoolman filament. leaving me with a very thin window with some scroll bars along side and bottom.

image

@Ocraftyone
Copy link
Contributor Author

This will be great when it's working as expected along with Happy-Hare and Mainsail integration. I do have a problem though with the spoolman filament dialog. There is no way to increase the size of the window that's created by Orca to display Spoolman filament. leaving me with a very thin window with some scroll bars along side and bottom.

image

I have noticed this while testing in WSL. I was hoping it was just some weirdness surrounding how WSL renders apps, but apparently not. I'll add this to my list of stuff to dig into 😄

@Ocraftyone
Copy link
Contributor Author

I would like to be able to synchronize Orca with Spoolman server across all filaments in Orca and use synchronization data even if there is no connection with the server. Now, when changing the filament and trying to slice, you constantly get a warning from Orca that there is not enough filament and you have to go into the properties of the filament and update its data from Spoolman server.

I am not entirely sure what you are asking for, but I think you are asking to have the filament consumption details persist between instances of Orca.

If the spoolman server is unreachable/not available, you should not get any notifications unless you are attempting to open the import dialog. This may break apart if you start with access to the spoolman server, then it becomes unavailable, but at that point you would already have the spool data cached in the orca instance and should only get an error if you are trying to import a spool or consume a spool. I have no intention of caching the data beyond the life of an instance of OrcaSlicer because I believe that negates the point. I think no data is better than stale data.

If that is not what you were asking or you still have questions, please let me know 😄

@Zimbo111
Copy link

Is there already a way to select the filaments inserted in spoolman directly in orca?

@Ken6432
Copy link

Ken6432 commented Apr 9, 2025

@Ocraftyone - Has this been fully merged into the final release of OrcaSlicer 2.3.0? I'm running Build 70931e5 and don't see the ability to select filament from Spoolman. If it hasn't been merged in, how does that work? Will it be at some point?

@locki-cz
Copy link

locki-cz commented Apr 16, 2025

@Ocraftyone - Has this been fully merged into the final release of OrcaSlicer 2.3.0? I'm running Build 70931e5 and don't see the ability to select filament from Spoolman. If it hasn't been merged in, how does that work? Will it be at some point?

you can test it from this build: https://github.com/SoftFever/OrcaSlicer/actions/runs/13477830428?pr=4771

also hope that will be implemented soon :)

…oolman-support

# Conflicts:
#	src/libslic3r/AppConfig.cpp
#	src/slic3r/GUI/Tab.cpp
@sakura-glitch
Copy link

@Ocraftyone - Has this been fully merged into the final release of OrcaSlicer 2.3.0? I'm running Build 70931e5 and don't see the ability to select filament from Spoolman. If it hasn't been merged in, how does that work? Will it be at some point?

you can test it from this build: https://github.com/SoftFever/OrcaSlicer/actions/runs/13477830428?pr=4771

also hope that will be implemented soon :)

And How exactly we can configure Spoolman Filaments there? Didn't find any option.

@locki-cz
Copy link

@Ocraftyone - Has this been fully merged into the final release of OrcaSlicer 2.3.0? I'm running Build 70931e5 and don't see the ability to select filament from Spoolman. If it hasn't been merged in, how does that work? Will it be at some point?

you can test it from this build: https://github.com/SoftFever/OrcaSlicer/actions/runs/13477830428?pr=4771
also hope that will be implemented soon :)

And How exactly we can configure Spoolman Filaments there? Didn't find any option.

It is too hard download, unzip run and follow how to video instructions in first post?

@Ocraftyone
Copy link
Contributor Author

@Ken6432 Thank you for the nudge! I went ahead an merged the latest changes, so it is now based on 2.3.1-dev. The link has been updated in the above comment.

@Ken6432
Copy link

Ken6432 commented Apr 16, 2025

Thanks! I'll get it installed and try it out

@locki-cz
Copy link

locki-cz commented Apr 16, 2025

Thanks! I'll get it installed and try it out

for testing is better use portable version ;)

this is just avesome!
image

@locki-cz
Copy link

@Ken6432 Thank you for the nudge! I went ahead an merged the latest changes, so it is now based on 2.3.1-dev. The link has been updated in the above comment.

great job!!!

@sakura-glitch
Copy link

@Ocraftyone - Has this been fully merged into the final release of OrcaSlicer 2.3.0? I'm running Build 70931e5 and don't see the ability to select filament from Spoolman. If it hasn't been merged in, how does that work? Will it be at some point?

you can test it from this build: https://github.com/SoftFever/OrcaSlicer/actions/runs/13477830428?pr=4771
also hope that will be implemented soon :)

And How exactly we can configure Spoolman Filaments there? Didn't find any option.

It is too hard download, unzip run and follow how to video instructions in first post?

I did, I don't have the Symbol like in the video. But thanks for not being helpful at all 👌

@locki-cz
Copy link

I did, I don't have the Symbol like in the video. But thanks for not being helpful at all 👌

I am sorry but your question just asked for spicy ansver :)

Which symbol? This one?

image

@SamueldaCostaAraujoNunes

One question, I know that in this implementation it is possible to link the filament directly to the orca, right? But wouldn't it be more viable to link to the profile, instead of the fixed filament?

1 similar comment
@SamueldaCostaAraujoNunes

One question, I know that in this implementation it is possible to link the filament directly to the orca, right? But wouldn't it be more viable to link to the profile, instead of the fixed filament?

@jonboy86
Copy link

jonboy86 commented May 21, 2025

Im happy to help test and give feedback but i am on ubuntu and seems like the build failed

@jonboy86
Copy link

jonboy86 commented Jun 1, 2025

is there a way i can help get the build to work for ubuntu?

@SamueldaCostaAraujoNunes

I would like to add a suggestion to the scope of the feature, in Anycubic Next (Anycubic's orcaslicer) there is an option to import the filaments currently loaded in the printer, colors, material type.
image

@will-blk
Copy link

The downloadable artifacts has expired, is there another link to download it?

@Ken6432
Copy link

Ken6432 commented Jul 5, 2025

@Ocraftyone - I have three different OrcaSlicer versions installed. I have 2.3.0-beta Build 2e8d42c (which was my original version configured to use Spoolman), 2.3.0 Build 70931e5, and 2.3.1-dev Build a8141ef. Everything still works in the 2.3.0-beta install. However, the two other installs do not have the Spoolman Enabled checkbox in the Physical Printer Connection dialog. I think I understand why it is not available in the 2.3.0 installation as I don't think Spoolman was included in that release. However, I thought in the discussion above that Spoolman was included in the 2.3.1-dev version I have installed. What am I missing? There must be some other step I need to do to get version 2.3.1-dev to allow me to enable Spoolman. -- Thanks

@pletom
Copy link

pletom commented Jul 9, 2025

Might be that this feature is not yet integrated with 2.3.1 because of:

  • building Flatpak (one of the build targets) is failing
  • This pull request is still a work in progress ("Only those with [write access] to this repository can mark a draft pull request as ready for review."

At least I see these 2 items as latest status :(.

@Ken6432
Copy link

Ken6432 commented Jul 9, 2025

Might be that this feature is not yet integrated with 2.3.1 because of:

  • building Flatpak (one of the build targets) is failing
  • This pull request is still a work in progress ("Only those with [write access] to this repository can mark a draft pull request as ready for review."

At least I see these 2 items as latest status :(.

Thanks for the response. I'm afraid I don't completely understand how GitHub works. A few messages above @Ocraftyone said he made a build based upon 2.3.1-dev and updated the link in the original message. When I go to that link, I don't get to a page with downloads available. Is that because of the build errors you mentioned? Where is the status listed that you referred to? - Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community testers wanted Looking for community testers and feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spoolman intergration - Request Filaments IDs