OrcaSlicer
OrcaSlicer copied to clipboard
Feature: Add Spoolman Compatability
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:
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:
- [x] Check if spool has enough material to finish print upon slicing
- [x] 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
@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.
This is great! Big kudos for the work.
If Spoolman could be integrated like this, it would be great. Many thanks for the work . I hope it will be implemented
can't wait to see this integrated =)
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 😊
@Ocraftyone this integration you did was awesome!!! Can't wait to see this integrated too :)
Can't wait to see this released :)
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!
Spoolman is now able to pull from a global database of filaments, materials and manufacturers (see 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!
Sorry for the late response. That is a super cool feature and could definitely be implemented in the future, but I think it would be out of scope for this PR.
Hello! Thanks for the interest in this PR! I wanted to give an update on what has been done since the initial release of this PR.
The slicer will now send a warning if you slice a model and one of the filaments does not have enough material.
The way the statistics for the spool are are saved has been updated. The stats are no longer saved to the preset's config. This removes the unnecessary action of saving the data to the preset's json file since the data should be fetched upon startup to ensure that it is up to date.
Speaking of keeping the spools up to date, the statistics of all active spools are now (re)loaded on startup and upon switching printer profiles.
That is it for the currently implemented updates! Right now, I am working on implementing I am working on consuming the filament.
I do still have one other thing to address. I am not very happy with how the notification is displayed for not enough filament is displayed. It tends to hide behind the gcode preview. I have contemplated trying to adjust the notification to stay on top of the gcode preview, but from my testing, it could get janky since there is no way to explicitly give priority to the notification for the overlap (at least that I found). I also need to determine how in the UI to allow the user to indicate they want to consume the estimated filament used upon export. I am thinking just a checkbox during the upload dialog, but I am open to ideas. @yw4z , @SoftFever , or anyone else with feedback, I would be greatly appreciate your input.
@Ocraftyone I dont use this software but it looks great and useful. here is my ideas for usage • Tab / Page for full spoolman control like device tab • you can create an icon on filament title bar for easy access. Icon will be only visible if option enabled • spoolman icon can show remaining percantage of filament. i guess this one is main purpose of spoolman • Hovering on icon give detailed information on tooltip for selected filament • We can use colors on icon to indicate its on low. Icon color will use red if <%10 and yellow for <%25 • maybe this icon would work as dropdown menu if you planing to add more features. Import / Update usage / Add to spoolman / Spool usage(disabled element) • maybe moving enabling spoolman support to main preferences window would be better because its not spesific to machine. but ignore this if running multiple spoolman instances a thing • Use a popup notification / warning if filament will end while printing and it detected while slicing process. i guess it would be nice because its a critical thing i can design icons for it if you positive about these ideas
maybe moving enabling spoolman support to main preferences window would be better because its not spesific to machine. but ignore this if running multiple spoolman instances a thing
I implemented the setting into the printer profile because I figured it would allow for more flexibility, but I also very much understand the idea of having it as an application specific setting rather than printer. Honestly, that would cut down on the possible issue of having two different spools from two different Spoolman instances with the same ID.
Tab / Page for full spoolman control like device tab
I also do like the idea of having a sort of Spoolman dashboard where you add the filament presets to Orca and even pull/create spools based on SpoolmanDB like suggested above, but I would really like to get a fully functional implementation before expanding to ideas like that. I would love to have icons designed when/if I implement that. I really hate graphic design XD
What I was really looking for guidance on was how to display the filament run out warning. The current way the notification is being displayed is way too subtle, but I also feel fully interrupting the user with a dialog could be cumbersome and annoying at times. @yw4z
ALERTS / NOTIFICATIONS
I guess better to use system dialog for warning if spool has less material then sliced print but you can create 2 types notifications for that.
one for less critical • there is a huge difference between spool and sliced print. user already know sliced print will take 2-3 spools • probably user will check "dont show again" check box for this • Use regular icon for this dialog • Show this as notification if user selected "dont show again"
one for more critical • sliced print is very close to spool weight. user basically will reduce some infill settings to fix that • Use warning icon for this dialog • Show this as notification if user selected "dont show again"
ICON USAGE
Here is a generic (used if there is no spoolman information) and level icons
• You can add icon to left side for settings icon. near of AMS button. both has similar functions if you generalize as filament management
DROPDOWN MENU
menu usage if filament doesnt have spoolman information. generic icon used
menu usage if filament have spoolman information. spool level used as icon
icon will make easy to access for spoolman feature. here is my suggestions for menu elements with menu order • ~257 / 1000 gr
disabled element that shots spool usage tilde symbol indicate its estimated It will be hidden if no spoolman info
• Add this filament
Quick access for importing current filament It will be visible if no spoolman info
• Set usage
Opens a popup with input box near cursor. so user can add / subtract additional usage easily for current filament without dealing manage window
• Import
Will open import window. using this in menu will be better if user has long list of filaments
and alternative icon sets with using bars for level. its easier to understand but looks a bit old
- Damn you work fast!
- Notifications: So you are suggesting using a popup dialog rather than a notification/a warning drawn on the screen?
- Icons: Love them. Honestly, I think adding them all and making it a user preference would be awesome.
- Dropdown menu: I don't think this would work all that well. First, if there are multiple spoolman enabled filaments, there wouldn't be a very easy way to display each one and indicate which is which. Second, I am not thinking of adding the ability to manually set the usage. My idea is that manually setting should not have to be done. I will have an option to consume the material needed for a print and maybe an undo button if the action is performed by mistake. Adjusting values not related to a current print should still be done via the Spoolman web interface. The one thing I do agree with is moving the import button out of filament dropdown.
2- yes i'm suggesting using popup dialogs with "dont show again" option. at least for critical level. 3- i will commit them all if you ok with all options 4 - i guess percentage for icons also has possible problem if multiple spoolmans not in sync for same filament. maybe clicking icon will open spoolman tab directly. Showing detailed spoolman info on tooltip still a good option
I wouldn't commit the icons quite yet. At the current pace of this pr, its going to be a bit before getting to setting up those changes. Honestly, they will probably be another pr.
let me know when you need it
Is there any progress on this?
This is amazing work, thank you! Is there a Orca release this is slated for?
This is some fantastic work! I look forward to seeing where this goes. Is there anything I can do to help?
Same question as @kostecky 👍
@weemantella @johnbxl1970 Not quite yet, but I will let you know. I have gotten back around to putting more time into this so I can put the final touches on it. I will let you all know when I get to the point I need testing 😁
Currently I am working on the notifications for low material warnings. I was able to find a notification level that fixes the issues I noted above. I also discovered that there is a warning dialog that is shown when you attempt to export when you got a slicing warning. I have overhauled that so that it is much more functional and will work in place of a dedicated spoolman warning dialog. Next step after this will be implementing a dialog after export that asks if you want to consume the filament. I will also show a notification saying if the consume was successful and allow the consume to be undone. After these changes are made, it should be ready to test and will only need refinement, such as moving spoolman to a global setting rather than being tied to a specific printer and an import error I have noticed. Thank you everyone for your support!
Hi @Ocraftyone
Super excited to see this happen!
A point to discuss from my recent experience with Spoolman and happy hare.
With the expansion of multi material units in Klipper and the rapid development in Happy Hare, it would be good to discuss how these two systems can interact with each other to offer a more user friendly way to manage filaments in an MMU setting.
Let me explain what I mean:
- Happy Hare has the ability to read the MMU Gate to Filament ID mapping from Spoolman, with the spoolman database being considered as the source of truth. This is then stored in the happy hare local gate to tool map
- Alternatively Happy Hare can publish to Spoolman what spool is used on what gate based on its internally maintained Gate to Tool Mapping: i.e. The local gate map is considered as the source of truth and will be pushed to spoolman
For option (1) - where spoolman is the master of the filament to gate - tool mapping, the user either updates the gate/filament mapping using the spoolman UI and then that gets pulled into Happy Hare. Alternatively this command can be used from the printer console: MMU_SPOOLMAN GATE=3 SPOOLID=74 which updates the spoolman gate to spool mapping and then refreshes Happy Hare with the information from Spoolman (for all spools assigned to gates, included the updated one)
For option (2) - where Happy Hare is the master of the filament to gate to tool mapping, the spoolman ID to gate ID map can be updated from HH to Spoolman with this Gcode command at the printer console: MMU_GATE_MAP GATE=3 SPOOLID=74
References: https://github.com/moggieuk/Happy-Hare/wiki/Spoolman-Support
What I am thinking here is how do we bring the slicer together with the above to make multilateral management and filament consumption more "seamless".
One way could be:
- The user has the ability to select the gate where a filament is mapped to in the Orca slicer UI - i.e. a text box in the spoolman tab of the filament where the custom field MMU Gate is displayed (if that field is available). That field could have the option to be auto populated with the tool number the filament is currently allocated at (i.e. tool minus 1 as its 0 based). That option can be placed in the printer settings (i.e. auto update gate number to match tool number).
- The gate to filament mapping then is pushed to spoolman updating two custom fields (printer name and gate ID (0 based)).
The printer name can be sourced from a new text field here (as the printer name in the profile can be different to the printer name in Klipper, especially if people have multiple printer profiles for one physical machine, eg. for different nozzle sizes)
That way the gate to filament mapping can be updated directly from the slicer and, optionally, auto updated based on the filaments that are selected by the user in the filaments selection.
If we want to take it further a dialogue similar to what Bambu does can be implemented that updates both the Happy Hare tool to gate map and the spoolman gate to filament map.
This becomes even more exciting with solutions like this https://github.com/moggieuk/Happy-Hare/wiki/Spoolman-Support#---auto-setting-with-rfidqr-code-reader, where an NFC reader can be used to automatically update spoolman bringing klipper MMU management on par with Bambu's automated filament material management!! :O
I appreciate this may be roadmap stuff right now but bringing in those two custom fields would be a fantastic first step, to consolidate filament management in a single application - the slicer :)
Thxs for your work, looking forward to this,
I'm so excited to see when spoolman is fully integrated. I'm already looking forward to it
I'm so excited to see when spoolman is fully integrated. I'm already looking forward to it
This is a really cool feature! Do we have any updates on it? is there a way we can have this as an alpha/beta to test?
This feels so right! What an amazing job, I hope to see it on OrcaSlicer soon!