snapmaker-studio icon indicating copy to clipboard operation
snapmaker-studio copied to clipboard

Integration with SpoolEase

Open ezaton opened this issue 2 months ago • 19 comments

Since the application connects to multiple spool management mechanisms, I was wondering if it would be possible/hard to connect to SpoolEase: https://www.spoolease.io/ I use this tool for a while now (hardware+software) and it integrates well with BambuLab printers. Integrating into Snapmaker U1 is a valid goal, and the project also competes for SnapMaker funding. I believe it will be integrated eventually, and anything and everything that supports that is a good move towards that.

Thank you very much!

ezaton avatar Sep 27 '26 06:09 ezaton

Will check it out.

DVOpenLabs avatar Sep 28 '26 13:09 DVOpenLabs

SpoolEase support is now merged into main in #52 (merge commit 60ae116). It is not in a published release yet; it will ship with the next one.

What it does

  • Adds SpoolEase as a read-only material provider in Settings → Materials provider, next to Spoolman, Bambuddy and your own spool notes. You enter the Console's address and security key, press Test connection, and map U1 slots to spools manually. SpoolEase's Bambu AMS slot positions are not reused as U1 slots.
  • Studio only sends GET /api/spools to your Console. It never writes to SpoolEase and never touches its storage. Everything stays on your local network.
  • SpoolEase weights are shown as derived, never tracked, because SpoolEase does not see what a U1 has used since the spool was weighed. A SpoolEase figure never blocks a send.

Security key

  • Kept in memory for this session only. You enter it again after restarting Studio. It is never saved to settings, the library database, logs or diagnostics, and it is never sent to SpoolEase: Studio only uses it to decrypt the Console's response.
  • SpoolEase shows a new key each time it restarts unless you set a fixed key in its settings, so a fixed key is the easier option.

Protocol tested against upstream

  • SpoolEase at commit 3532f8d962dd1a95c7d4ebb37beddca5bbefd39a and esp-hal-app-framework 0.6.1 (43daad9d1795b21a7f4ea3ef610b328cabbfeda1): PBKDF2-HMAC-SHA256 key derivation, AES-256-GCM, base64 without padding, with the Console's CSV as the plaintext.
  • Studio reproduces byte-exact fixtures, and wrong keys, damaged responses and network failures are all tested. Details are in docs/interop/SPOOLEASE_PROTOCOL.md.

Validation status

  • PROTOCOL VERIFIED against the upstream source and fixtures.
  • REAL SPOOLEASE USER VALIDATION PENDING: it has not been tested against a physical SpoolEase Console yet.

@ezaton, since you have a SpoolEase setup, would you be willing to try it? You can build from main, or wait for the next release. Useful things to report: whether Test connection works with your key, whether the spool count and remaining weights look right, and any error text you see (please leave out your key and IP addresses). I'll leave this issue open until someone has confirmed it on real hardware.

DVOpenLabs avatar Sep 29 '26 01:09 DVOpenLabs

With pleasure :-)

ezaton avatar Sep 29 '26 21:09 ezaton

I will wait for the next release, and I will test it happily. Just updated to 1.2 and was disappointed not to see that there (until I read all your comment to the end). I really do appreciate the effort. Every software written for the community is a blessing, and I am thankful to you and to others who do such an important job.

ezaton avatar Sep 29 '26 21:09 ezaton

@ezaton — SpoolEase support is now in a published release: v1.3.0 is out.

https://github.com/DVOpenLabs/snapmaker-studio/releases/tag/v1.3.0

Windows installer and Linux .deb are on that page with a SHA256SUMS file. The Windows installer is not code-signed yet, so please check the SHA256 before running it.

When you have a moment with your real SpoolEase, could you check just these, in Settings → Materials provider → SpoolEase?

  1. Test connection — does it succeed against your SpoolEase's address and security key?
  2. Spool count — does the number of spools Studio reads match what your SpoolEase shows?
  3. Material, vendor and colour — are they right for a few spools you know?
  4. Remaining weight — does it look sane? (SpoolEase weighs on its own scale; Studio treats these figures as estimates and never refuses a send on one alone.)
  5. Manual U1 slot mapping — can you map a spool to a U1 slot yourself and have the plan use it?
  6. Session-only key — after you quit and reopen Studio, does it ask for the key again (it should not remember it)?

