mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #1162] [Bug]: Filament Mapping doesn't work with Filament Track Switch #839
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#839
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mkavalecz on GitHub (Apr 29, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1162
Originally assigned to: @maziggy on GitHub.
Component
Bambuddy
Bug Description
When the Filament Track Switch is installed, the Filament Mapping shows an empty list.
On the printers page, the AMS shows the filaments correctly, and they are also mapped correctly to the spools in the Filaments section.
But when starting/scheduling a print, the Filament Mapping list is empty.
Removing the Filament Track Switch solves the issue instantly, reconnecting the track switch breaks the list on the next printer reconnect.
Note: I'm using an X2D, the "Printer Model" dropdown on GitHub doesn't allow selecting this printer.
Expected Behavior
The installed filaments should be listed.
Steps to Reproduce
Printer Model
Multiple printers
Bambuddy Version
v0.2.4b1
SpoolBuddy Version
No response
Printer Firmware Version
01.01.00.00
Installation Method
Docker
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
bambuddy-support-20260429-105348.zip
Screenshots
No response
Additional Context
No response
Checklist
@mkavalecz commented on GitHub (Apr 29, 2026):
@mkavalecz commented on GitHub (Apr 29, 2026):
Full MQTT dump with and without the track switch:
mqtt_with_switch.txt
mqtt_without_switch.txt
Seems like there's a fila_switch entry related to this.
@maziggy commented on GitHub (Apr 29, 2026):
Since it's a new device, this is a feature request and not a bug.
First of all you should have a look at your logs and fix your system setup. Looks like your install is messed up. There are lot's of errors.
The AMS
infofield (a hex bitmask) changes one nibble when the FTS is installed:Bambuddy's MQTT parser treats 0xE as "uninitialized, skip" — matching BambuStudio's reading for transient AMS state at boot. With the FTS installed the printer reports 0xE permanently because the AMS is no longer tied to a specific nozzle (the FTS routes between them), so every slot lands without an extruder assignment. The print modal's filament dropdown filters slots by
extruderId === nozzle_id, so the list ends up empty.Fix: detect FTS via
print.device.fila_switch(non-null only when the accessory is installed) and drop the per-extruder filter when it's active.Three things would help me ship this with confidence — (1) is the high-value one:
fila_switch.stat/in/outchange and tune the detection.Side note: X2D is selectable internally but I missed adding it to the issue template. Will fix in passing.
@mkavalecz commented on GitHub (Apr 29, 2026):
Thanks again for the fast response!
Sorry, it wasn't my intention to mis-categorise the issue, I only added it as a bug, because the track switch is supposed to work with H2D/H2C too, and those are older, but I guess the track switch itself is new too.
I installed Bambuddy on 4.21 when I only had an A1 printer, and got the X2D on 4.27, so I had a few stumbles to get everything to be correct, but I already fixed all the errors, I used the printer yesterday too, notice how all of these are from <=04.27.
I didn't catch it specifically during the load, but this is how it looks like when a filament is actually loaded, during printing. Is this enough, or should I try specifically while it says loading filament?
@maziggy commented on GitHub (Apr 29, 2026):
Thanks for the during-print bundle — it gave me everything I needed. Fix is in dev now (will land in the next daily build).
What changed:
Single-AMS is fine for testing — that's exactly the configuration in your bundle, and the implementation handles it. Once your AMS 2 Pro and AMS-HT arrive, the same logic should hold (out is the FTS topology, in is the dynamic routing — neither cares how many AMS units are attached). If you do see anything off with multi-AMS routing once it's all assembled, please open a follow-up.
Detection is automatic (no setting), so you'll see the dropdown fill.
Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you.
BTW:
Can you please send me a screenshot so that I can check how it looks like? ;) Don't have a FTS.
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!
@mkavalecz commented on GitHub (Apr 29, 2026):
Thank you! I built a temporary docker image locally, to make it easier to try this out.
For any non-developer who might want to try similar new features, without waiting for the new daily image, here are the steps:
Switching to the dev branch from the daily docker image:
Going back to the daily image:
I can confirm that the loaded filaments now list correctly, here's the screenshot:
I'm currently running another print (bypassing Bambuddy), but it should be done in around 30 minutes, then I'll try starting a print job from Bambuddy and get back to you with the results.
@maziggy commented on GitHub (Apr 29, 2026):
git checkout dev && git pull && docker compose build && docker compose up -d
@mkavalecz commented on GitHub (Apr 29, 2026):
If you already have the repo checked out, that also works, yes :)
I used the
docker-install.shinstall method from the website for the initial setup, that only downloads the docker-compose file, so I had to clone the repo to a temp dir first.But yeah, I should have used
docker compose buildinstead ofdocker build. Both work, but your method is cleaner.I'll clean this up tomorrow, so that watchtower can keep managing the updates.
Now for the important part:
I started a new print from Bambuddy, and the filament mapping seems to work correctly!
It loaded the correct filament, into the correct extruder, and is now printing happily.
Thanks a lot for the quick fix. I sent a "coffee" your way to show my appreciation ;)
@mkavalecz commented on GitHub (Apr 30, 2026):
Looks like there still needs to be some more work done for this, because right now, my AMS seems to be stuck to the right nozzle in Bambuddy, and whenever I try to print anything, the printer gets confused.
Also, the slicer seems to know some kind of ID for the track switch, because sometimes it says that the sliced file doesn't match the track switch on the printer, and I should sync and slice again. I have to select my actual printer, sync the info, slice, then send to Bambuddy, if I try to do the slicing with the virtual printer, it will always fail.
If you can tell me what kind of information I should get for you, I'm happy to help, I don't know the inner workings of this, so I wouldn't even know where to start.
@maziggy commented on GitHub (May 1, 2026):
This is a slicer warning and has nothing to do with Bambuddy.
You need to explain in detail what you're exactly doing.
@mkavalecz commented on GitHub (May 1, 2026):
Okay, so what I wanted to say, was 2 things.
The issue persisted, no matter what I tried. The printer refused to print anything else from within Bambuddy from this point, so I started using Bambu Studio directly, without involving Bambuddy, because that was the only way for me to move forward.
So there were two problems with this:
After a while of trying, the printer flat-out told me that it's in an invalid state, and I should reset to factory defaults.
I think what might have happened when I saw the error was this:
This second issue is only important, because as a user, I expected that the device selection is only important while selecting the current destination for the "Print plate"/"Send".
Both the virtual printer and the real printer are reported as X2D, I think it was quite safe to assume that as long as the Build Plate / Nozzle / Filament etc. options are selected correctly (and they were), the "which actual physical printer will this be printed on" shouldn't matter at all.
This was always the case for other Bambu printers.
But it seems like Bambu changed this expectation, because the error message stated that the model was sliced for a different track switch, and I should re-slice it to avoid issues while printing. This took me by surprise, slicing should only depend on the printer's configuration, not the actual physical printer.
Sorry for the wall of text, I honestly couldn't tell this any shorter without losing context that might be important.
I stopped using Bambuddy for now, and went back to Bambu Studio, because I don't want to repeat what happened yesterday.
@mkavalecz commented on GitHub (May 1, 2026):
Another note that might be important for the 1. problem I mentioned:
I'm printing using Bambu Studio now, but Bambuddy is still running in a kind of readonly mode, to monitor the printer.
Now when I'm printing from Bambu Studio, the AMS shows for the left extruder within Bambuddy.
When it started the job on the right extruder it showed an R there. I think it shouldn't really show anything with a track switch, but I don't know if this is related to why it started to print on the right extruder, or not. It might just be a visual thing that shows where it is currently, in which case, it's not an issue.
@maziggy commented on GitHub (May 2, 2026):
Detailed write-up — thank you, this is exactly what I needed to triage.
Splitting what I see into three things:
The wrong-nozzle print is a real Bambuddy bug, separate from the detection fix that just shipped. The detection fix made the loaded filaments visible in the dropdown, which is why your first print dispatched at all — but our project_file MQTT command is missing the per-filament nozzle/extruder routing fields that Studio sends for FTS-equipped X2Ds. Without those, the X2D defaults to one nozzle (right, in your case) regardless of the slicer's intent. The print quality issue and the eventual "invalid state" are downstream of the printer doing actual prints with mismatched tool/route. Not a status display issue.
The Studio sync-from-VP behaviour is real but separate. Studio's "select-as-device on Send" pattern is on Studio, but our VP advertising thin/empty hardware fields makes it worse. Worth its own issue.
The L badge during your Studio-driven print is just status display — Bambuddy reads what the printer reports the FTS
currently has routed where, and renders that in the AMS card. No effect on routing.
To fix (1) properly I need to see the full project_file MQTT command that Studio sends to your X2D — that's where the missing field set lives. I just pushed a small dev-only diagnostic: when a slicer-launched project_file passes through the request topic, Bambuddy will now log the full payload at INFO level (no debug-mode required).
If you can:
I'll diff Studio's payload against ours and ship the routing fix.
Issue hygiene: I'd suggest keeping #1162 closed (the as-filed FTS detection issue is genuinely fixed), and opening two follow-ups so each one has a clean repro and resolution path:
(severity: medium — confusing UX, potentially mis-sliced files)
Reference this thread in both and I'll prioritise the routing one.
@mkavalecz commented on GitHub (May 2, 2026):
I created both issues as recommended, and attached the necessary info in a support bundle for #1192 .
I checked the log and the project_file log line seems to be there as expected.
Feel free to edit the issues if needed for clarity.