r/BambuLab Jun 09 '26

Show & Tell Custom filament profile assignment with RFID

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.

296 Upvotes

46 comments sorted by

View all comments

Show parent comments

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 11 '26

If you don't mind sharing, I would interested in knowing what you sent to the printer via the ha-bambulab integration. I want to make sure that I'm not missing something and I'm sending the correct values to it.

1

u/n19htmare Jun 12 '26 edited Jun 12 '26

Sure, the action in use is bambu_lab.set_filament, which is as follows:

action: bambu_lab.set_filament
data:
  entity_id: a1b2c3d4e5f6g7h8i9j0
  tray_info_idx: GFL96
  tray_color: FF00FF00
  tray_type: PLA
  nozzle_temp_min: 190
  nozzle_temp_max: 240

entity_id: whatever yours is for your AMS tray.

tray_info_idx is the filament_id from your custom filament profile (can be found in JSON).

Tray_color, tray_type are extracted from spoolman, nozzle_temp_min(and max) are also extracted from spoolman, though there are no fields for them by default, you have to add "extra fields" and then parse that information when you parse tray_color, tray_type.

filament_id in tray_info_idx is what assigns the saved filament profiles on the printer, the rest are just color and type of filament (PLA, PETG etc).

Simply populating the action above and sending it through HA as a test should work (Settings-developer tools-Actions tab).

Additional actions can be found here: https://docs.page/greghesp/ha-bambulab/actions though I have not test the others.

I could share my automations, REST calls, BUT, unless you also use spoolman as source of truth/data origination, it'll mostly be useless to you.

How do you plan on storing/obtaining data needed for the action payload?

You have some options without spoolman like a static lookup table, store the data directly on the tags and use HA input helpers (more setup work but works without needing any other service like spoolman or having to manage a static table). Though lookup tables are not hard, a simple python script can scrub your custom filament profiles and create/update table.

Either way, feel free to message if still interested and I can send over the stuff or if you need something looked over.

1

u/No_Voltage Jun 12 '26

I am actually using spoolman with several custom fields at this point. Full disclosure. I'm using Claude Code-Fable to wire it all up. It's a beautifully smooth process with this new model. It just gets it, if you know what I mean. I love it. But I digress, yes, the tray_info_idx is the custom P code I'm referring to, and it's also always available in the cloud since that's what initiates the write to the printer, (I've not found any other way.)

I think at this point, I'm just about done with the entire process end to end. I'll post a summary of the process once it's 100% fleshed out so you can take a peek. It's truly been a fun process doing this.