Anything odd is useful to know, including exact error text. Studio only reads from SpoolEase: it never writes to it. Thank you for offering to test this.

This issue stays open until you confirm how it behaves on a real device.

DVOpenLabs avatar Oct 03 '26 18:10 DVOpenLabs

Issues (I encountered so far):

  1. Spoolease (in my home) has local FQDN: spoolease.casa.me (transalted to 192.168.0.120 using 'nslookup').
Image
  1. Using IP address, and a valid API key, I got that it cannot understand the return message (could be because of SSL?). I tried to recreate the API keys, but for no avail.
Image Image

I am at your disposal in this. Thanks for the efforts!

ezaton avatar Oct 03 '26 19:10 ezaton

Thank you @ezaton — this is exactly the real-device evidence we needed, including the screenshots.

  • The private-name rejection is on Studio's side and needs fixing. A name like spoolease.casa.me that resolves to your own network should work. We will make it work and keep the rule that Studio never contacts anything off your network.
  • The "could not read what SpoolEase sent back" message: we are checking the actual HTTPS, credential and wire behaviour against what your SpoolEase really exposes, rather than assuming your key is wrong.

Please do not weaken TLS, turn off certificate checking, or change your SpoolEase configuration for us. If anything on your side ever needs to change, we will say so explicitly.

We will report back here with a test build / hotfix.

DVOpenLabs avatar Oct 03 '26 20:10 DVOpenLabs

@ezaton thank you for the screenshots — they pointed straight at the problem. Here is a v1.3.1 release candidate to try before we publish it.

What we found

  • Studio rejected spoolease.casa.me because it only trusted a short fixed list of name endings. It now checks what the name actually resolves to: a name that points at a device on your own network is accepted, anything that resolves off your network is still refused.
  • Your SpoolEase runs the 0.7 firmware, which sends a longer spool list (25 columns) than Studio understood. Studio v1.3.0 could not have read it even with the right key. v1.3.1 reads it.
  • A SpoolEase API key (the spe_api_v1… kind) is a different credential from the security key. Studio reads SpoolEase over its plain-http address with the security key. If an API key is typed into the key box, v1.3.1 now says so instead of the misleading "key is wrong or response damaged". API-key / https support is not in this release and is separate future work.
  • You do not need to change anything in SpoolEase's security setup, install certificates, or turn off any certificate checking. Studio's certificate checking is unchanged.

Release candidate (not yet public)

  • Build: https://github.com/DVOpenLabs/snapmaker-studio/actions/runs/37157885043 (GitHub login needed to download artifacts)
  • Linux: snapmaker-studio_1.3.1_amd64_8daea1f6a027.deb — SHA256 4388fcd7ce2fcdbf278d710767bab71d9a90cd9925115fbbf535b321f674d5dc
  • Windows: Snapmaker.Studio_1.3.1_x64-setup.exe — SHA256 5e545c00720d55ee83bd5dc970b5b69a29c5beffcd0136b8b428cb452ed8171e
  • The Linux package was validated on Ubuntu 22.04 and 24.04; 26.04 is not covered yet, so your result there is useful in itself.

What would help us confirm

  1. Settings → Materials provider → SpoolEase, address http://spoolease.casa.me (or the device's own address with http://), and the security key (the short key on the SpoolEase screen / web settings).
  2. Does it connect without an off-network refusal?
  3. Does the spool list load — and do spool count, material, vendor, colour and remaining weight look right compared with SpoolEase itself?
  4. If something is wrong, the message Studio shows (it should not include your key) is enough; no need to share the key or any certificate.

SpoolEase has not been confirmed on a physical device by anyone yet, so your report is what lets us close this issue.

DVOpenLabs avatar Oct 04 '26 00:10 DVOpenLabs

Seems to work (just had an initial view):

Image

ezaton avatar Oct 04 '26 05:10 ezaton

Great — could you check 2–3 spools you know and confirm material/vendor/colour and remaining weight look correct? If those match, I'll consider the real-device validation complete.

DVOpenLabs avatar Oct 04 '26 11:10 DVOpenLabs

v1.3.1 is now public: https://github.com/DVOpenLabs/snapmaker-studio/releases/tag/v1.3.1

Thank you @ezaton — your test of the release candidate is in it. Where this stands:

Confirmed on your physical SpoolEase (initial real-device validation passed):

  • spoolease.casa.me connected,
  • the security key was accepted,
  • the SpoolEase 0.7 response parsed,
  • 115 spools were read, 35 with a usable remaining weight.

