Bambu Lab AMS Integration¶
Automatically push spool data from SpoolSense into your Bambu Lab AMS tray using Home Assistant.
When you scan a spool with SpoolSense and load it into an AMS tray, the blueprint sets the tray's filament type, color, and temperature settings — no manual entry needed.
Prerequisites¶
- Bambu printer set to LAN Only Mode with Developer Mode enabled (required for local MQTT access)
- SpoolSense scanner connected to Home Assistant via MQTT (setup guide)
- Bambu Lab Home Assistant integration installed and configured
- Bambu printer with AMS connected and visible in HA
Install the Blueprint¶
- In Home Assistant, go to Settings → Automations & Scenes → Blueprints
- Click Import Blueprint (bottom right)
-
Paste this URL:
https://github.com/SpoolSense/spoolsense_scanner/blob/main/homeassistant/blueprints/spoolsense_bambu_ams.yaml -
Click Preview then Import Blueprint
Create the Automation¶
- After importing, click Create Automation on the blueprint
-
Configure the inputs:
Input What to select SpoolSense Spool Sensor Your SpoolSense spool sensor (e.g., sensor.spoolsense_ecb338_spool)AMS Tray Sensors All AMS tray sensors you want to monitor (e.g., sensor.x1c_ams_1_tray_1throughtray_4)Scan-to-Load Timeout How long to wait after a scan for a tray load (default: 300 seconds) -
Click Save
How to Use¶
- Scan your spool's NFC tag on the SpoolSense scanner
- Load the filament into an AMS tray within 5 minutes (or your configured timeout)
- The blueprint automatically sets the tray's material, color, and nozzle temperatures
That's it. The AMS tray now knows what filament is loaded.
What Data Gets Set¶
| From SpoolSense | To Bambu AMS | Notes |
|---|---|---|
| Material type (PLA, PETG, etc.) | Tray filament type | Direct mapping |
| Color (hex RGB) | Tray color | Alpha channel added automatically |
| Min print temp | Nozzle temp min | Only set if tag has temp data |
| Max print temp | Nozzle temp max | Only set if tag has temp data |
Troubleshooting¶
Blueprint doesn't trigger after scanning
- Check that your SpoolSense sensor shows
presentin HA when you scan a tag - Verify MQTT is working: Developer Tools → States, search for your
sensor.spoolsense_*entity
AMS tray not detected
- Make sure you selected the correct tray sensor entities in the automation config
- The tray sensor's
emptyattribute must change fromtruetofalsewhen filament is loaded - Check your Bambu Lab integration is online: Settings → Devices → Bambu Lab
Material type not recognized by Bambu
- SpoolSense uses standard material names (PLA, PETG, ABS, ASA, TPU, PC, Nylon, PVA, HIPS)
- If your tag has a non-standard material name, the Bambu integration may reject it
- You can check what the tag reports at
http://spoolsense.local/reader
Timeout expired (nothing happened)
- The default timeout is 300 seconds (5 minutes) — you must load the filament within this window after scanning
- You must scan first, then load. Loading before scanning is not detected
- Increase the timeout in the automation settings if needed
Automatic Weight Deduction (Optional)¶
Track filament usage automatically — when a print finishes on your Bambu printer, the weight consumed is deducted from the spool in Spoolman.
Additional Prerequisites¶
- spoolman-homeassistant integration installed in HA
- Spools in Spoolman have the
nfc_idextra field set to their NFC tag UID
Create Input Text Helpers¶
The two blueprints share state through HA helpers. Create one pair of input_text helpers per AMS tray:
- Go to Settings → Devices & Services → Helpers → + Create Helper → Text
-
For each AMS tray, create two helpers:
AMS Tray Entity UID Helper Name Spoolman ID Helper Name sensor.p1s_ams_tray_1spoolsense_p1s_ams_tray_1_uidspoolsense_p1s_ams_tray_1_spoolman_idsensor.p1s_ams_tray_2spoolsense_p1s_ams_tray_2_uidspoolsense_p1s_ams_tray_2_spoolman_idsensor.p1s_ams_tray_3spoolsense_p1s_ams_tray_3_uidspoolsense_p1s_ams_tray_3_spoolman_idsensor.p1s_ams_tray_4spoolsense_p1s_ams_tray_4_uidspoolsense_p1s_ams_tray_4_spoolman_idReplace
p1swith your printer's entity prefix.
Install the Deduction Blueprint¶
- In Home Assistant, go to Settings → Automations & Scenes → Blueprints
- Click Import Blueprint
-
Paste this URL:
https://github.com/SpoolSense/spoolsense_scanner/blob/main/homeassistant/blueprints/spoolsense_bambu_deduction.yaml -
Click Preview then Import Blueprint
Create the Deduction Automation¶
- Click Create Automation on the blueprint
-
Configure:
Input What to select Bambu Printer Your Bambu printer device Print Weight Sensor Your print weight sensor (e.g., sensor.p1s_print_weight)AMS Tray Sensors Same tray sensors as the loading blueprint -
Click Save
How It Works¶
- You scan a spool and load it into an AMS tray (handled by the loading blueprint)
- The loading blueprint stores the spool's UID and Spoolman ID in the helpers
- You start a print
- When the print finishes (or is canceled), the deduction blueprint:
- Reads how many grams each tray consumed
- Looks up the Spoolman spool for each tray (by UID or Spoolman ID)
- Deducts the weight via
spoolman.use_spool_filament
- Spoolman now shows the updated remaining weight
Deduction Troubleshooting¶
Weight not deducted after print
- Check that the loading blueprint stored the UID: go to Developer Tools → States, search for
input_text.spoolsense_*_uid— it should show the tag UID - Check that the print weight sensor has per-tray attributes after a print: Developer Tools → States →
sensor.p1s_print_weight - Verify the spool exists in Spoolman with a matching
nfc_idextra field
Wrong amount deducted
- The deduction uses the weight reported by the Bambu printer, which is estimated from g-code metadata — not measured. Small variations are normal.
Multi-material prints
- Each tray's usage is deducted independently from its mapped spool. Multi-color and multi-material prints are supported.