github maziggy/bambuddy v0.2.1b2

6 hours ago

v0.2.1b2

Highlights

  • Background Print Dispatch — Printing from archives and file manager now runs in the background with real-time progress toasts, cancellable uploads, and per-printer queuing
  • Filament Cost Tracking — Per-spool costs with automatic calculation from usage history, archive cost aggregation, and a real-time cost preview in the print modal
  • Bulk Spool Addition & Stock Spools — Create up to 100 identical spools in one go; new "Quick Add" mode for inventorying filament without slicer profiles
  • AMS Slot Preset Fix (2 bugs) — Custom slicer presets (PFUS*) now pass through correctly to the printer instead of falling back to generic IDs; generic IDs are no longer "sticky"
  • Mid-Print Spool Runout Tracking — When the AMS auto-switches to a backup spool, usage is now split accurately across both spools using per-layer 3MF data
  • Developer LAN Mode Warning — Automatic detection and banner warning when connected printers lack Developer LAN Mode (required for MQTT write commands on newer firmware)

New Features

  • Background Print Dispatch (#408, #112) — FTP uploads and print-start commands are decoupled from API request latency. Real-time progress streamed via WebSocket with persistent toast UI, per-job progress bars, status badges, cancel button, and batch progress tracking. Contributed by @RyanEwen.
  • Filament Cost Tracking (#454, #452) — Per-spool cost_per_kg with automatic cost calculation from usage history. Archive costs aggregated from spool usage records. Global default_filament_cost fallback setting. Print modal shows real-time cost preview. Inventory table includes sortable cost/kg column. Recalculate-costs endpoint for retroactive updates. Contributed by @Keybored02 and @matteoP02.
  • Bulk Spool Addition & Stock Spools — Quick Add mode hides slicer preset/brand/subtype for rapid inventorying. Bulk create (1–100) via new POST /inventory/spools/bulk endpoint. Stock spools (no slicer_filament) shown with amber "Stock" badge and filterable on inventory page.
  • Include Beta Updates Setting — New toggle in Settings → Updates to opt in to beta/prerelease update notifications. Uses parse_version() prerelease detection instead of GitHub's prerelease flag.
  • Developer LAN Mode Detection & Warning Banner — Parses MQTT fun field bit 0x20000000 to detect developer mode status. Persistent orange warning banner with affected printer names and link to Bambu Lab's enable guide. State included in support bundle. New /printers/developer-mode-warnings polling endpoint.

Bug Fixes

  • Wrong AMS Unit Displayed With Dual AMS on P2S (#420) — P2S firmware sends local slot IDs (0-3) in tray_now, not global tray IDs. Now cross-references with MQTT mapping field to resolve the correct AMS unit.
  • PCTG Filament Misidentified as PC (#478) — Material parser matched "PC" before "PCTG" via substring matching. Reordered PCTG before PC, added PCTG to all material type arrays, and added exact-match temperature case.
  • Phantom Prints From Lingering SD Card Files (#477) — Three bugs fixed: retry loop always broke after first attempt, failed start_print() never cleaned uploaded files, and cleanup failures logged at DEBUG level.
  • Non-Actionable HMS Errors Triggering Notifications (#470) — Suppresses notifications for known non-actionable codes: MQTT auth failure, Cloud connection failure, and print cancelled by user.
  • Support Bundle Leaking Personal Data (#473) — Now queries DB for known sensitive values (printer names, serials, auth usernames, email) for exact-string replacement. Fixed serial number partial leak, Tasmota credential URL logging, and settings key filter gaps.
  • Spool Usage Lost When Spool Runs Empty Mid-Print (#459) — Snapshots spool assignments at print start. Tracks tray changes during printing via tray_change_log. Splits 3MF weight across trays using per-layer gcode data with linear fallback.
  • K-Profile Response Race Condition Crash (#462) — Classic TOCTOU race between MQTT callback thread and asyncio thread. Fixed by capturing event reference in a local variable.
  • Queue Stuck on "Busy" for "Any Model" Jobs (#435) — Queue API now uses OR logic to also return unassigned items whose target_model matches the printer's model. Backend resolves printer model server-side as fallback.
  • Queue "Any Model" Jobs Stuck in "Waiting" After Plate Clear (#435) — MQTT raw data AMS IDs are strings but were compared to integers without casting, crashing the AMS filament mapping.
  • SD Card Cleanup After Print Never Runs (#374) — Used wrong method (get_printer() returns PrinterInfo without ip_address/access_code). Replaced with DB query matching the pattern used elsewhere.
  • Finish Photo 404 for BambuStudio Prints (#474) — Empty file_path caused path resolution to go one directory level too high. Fixed path resolution in get_photo, upload_photo, and delete_photo.
  • Archive Endpoints Crash With "Is a directory" for BambuStudio Prints (#475) — Path("").exists() returns True for the base directory itself. Replaced .exists() with .is_file() across 16 locations.
  • AMS Slot Auto-Config Falls Back to Generic Instead of Spool's Preset (#479) — PFUS* IDs were blanket-rejected and generic IDs were "sticky". New priority: (1) spool's own slicer_filament, (2) reuse slot's non-generic ID for same material, (3) generic fallback.
  • ntfy Notifications Fail With "Illegal header value" (#466) — Multi-line messages contain newlines illegal in HTTP headers. Now escapes newlines. Also retries without image when server disables attachments.
  • Inventory Date Format Ignores Settings (#463) — Hardcoded en-GB locale replaced with shared formatDateInput() using the user's date format setting.
  • Inventory AMS-HT Slot Labels Show Garbled Characters (#463) — String.fromCharCode(65 + 128) produces accented characters. Now uses shared formatSlotLabel() utility.

Improved

  • Frontend Pre-Commit Hooks (#458) — Added tsc --noEmit and eslint . hooks triggered when frontend/src/**/*.{ts,tsx} files are staged.
  • External Materials/Brands for Spool Form (#455) — Allow materials and brands not in the built-in catalog when adding spools. Contributed by @Keybored02.
  • Energy Cost Precision (#416) — Increased energy cost decimal precision from 2 to 3 digits. Contributed by @wreuel.
  • Test Coverage — 14 dual-AMS tray_now integration tests, 9 slot mapping unit tests, 7 developer mode detection tests, 4 warning banner frontend tests, 13 bulk spool/stock tests, 8 tray change split tests, 6 usage tracker split tests, 7 spool assignment snapshot tests, 5 dispatch lifecycle tests, 2 FTP regression tests, 2 cost tracking tests, 2 frontend cost tests.

Community Contributors

Thank you to everyone who contributed to this release!

Don't miss a new bambuddy release

NewReleases is sending notifications on new releases.