Still pending: the detailed value check. When you have a moment, please pick 2–3 spools you know and confirm that material, vendor, colour and remaining weight match what SpoolEase shows. Until then I'm not calling the real-device validation complete, and I'm leaving this issue open for exactly that.

Not part of v1.3.1 (separate future work): SpoolEase API keys and its https port.

DVOpenLabs avatar Oct 04 '26 16:10 DVOpenLabs

I think that the integration (as enhancement) should go through some refining. I can open it all in a single topic (this one, for example) or through different topic per issue.

The first issue - for dark theme - you can hardly see the text (name of the spool) while selecting:

Image When the text is not selected (drop down menu) - it's hardly visible at all. This is the good example. When the theme is light - it is visible. Image

The second issue - the list of materials is unsorted (as you can see in the screenshot) - not by name, not by nothing.


The third issue - the list is a list of materials, however (as you can see in the screenshot) - I can't know which Sunlu ABS (for example) I am selecting. I would suggest at least one of two options:

  1. Add the color (as can be obtained from SpoolEase)
  2. Add the SpoolEase ID number This is a screenshot of how it looks in SpoolEase web interface
Image

The fourth issue - The materials can change per model. I think that setting the materials should be in the model convert and not in the 'settings' - if SpoolEase is selected. Since you may want to print one model with blue Yoopai material, and the other with black Overture PLA, and so on. You get the idea. So - maybe integrating it into the model conversion is a more suitable place.


