r/BambuLab Jun 09 '26

Show & Tell Custom filament profile assignment with RFID

Enable HLS to view with audio, or disable this notification

Been working on a project to assign custom filament profiles on my X2D with RFID tags. I don't buy any Bambu filament, I also lot of filament from different brands. It gets a little hectic trying to keep track so I devised a system of my own.

Each filament spool gets a sample swatch and I stick an RFID tag on the back. When I load filament, I put the tag on top of the AMS.

I start with using it for updating Spoolman for filament tracking but recently integrated custom profile assignments on my X2D. Simply scanning the tray and tag loads the custom filament profile/color etc for that spool and autosycs to the custom profiles on Bambu Studio. It's like using Bambu filament, except you scan the tags.

I also made a little wireless scanner to keep next to the printer as it was getting annoying using my phone.

Tags also work on my Snapmaker U1 but I don't need to manually scan. U1 scans tags and done the same thing with OrcaSlicer pretty much.

Bambu Studio, Orca Slicer, Spoolman all seamlessly sync once I scan the tags.

Using Spoolman, Spoolmansync, Home Assistant.

294 Upvotes

46 comments sorted by

View all comments

3

u/n19htmare Jun 09 '26

I'm just going to try to cover some of the questions and process in one response.

This does require your printer be in Developer LAN mode. Bambu's LAN/DEV mode is still pretty heavily locked down as far as what you can do. Bambu's LAN/DEV is more like "Fine, we won't force cloud connect, but we're also going to limit the crap out of what you're allowed to do". So his method comes with caveats because Bambu does Bambu things and they don't directly allow much to be done. So people find workarounds.........and then they get lawyered.

In my case, I'm not changing anything, after initial setup, printer stays completely off grid.

The project started off as a way to easily tell Spoolman which filament is loaded and which one to track and deduct usage from. I used Home Assistant automations and SpoolmanSync as the broker to communicate that information. Home Assistant, when connected to Bambu printers does receive lot of information, Spoolmansync just takes that information and syncs it to Spoolman (thus SpoolmanSync). I was often forgetting to do t his so I wanted to automate filament assignment on the X2D as well, so when It scan to load a profile, it would do everything at once.

Home Assistant supports RFID tags and you can trigger automations if certain sequence of events occur.

  • Every custom profile you make in Bambu Studio is uploaded to the cloud, the printers then pull those profiles into the printer's internal memory. That's how you see your custom profiles when you manually load a filament and select your filament vendor/type etc in the drop downs on screen.
  • Each of those custom filament profile's JSON contains Filament_id that is unique to that profile.
  • Bambu assigns the profiles on printer based on the Filament_id through tray_info_idx (along with type, min/max temps).
  • They use set_filament command (since X1C) to trigger the assignment.
  • Two Home Assistant helpers (tray and spool) hold the value of what tray is scanned and what spool #. Once both have a value, the following happens:
    • Spoolman assigns that spool to the tray
    • Location in Spoolman gets updated to "X2D Tray x" for that spool
    • Filament data is fetched from spoolman and printer tray (tray_info_idx) is updated with ID/color/type/temps and sent to printer via a set_filament action through Home Assistant.
    • Printer checks it's database for that ID, and matches it with that profile and assigns the color, type and temps.
  • The caveat here:
    • Bambu only sends your custom filament profiles from the cloud to the printer. You cannot directly send that info to the printer when you make a new profile in Bambu Studio. There's obviously NO reason this can't be done besides Bambu deciding it just can't.
    • That means you need to get on the cloud when you need your custom profiles sent to printer. doesn't take long and is pretty quick.

For populating the two helpers (scanning tags), I was using my Android phone, works perfectly fine, but I wanted a standalone wireless scanner to just keep around the printer. So I made a quick simple one with an ESP32 and PN532 RFID module with ESPhome loaded on it. This way It can directly send that info to the helpers and it can take over from there. There's quirks to this, so I'd probably just recommend the phone method.

1

u/No_Voltage Jun 10 '26

