1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #565] [Feature]: Spoolman weight tracking for third-party (non-RFID) spools via gcode filament usage data #372

Closed
opened 2026-05-07 00:09:23 +02:00 by BreizhHardware · 3 comments

Originally created by @serkan887 on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/565

Originally assigned to: @maziggy on GitHub.

Problem or Use Case

I'm always frustrated when Spoolman's remaining weight never updates for third-party spools after a print completes. Since I use only non-Bambu-Lab filaments (no RFID chips), the weight tracking in Spoolman is completely non-functional for my setup.

Bambuddy operates as a proxy between Orca Slicer and the printer, so it already intercepts the gcode before forwarding it. The sliced gcode contains exact filament usage data:

; filament used [g] = 45.14
; filament used [mm] = 15140.2

This data is available per-filament index for multi-color prints as well. However, Bambuddy currently skips all weight sync for non-RFID spools, even when they are manually linked to Spoolman.

I also confirmed via direct MQTT monitoring that the P1S does not broadcast per-slot filament consumption in grams after a print — so the only reliable source for this data is the gcode that passes through Bambuddy's proxy.

Additionally, the "Link to Spoolman" hover option does not appear for non-RFID AMS slots when Spoolman mode is active (tested on v0.2.1b3), making manual linking impossible.

Proposed Solution

Ideally, one of the following approaches:

  1. (Best) When a print job passes through the proxy, parse the gcode for filament usage comments, match each filament index to its AMS slot and linked Spoolman spool, and call POST /api/v1/spool/{id}/use after the print finishes (gcode_state = FINISH). For cancelled prints, estimate usage from mc_percent at cancellation time.

  2. (Also great) Expose a local HTTP endpoint such as GET /api/print/last that returns per-slot filament usage from the last print job. This would allow third-party tools to poll it and update Spoolman independently without requiring changes to Bambuddy's core integration.

  3. (Minimum) Fix the "Link to Spoolman" UI so it appears for non-RFID slots when Spoolman mode is active.

For context: I built a self-hosted tool (FilamentAssigner) that handles AMS slot assignment via MQTT and syncs location data to Spoolman. If option 2 were available, I could integrate weight tracking into that tool directly and call Spoolman's API from there. Happy to contribute or test if needed.

Alternatives Considered

I've tried enabling Spoolman sync in Bambuddy and manually linking spools, but the "Link to Spoolman" option does not appear for non-RFID slots when Spoolman mode is active. I also monitored the printer's MQTT stream directly and confirmed that the P1S does not broadcast per-slot filament consumption in grams — so there is no way to get this data without parsing the gcode that passes through Bambuddy's proxy.

As a workaround, I built a separate tool (FilamentAssigner) that handles AMS slot assignment via MQTT and updates Spoolman location data. But weight tracking remains impossible without access to the gcode filament usage data that Bambuddy already has.

Feature Category

Spoolman Integration

Priority

Critical for my use case

Mockups or Examples

Confirmed via MQTT monitoring — P1S FINISH message contains no gram data:
{"gcode_state": "FINISH", "mc_percent": 100, "mc_remaining_time": 0, "mc_print_stage": "1"}

But Orca gcode (intercepted by Bambuddy proxy) contains:
; filament used [g] = 45.14
; filament used [mm] = 15140.2

Contribution

  • I would be willing to help implement this feature

Checklist

  • I have searched existing issues to ensure this feature hasn't already been requested
Originally created by @serkan887 on GitHub (Mar 1, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/565 Originally assigned to: @maziggy on GitHub. ### Problem or Use Case I'm always frustrated when Spoolman's remaining weight never updates for third-party spools after a print completes. Since I use only non-Bambu-Lab filaments (no RFID chips), the weight tracking in Spoolman is completely non-functional for my setup. Bambuddy operates as a proxy between Orca Slicer and the printer, so it already intercepts the gcode before forwarding it. The sliced gcode contains exact filament usage data: ; filament used [g] = 45.14 ; filament used [mm] = 15140.2 This data is available per-filament index for multi-color prints as well. However, Bambuddy currently skips all weight sync for non-RFID spools, even when they are manually linked to Spoolman. I also confirmed via direct MQTT monitoring that the P1S does not broadcast per-slot filament consumption in grams after a print — so the only reliable source for this data is the gcode that passes through Bambuddy's proxy. Additionally, the "Link to Spoolman" hover option does not appear for non-RFID AMS slots when Spoolman mode is active (tested on v0.2.1b3), making manual linking impossible. ### Proposed Solution Ideally, one of the following approaches: 1. (Best) When a print job passes through the proxy, parse the gcode for filament usage comments, match each filament index to its AMS slot and linked Spoolman spool, and call POST /api/v1/spool/{id}/use after the print finishes (gcode_state = FINISH). For cancelled prints, estimate usage from mc_percent at cancellation time. 2. (Also great) Expose a local HTTP endpoint such as GET /api/print/last that returns per-slot filament usage from the last print job. This would allow third-party tools to poll it and update Spoolman independently without requiring changes to Bambuddy's core integration. 3. (Minimum) Fix the "Link to Spoolman" UI so it appears for non-RFID slots when Spoolman mode is active. For context: I built a self-hosted tool (FilamentAssigner) that handles AMS slot assignment via MQTT and syncs location data to Spoolman. If option 2 were available, I could integrate weight tracking into that tool directly and call Spoolman's API from there. Happy to contribute or test if needed. ### Alternatives Considered I've tried enabling Spoolman sync in Bambuddy and manually linking spools, but the "Link to Spoolman" option does not appear for non-RFID slots when Spoolman mode is active. I also monitored the printer's MQTT stream directly and confirmed that the P1S does not broadcast per-slot filament consumption in grams — so there is no way to get this data without parsing the gcode that passes through Bambuddy's proxy. As a workaround, I built a separate tool (FilamentAssigner) that handles AMS slot assignment via MQTT and updates Spoolman location data. But weight tracking remains impossible without access to the gcode filament usage data that Bambuddy already has. ### Feature Category Spoolman Integration ### Priority Critical for my use case ### Mockups or Examples Confirmed via MQTT monitoring — P1S FINISH message contains no gram data: {"gcode_state": "FINISH", "mc_percent": 100, "mc_remaining_time": 0, "mc_print_stage": "1"} But Orca gcode (intercepted by Bambuddy proxy) contains: ; filament used [g] = 45.14 ; filament used [mm] = 15140.2 ### Contribution - [x] I would be willing to help implement this feature ### Checklist - [x] I have searched existing issues to ensure this feature hasn't already been requested
BreizhHardware 2026-05-07 00:09:23 +02:00
Author
Owner

@maziggy commented on GitHub (Mar 6, 2026):

If you are using the internal inventory, you can link non BL spools to spools in inventory. Also filament usage tracking is working with the internal invemtory.

<!-- gh-comment-id:4010909540 --> @maziggy commented on GitHub (Mar 6, 2026): If you are using the internal inventory, you can link non BL spools to spools in inventory. Also filament usage tracking is working with the internal invemtory.
Author
Owner

@serkan887 commented on GitHub (Mar 6, 2026):

it's work for me. Thanks man.

<!-- gh-comment-id:4013461505 --> @serkan887 commented on GitHub (Mar 6, 2026): it's work for me. Thanks man.
Author
Owner

@maziggy commented on GitHub (Mar 7, 2026):


If you find Bambuddy useful, please consider giving it a on GitHub — it helps others discover the project!

<!-- gh-comment-id:4015942129 --> @maziggy commented on GitHub (Mar 7, 2026): ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/bambuman/bambuddy) — it helps others discover the project!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#372
No description provided.