The fifth (and last) issue - when you convert the model (I used this: https://makerworld.com/en/models/3055488-246-larvitar-pokemon-mini-figure ) with selection of materials in the settings and so on, still, in the slicer - you have Bambu materials. First - on opening this model, you get this:

Image

and then, you have the materials from Bambu:

Image

Thank you, and I am really thankful for your efforts!

ezaton avatar Oct 05 '26 14:10 ezaton

Thank you @ezaton . This is exactly the kind of use that finds the real gaps, and I agree with all five points.

The first three are plain problems on our side: the dark-theme dropdown text, the unsorted 115-spool list, and a label that doesn't tell similar spools apart. We'll fix those together, and the list will show vendor, material, colour name and the SpoolEase ID.

Your fourth and fifth points describe the bigger gap, and you're right. Settings currently says what is loaded in the printer. It does not say which spool to use for this project, so the prepared file keeps the project's original Bambu filament names. That is why your Studio choices didn't show up in Orca.

I'd like to keep the two ideas apart. Settings keeps the connection and what's loaded. Prepare gets a per-project step: for each filament in the model, Studio shows the real spool details, suggests the best match, lets you pick a different one, and records your choice. Putting that choice into the prepared file is the part I have to be careful with: a spool tells us its colour, vendor and material, but not the temperatures or flow of a slicer profile, and Studio won't invent a Snapmaker Orca preset that doesn't exist. I'll check exactly what Orca accepts before I change the file, and the report will say precisely which fields changed.

I'm keeping all five together here, since it's one workflow improvement. Thanks for taking it this far.

DVOpenLabs avatar Oct 05 '26 18:10 DVOpenLabs

I can say, on my side, that all the filament types shown in SpoolEase also(!) have a profile for Snorca (as well as for BambuStudio). My flow is to create a JSON profile for both platforms (new material, of course) - Gemini does that excellently, BTW, and then import the settings from BambuStudio to SpoolEase. This way - there is always a match between all these configurations.


About the loaded filaments - there I have a problem. I use the PAX firmware on SnapMaker U1, and I use SpoolEase support for OpenRFID mechanism. The printer 'reads' the filament type (most cases) and shows them correctly. Snorca, however - shows them on the 'device' tab, but not on the application, and will not sync the correct filament type from the device. If you were able to query the printer directly for the filament (and leave an option to manually enter it) - it would be cool, but, speaking for myself - the type of filament loaded now to the printer has little significance. My (personal, I can only speak for myself) is to load a model to the application and then start matching the filaments required there. A summary of the filament colors required (and even better - allowing me to select them from the SpoolEase inventory) would be a great improvement, and would solve one of my pains - manually selecting the type of filament the printer should have in the model, before actually slicing. Any automation around it would solve this pain.


I am happy to provide information. After all - I actually make use of your software, and enjoy its benefits. I hope I do not consume too much time and efforts compared to the overall design and features you have in mind. Thanks!

ezaton avatar Oct 05 '26 19:10 ezaton

Thank you, this actually helps a lot and makes the direction clearer.

Studio already reads the U1's filament information directly from the printer over Moonraker, including material, subtype, colour and vendor when the firmware reports them. Since your PAX/OpenRFID setup already shows the right filament in the U1 Device view, I'd like to verify whether that same data is reaching the printer object Studio reads. If it is, there may be nothing new required on that side.

More importantly, I agree with your workflow: the model should come first. Studio should show the materials/colours the model needs, then let you match each one to a real SpoolEase spool before preparing it. What happens to be loaded right now can help the recommendation, but it should not control the workflow.

Your note about maintaining matching profiles in both Bambu Studio and Snapmaker Orca is especially useful. SpoolEase's data includes a slicer-filament field, which Studio currently does not use. I'm going to check whether that can safely identify the corresponding real Snapmaker Orca profile. If it can, Studio could use the actual profile you already created instead of inventing or guessing one.

The direction I'm testing is therefore:

Model → required colours/materials → suggested SpoolEase matches → you confirm → Studio uses the matching real Orca profile when one is proven → Prepare.

And if Studio cannot prove a matching Orca profile exists, it will say so and preserve the existing print parameters rather than guessing.

This is exactly the kind of real workflow feedback that helps, and you're definitely not consuming too much time. Thank you for using it deeply enough to show where the workflow needs to improve.

DVOpenLabs avatar Oct 05 '26 21:10 DVOpenLabs

@ezaton v1.5.0 is now public: https://github.com/DVOpenLabs/snapmaker-studio/releases/tag/v1.5.0

Your feedback here is what led to Project Materials. On the Prepare page, Studio now shows the materials and colours the model asks for, suggests spools from your real inventory with the reasons, lets you choose the installed Snapmaker Orca preset yourself, and carries the spool's colour into the prepared copy. You review a plain-language summary before anything is written, and nothing is selected for you.

What is and is not verified:

  • Snapmaker Orca's own installed presets are the verified path.
  • Presets you made yourself in Orca can be found and mapped to a spool, but Studio marks them "Confirmed by you" and "Manual check in Orca required". In our testing Orca kept the project's own values for such a preset, so Studio does not claim Orca applies its temperature, flow or cooling. Please check the filament in Orca before slicing.
  • It has been exercised against a Spoolman look-alike, not yet against a real SpoolEase device.

If you can, please try the real SpoolEase to Project Materials workflow and tell us what you see. I'm keeping this issue open until we have your real-device feedback.

🤖 Generated with Claude Code

DVOpenLabs avatar Oct 06 '26 23:10 DVOpenLabs

The integration partially works.

Image Image

I can't remove an excessive color (in this example - it is white), and I can't map my colors to my existing Spoolease spools at all.

There was only one case (which I cannot reproduce now) that Studio showed SpoolEase filaments (based on its decision) with no space for me to select custom (example: I want to use blue instead of red in a model - so I would want a custom selection of filament, based on SpoolEase inventory). Even though I was able to select filaments (don't have a screenshot) - when opening the 3mf created by Studio - the spools were Bambu default spools. Sorry I don't have a screenshot.

ezaton avatar Oct 08 '26 05:10 ezaton

Thank you @ezaton — this is exactly the real-device test I was waiting for, and the screenshots help a lot.

I think you have exposed three separate gaps here:

  1. Extra colour: Studio can currently tell you that the project has more colours than the U1 has toolheads, but it does not yet give you a safe way to say "I don't need this colour" or deliberately merge/remap it. In your example Studio cannot prove how the white slot is used, so I don't want it to remove it automatically. I do agree that you need a manual way to resolve this.
  2. Choosing the actual SpoolEase spool: this is a clear limitation in the first Project Materials version. Studio currently shows its ranked suggestions, but you should also be able to press something like Choose another spool and search your full SpoolEase inventory. If the model asks for red PLA and you intentionally want blue PLA, that should be your choice. Studio can warn about the colour difference; it should not prevent the choice.
  3. Bambu filament still appearing in Orca: I want to investigate this one rather than explain it away. Selecting a physical spool and selecting the Orca filament preset are separate steps internally. It is possible Studio carried the spool colour but preserved the model's original Bambu preset because no Orca preset was actually confirmed. But if you did confirm an Orca preset and the prepared file still contains the Bambu one, that is a bug.

If possible, could you attach the original 3MF and the Studio-prepared 3MF from one case where this happened? No screenshot is necessary. With those two files I can compare exactly what Studio wrote and tell which case it is.

I'll keep #39 open. I think the next refinement should be:

model colour → suggested spools OR choose any spool from your inventory → explicit Orca preset → review → Prepare

and we also need a safe user-controlled answer for an unwanted fifth colour.

Thank you again — this is much more useful than a synthetic test because you're using the workflow the way it was intended.

DVOpenLabs avatar Oct 08 '26 13:10 DVOpenLabs

Status summary and what is still needed to close this, from re-reading the whole thread and the code.

Already shipped (in a release)

  • Read-only SpoolEase provider (v1.3.0); fixes for the private DNS name, the 25-column list and the API-key confusion (v1.3.1, confirmed on a real device in this thread: connected, 115 spools read, 35 with weight); dark-theme text, a sorted list and clearer labels (v1.4.1); the per-project material choice, Project Materials (v1.5.0).

Merged, in the v1.5.1 release candidate (not published yet)

  • Choose any spool from the whole inventory (the "Choose another spool" picker), the clearer "Spool selected, but no Orca preset selected. The project's existing filament preset will remain." message, Forget saved mapping, and the saved-mappings file no longer being treated as damaged after a brief lock.

Still open (reproduced or reported)

  1. An extra colour that cannot be removed (the white slot, 5 materials vs 4 toolheads). Studio shows that slot as "Studio can't tell how these are used" but does not let you act on it. I could only reproduce the shape of this with a 5-colour Snapmaker-authored test project, not your model.
  2. Bambu filament presets still in the prepared file. With a spool chosen and no Orca preset confirmed, keeping the project's own preset is intentional (the message above says so), but picking a spool does not pick a preset, which is easy to miss. Separately, a prepared copy of a Bambu-authored project carries nozzle_volume_type over unchanged, which a genuine Snapmaker-authored U1 project does not have; that is the likely source of the "newer version, values replaced" notice in your earlier screenshot, but I have not confirmed it in Snapmaker Orca yet.
  3. A real-device value check (material, vendor, colour and remaining weight on 2-3 spools you know) was asked for earlier and has not been answered.

What I am doing next (one follow-up change, nothing removed silently): show per-slot usage and a clear "beyond the U1's 4 toolheads" note on the Project Materials card, make the foreign-preset-plus-spool message clearer, and stop carrying nozzle_volume_type into prepared copies if that holds up against the real files. Actually removing or merging a colour needs a measurement in Snapmaker Orca first, so that is deliberately not part of this.

Acceptance criteria for closing this issue

  1. On a real SpoolEase, for 2-3 known spools, material, vendor, colour name and remaining weight in Studio match SpoolEase's own view.
  2. "Choose another spool" lists the whole SpoolEase inventory; choosing a spool of a different colour is accepted (the colour difference is information only).
  3. After confirming a real installed Snapmaker Orca preset for one slot, the prepared 3MF opened in Snapmaker Orca shows that preset on that slot; the other slots keep the project's presets, and the review text says so.
  4. With no preset confirmed, the review says the project's preset remains, and Snapmaker Orca shows the original name.
  5. For a model with more than 4 colours, an unused colour can be resolved or deliberately left, with a plain statement of what was and was not proven.
  6. A prepared copy of a Bambu-authored project opens in Snapmaker Orca without the "newer version, values replaced" notice.
  7. Items 1-4 and 6 are tested by the reporter on a release that contains the picker (v1.5.1 once published).

What I need, once (from @ezaton; the files contain only what you choose to share, and Studio's comparison command prints no object or part names)

  • The original PacmanAMS.3mf and the copy Studio prepared from it, or at least the output of python -m snapstudio_core.project_compare <original.3mf> <prepared.3mf>; the same for the Larvitar model.
  • Your Snapmaker Orca version and operating system, and the full text of the nozzle_volume_type dialog (the part after "was replaced with" was blank in the screenshot).
  • Whether you explicitly confirmed an Orca preset in the "Bambu default spools" case.
  • The 2-3 spool value check from earlier in this thread.

This issue stays open until the criteria above are met.

DVOpenLabs avatar Oct 10 '26 01:10 DVOpenLabs