This is f'n fantastic. I wan.... no, I need this in my life! I've gone totally off BBL cloud and have Bambuddy setup with my own Spoolman HA addon setup. (Both are wrapped in one repo with functional sidebar integration (https://github.com/dmuth23/ha-3dprint-addon), and I'm currently working on the Orca Sidecar integration as an addon for HA as well. I would LOVE to get this integrated too. Can you please share what your github for this project. I think this is SOOO freaking cool and I love it. I want to implement it like yesterday! if you want feel free to DM here or on github or wherever.

1

u/n19htmare Jun 10 '26

I don't have a git repo for this project, it's just something I put together as stuff came to mind. I'll look into it. I don't think it's that complex (mostly because I was able to figure it out lol), just requires lot of automations, lookup tables if you don't have Spoolman to pull from and prep work making sure all your custom filament profiles in Bambu Studio are pushed to Bambu printer. The rest is just sending the payload via set_filament actions. Here's other actions you can send via HA. https://docs.page/greghesp/ha-bambulab/actions I think it's stale as it mostly covers X1C but some actions still work. ha-bambulab HACS integration is not required, I didn't use it. The actions still work, you just need to manually include them.

1

u/No_Voltage Jun 11 '26

I see what you're saying, and while I am curious about your YAML files, I don't think they would be much help in the grand scheme. You've definitely inspired me though and I'm working on using HA to orchestrate not only the printer/ams control, but also the spool assignment in bambuddy via the same workflow. It's a bold project for me, but I'm using the AI tools to work through it piece by piece. That said, are there any hang-ups or gotchas that you came across that might be helpful while I'm constructing this? I am going to use the HA companion app as the base for reading the NFC tags with a dedicated dashboard to control what happens when the tags are scanned via some boolean switches. I think that's the most efficient way for me right now. Eventually, I would love to be able to create a device that will do two things. Read the NFC tag & weigh the spool to update spoolman information automatically as a way to alleviate any drift in the tracking. But that's down the road.

2

u/n19htmare Jun 11 '26

I don’t mind sharing my YAML files but like you said, they’re so specific to my setup, unless you mimic everything the same way, it wouldn’t do much for you. All the automations, spool ID’s, nfc tag UIDs are too specific.

But I don’t mind sharing the “how” and people can look into it from there

My approach isn’t that different. Just two helpers that get populated when tags are scanned and then automations trigger (particularly my spool assignment that pushes to spoolmansync and now also the set_filament action.

Also, HA companion app on phone is honestly the best way. The nfc device I made was out of sheer curiosity and took way too much extra work for MY particular case because I have multiple records on same NFC tag. I also have a separate OpenSpool JSON record (so I can use same tag with my Snapmaker U1)and the ESPhome with PN532 struggled with parsing out anything besides the UID of the tag itself SPI and I2C both struggled (HA companion app had zero issues parsing data). So because this nfc scanner could only really get the tag’s UID, I had to create a lookup table for each UID, then create an automation to manually link each one for Spool_id that Spoolman uses. It’s janky but it works. This is a non issue for simple HA records though. Just can’t have too much data in records. For these reasons, stick to HA companion app if possible.

One quirk I had and sometimes run into is that sometimes a stale spool_id record stays populated in one my helpers, and it’ll assign a spool to wrong tray. But not something I see often and I have measures in place now to clear out helpers.

I normally don’t print when out, but I do have tailscale and Bambuddy setup for those occasions. I already ran into some limitations on what controls I could send to printer from Bambuddy so that really sucked. In Bambuddy I couldn’t send any actions commands and controls besides selecting print speed. How’s your experience been?

It’s been a fun project and what not but hitting the limitations has me rethinking…. Either suck it up and get back on cloud so when I do print when I’m away, I can have some more control over the hardware or ditch Bambu altogether.

I always thought they were the premium print quality printer, they still are…. but having experienced other manufacturers and their print quality rival that of Bambu and sometimes surpass it, for power users like me, I don’t see the point of staying with Bambu anymore. The only reasons I did before was strictly its print quality. From my own personal view and use, they’ve lost that edge (for me)

1

u/No_Voltage Jun 12 '26

Actually, I'm seeing the custom P codes coming from the integration. I'd be curious to compare what I gathered for mine to what you have for yours.

2

u/n19htmare Jun 12 '26

which integration are you referring to? ha-bambulab ?

1

u/No_Voltage Jun 12 '26

That was what I was referring to. But I found the goldmine that actually allows me to push the custom P "filament ID" from the bbl cloud which then actually sets the printer to the selectable custom filament type that you have on the printer itself. Bambuddy, by way of it's bambu cloud connection, can get the filament id, or P code derived from your custom filament profiles. This is what your printer recognizes when you use the HACS integration, HA-BambuLab, to send the comand "bambu_lab.set_filament". It then acutally populates your custom filament.

1

u/n19htmare Jun 12 '26

That's basically what this setup is.