[GH-ISSUE #839] [Bug Report] Spool weight not update after print complete #565

Closed
opened 2026-05-06 12:30:59 +02:00 by BreizhHardware · 13 comments

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

Originally assigned to: @maziggy on GitHub.

Spool weight not update after print complete

System Information
{
  "generated_at": "2026-03-28T12:04:28.089089",
  "app": {
    "version": "0.2.2.2",
    "debug_mode": false
  },
  "system": {
    "platform": "Linux",
    "platform_release": "5.15.147-14-a733",
    "platform_version": "#14 SMP PREEMPT Mon Jan 19 10:03:49 UTC 2026",
    "architecture": "aarch64",
    "python_version": "3.13.12"
  },
  "environment": {
    "docker": true,
    "data_dir": "/app/data",
    "log_dir": "/app/logs",
    "timezone": "Asia/Bangkok"
  },
  "database": {
    "archives_total": 17,
    "archives_completed": 0,
    "printers_total": 2,
    "filaments_total": 0,
    "projects_total": 0,
    "smart_plugs_total": 0
  },
  "printers": [
    {
      "index": 1,
      "model": "P1S",
      "nozzle_count": 1,
      "is_active": true,
      "mqtt_connected": true,
      "state": "FINISH",
      "firmware_version": "01.09.00.00",
      "wifi_signal": -50,
      "reachable": true,
      "ams_unit_count": 1,
      "ams_tray_count": 1,
      "has_vt_tray": true,
      "external_camera_configured": false,
      "plate_detection_enabled": false,
      "hms_error_count": 1,
      "developer_mode": null,
      "nozzle_rack_count": 0
    },
    {
      "index": 2,
      "model": "A1",
      "nozzle_count": 1,
      "is_active": true,
      "mqtt_connected": true,
      "state": "IDLE",
      "firmware_version": "01.07.02.00",
      "wifi_signal": -40,
      "reachable": true,
      "ams_unit_count": 1,
      "ams_tray_count": 0,
      "has_vt_tray": true,
      "external_camera_configured": false,
      "plate_detection_enabled": false,
      "hms_error_count": 1,
      "developer_mode": null,
      "nozzle_rack_count": 0
    }
  ],
  "settings": {
    "auth_enabled": "true",
    "setup_completed": "true",
    "auto_archive": "true",
    "save_thumbnails": "true",
    "capture_finish_photo": "true",
    "default_filament_cost": "180.0",
    "currency": "THB",
    "energy_cost_per_kwh": "6.0",
    "energy_tracking_mode": "total",
    "check_updates": "true",
    "check_printer_firmware": "true",
    "include_beta_updates": "false",
    "notification_language": "en",
    "bed_cooled_threshold": "35.0",
    "ams_humidity_good": "40",
    "ams_humidity_fair": "60",
    "ams_temp_good": "28.0",
    "ams_temp_fair": "35.0",
    "ams_history_retention_days": "30",
    "per_printer_mapping_expanded": "false",
    "date_format": "eu",
    "time_format": "24h",
    "default_printer_id": "None",
    "ftp_retry_enabled": "true",
    "ftp_retry_count": "3",
    "ftp_retry_delay": "2",
    "ftp_timeout": "30",
    "mqtt_enabled": "false",
    "mqtt_broker": "",
    "mqtt_port": "1883",
    "mqtt_topic_prefix": "bambuddy",
    "mqtt_use_tls": "false",
    "ha_enabled": "false",
    "library_archive_mode": "never",
    "library_disk_warning_gb": "5.0",
    "camera_view_mode": "embedded",
    "preferred_slicer": "bambu_studio",
    "prometheus_enabled": "false",
    "dark_accent": "green",
    "dark_style": "classic",
    "dark_background": "oled",
    "advanced_auth_enabled": "false",
    "smtp_auth_enabled": "true",
    "debug_logging_enabled": "false",
    "debug_logging_enabled_at": ""
  },
  "docker": {
    "container_memory_limit_bytes": null,
    "container_memory_limit_formatted": null,
    "network_mode_hint": "host"
  },
  "virtual_printers": [
    {
      "index": 1,
      "enabled": true,
      "mode": "immediate",
      "model": "C12",
      "model_name": "P1S",
      "has_target_printer": true,
      "has_bind_ip": true,
      "running": true,
      "pending_files": 0
    },
    {
      "index": 2,
      "enabled": false,
      "mode": "immediate",
      "model": "N2S",
      "model_name": "A1",
      "has_target_printer": false,
      "has_bind_ip": true,
      "running": false,
      "pending_files": 0
    }
  ],
  "integrations": {
    "notification_providers": [
      {
        "type": "telegram",
        "enabled": true,
        "has_last_error": false
      }
    ],
    "spoolman": {
      "enabled": false,
      "reachable": false
    },
    "mqtt_relay": {
      "enabled": false,
      "connected": false,
      "broker": "",
      "port": 0,
      "topic_prefix": "bambuddy"
    },
    "homeassistant": {
      "enabled": false
    }
  },
  "database_health": {
    "journal_mode": "wal",
    "quick_check": "ok",
    "db_size_bytes": 1208320,
    "wal_size_bytes": 4140632
  },
  "dependencies": {
    "fastapi": "0.135.2",
    "uvicorn": "0.42.0",
    "pydantic": "2.12.5",
    "sqlalchemy": "2.0.48",
    "paho-mqtt": "2.1.0",
    "psutil": "7.2.2",
    "httpx": "0.28.1",
    "aiofiles": "25.1.0",
    "cryptography": "46.0.6",
    "opencv-python-headless": "4.13.0.92",
    "numpy": "2.4.3"
  },
  "log_file": {
    "size_bytes": 1743360,
    "size_formatted": "1.7 MB"
  },
  "network": {
    "interface_count": 1,
    "interfaces": [
      {
        "name": "wlan0",
        "subnet": "x.x.1.0/24"
      }
    ]
  },
  "websockets": {
    "active_connections": 1
  }
}

Logs (sanitized): bambuddy.log


Submitted via BamBuddy Bug Report

Originally created by @maziggy on GitHub (Mar 28, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/839 Originally assigned to: @maziggy on GitHub. Spool weight not update after print complete <details> <summary>System Information</summary> ```json { "generated_at": "2026-03-28T12:04:28.089089", "app": { "version": "0.2.2.2", "debug_mode": false }, "system": { "platform": "Linux", "platform_release": "5.15.147-14-a733", "platform_version": "#14 SMP PREEMPT Mon Jan 19 10:03:49 UTC 2026", "architecture": "aarch64", "python_version": "3.13.12" }, "environment": { "docker": true, "data_dir": "/app/data", "log_dir": "/app/logs", "timezone": "Asia/Bangkok" }, "database": { "archives_total": 17, "archives_completed": 0, "printers_total": 2, "filaments_total": 0, "projects_total": 0, "smart_plugs_total": 0 }, "printers": [ { "index": 1, "model": "P1S", "nozzle_count": 1, "is_active": true, "mqtt_connected": true, "state": "FINISH", "firmware_version": "01.09.00.00", "wifi_signal": -50, "reachable": true, "ams_unit_count": 1, "ams_tray_count": 1, "has_vt_tray": true, "external_camera_configured": false, "plate_detection_enabled": false, "hms_error_count": 1, "developer_mode": null, "nozzle_rack_count": 0 }, { "index": 2, "model": "A1", "nozzle_count": 1, "is_active": true, "mqtt_connected": true, "state": "IDLE", "firmware_version": "01.07.02.00", "wifi_signal": -40, "reachable": true, "ams_unit_count": 1, "ams_tray_count": 0, "has_vt_tray": true, "external_camera_configured": false, "plate_detection_enabled": false, "hms_error_count": 1, "developer_mode": null, "nozzle_rack_count": 0 } ], "settings": { "auth_enabled": "true", "setup_completed": "true", "auto_archive": "true", "save_thumbnails": "true", "capture_finish_photo": "true", "default_filament_cost": "180.0", "currency": "THB", "energy_cost_per_kwh": "6.0", "energy_tracking_mode": "total", "check_updates": "true", "check_printer_firmware": "true", "include_beta_updates": "false", "notification_language": "en", "bed_cooled_threshold": "35.0", "ams_humidity_good": "40", "ams_humidity_fair": "60", "ams_temp_good": "28.0", "ams_temp_fair": "35.0", "ams_history_retention_days": "30", "per_printer_mapping_expanded": "false", "date_format": "eu", "time_format": "24h", "default_printer_id": "None", "ftp_retry_enabled": "true", "ftp_retry_count": "3", "ftp_retry_delay": "2", "ftp_timeout": "30", "mqtt_enabled": "false", "mqtt_broker": "", "mqtt_port": "1883", "mqtt_topic_prefix": "bambuddy", "mqtt_use_tls": "false", "ha_enabled": "false", "library_archive_mode": "never", "library_disk_warning_gb": "5.0", "camera_view_mode": "embedded", "preferred_slicer": "bambu_studio", "prometheus_enabled": "false", "dark_accent": "green", "dark_style": "classic", "dark_background": "oled", "advanced_auth_enabled": "false", "smtp_auth_enabled": "true", "debug_logging_enabled": "false", "debug_logging_enabled_at": "" }, "docker": { "container_memory_limit_bytes": null, "container_memory_limit_formatted": null, "network_mode_hint": "host" }, "virtual_printers": [ { "index": 1, "enabled": true, "mode": "immediate", "model": "C12", "model_name": "P1S", "has_target_printer": true, "has_bind_ip": true, "running": true, "pending_files": 0 }, { "index": 2, "enabled": false, "mode": "immediate", "model": "N2S", "model_name": "A1", "has_target_printer": false, "has_bind_ip": true, "running": false, "pending_files": 0 } ], "integrations": { "notification_providers": [ { "type": "telegram", "enabled": true, "has_last_error": false } ], "spoolman": { "enabled": false, "reachable": false }, "mqtt_relay": { "enabled": false, "connected": false, "broker": "", "port": 0, "topic_prefix": "bambuddy" }, "homeassistant": { "enabled": false } }, "database_health": { "journal_mode": "wal", "quick_check": "ok", "db_size_bytes": 1208320, "wal_size_bytes": 4140632 }, "dependencies": { "fastapi": "0.135.2", "uvicorn": "0.42.0", "pydantic": "2.12.5", "sqlalchemy": "2.0.48", "paho-mqtt": "2.1.0", "psutil": "7.2.2", "httpx": "0.28.1", "aiofiles": "25.1.0", "cryptography": "46.0.6", "opencv-python-headless": "4.13.0.92", "numpy": "2.4.3" }, "log_file": { "size_bytes": 1743360, "size_formatted": "1.7 MB" }, "network": { "interface_count": 1, "interfaces": [ { "name": "wlan0", "subnet": "x.x.1.0/24" } ] }, "websockets": { "active_connections": 1 } } ``` </details> **Logs (sanitized):** [bambuddy.log](https://raw.githubusercontent.com/maziggy/bambuddy/bug-report-assets/logs/d30558d99117481b89cd439f25584c9a.log) --- *Submitted via BamBuddy Bug Report*
BreizhHardware 2026-05-06 12:30:59 +02:00
Author
Owner

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

Please explain your issue properly. "It's not working" is not an issue description.

<!-- gh-comment-id:4147535154 --> @maziggy commented on GitHub (Mar 28, 2026): Please explain your issue properly. "It's not working" is not an issue description.
Author
Owner

@mengxyz commented on GitHub (Mar 28, 2026):

After enable Auto-archive completed prints spool tracking worked now.

<!-- gh-comment-id:4147883864 --> @mengxyz commented on GitHub (Mar 28, 2026): After enable Auto-archive completed prints spool tracking worked now.
Author
Owner

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

Good point, filament usage tracking should work independant from this feature. Let me check....

<!-- gh-comment-id:4147889616 --> @maziggy commented on GitHub (Mar 28, 2026): Good point, filament usage tracking should work independant from this feature. Let me check....
Author
Owner

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

Available/Fixed in branch dev and available with the next release or daily build.


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

<!-- gh-comment-id:4147898300 --> @maziggy commented on GitHub (Mar 28, 2026): Available/Fixed in branch dev and available with the next release or daily build. ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/bambuddy) — it helps others discover the project!
Author
Owner

@mengxyz commented on GitHub (Apr 4, 2026):

@maziggy I tested it on version 0.2.3b1.The problem has not yet been solved.

<!-- gh-comment-id:4187915552 --> @mengxyz commented on GitHub (Apr 4, 2026): @maziggy I tested it on version 0.2.3b1.The problem has not yet been solved.
Author
Owner

@mengxyz commented on GitHub (Apr 4, 2026):

I've noticed the notifications are different. If weight is being tracked, it's reported after printing and taking a picture. If not, it doesn't show up. (Unknown)

Print Completed
P1S: xxx
Time: 2h 16m
Filament: 54.5g

Print Completed
P1S: xxx
Time: Unknown
Filament: Unknowng

<!-- gh-comment-id:4187924539 --> @mengxyz commented on GitHub (Apr 4, 2026): I've noticed the notifications are different. If weight is being tracked, it's reported after printing and taking a picture. If not, it doesn't show up. (Unknown) Print Completed P1S: xxx Time: 2h 16m Filament: 54.5g Print Completed P1S: xxx Time: Unknown Filament: Unknowng
Author
Owner

@maziggy commented on GitHub (Apr 5, 2026):

This turned out to be multiple issues compounding:

  1. FTP download failure → no 3MF tracking — When the 3MF file can't be downloaded from the printer (common on P1S), a fallback archive is created without the file. The primary usage tracking path (which reads filament weights from the 3MF) was skipped entirely because there was no file to read. Now Bambuddy will try to find the same 3MF from the file library or a previous print of the same file before giving up.

  2. External spool (VT tray) never tracked by the fallback — The AMS remain% fallback (used when 3MF tracking isn't available) only looked at AMS unit trays. If you're printing from the external spool holder, the remain% delta was never captured or tracked. Now both AMS and external trays are tracked.

  3. Notifications showing "Unknown" — Even when usage was tracked successfully, the notification still showed "Time: Unknown" and "Filament: Unknown" because the notification builder read from the archive record (which had no 3MF data) instead of using the usage tracker results. Now notifications are enriched with whatever tracking data is available, and fallback archives capture estimated print time from MQTT.

Available/Fixed in branch dev and available with the next release or daily build.

Please let me know if it works for you now.


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

<!-- gh-comment-id:4188493869 --> @maziggy commented on GitHub (Apr 5, 2026): This turned out to be multiple issues compounding: 1. FTP download failure → no 3MF tracking — When the 3MF file can't be downloaded from the printer (common on P1S), a fallback archive is created without the file. The primary usage tracking path (which reads filament weights from the 3MF) was skipped entirely because there was no file to read. Now Bambuddy will try to find the same 3MF from the file library or a previous print of the same file before giving up. 2. External spool (VT tray) never tracked by the fallback — The AMS remain% fallback (used when 3MF tracking isn't available) only looked at AMS unit trays. If you're printing from the external spool holder, the remain% delta was never captured or tracked. Now both AMS and external trays are tracked. 3. Notifications showing "Unknown" — Even when usage was tracked successfully, the notification still showed "Time: Unknown" and "Filament: Unknown" because the notification builder read from the archive record (which had no 3MF data) instead of using the usage tracker results. Now notifications are enriched with whatever tracking data is available, and fallback archives capture estimated print time from MQTT. Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you now. ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/bambuddy) — it helps others discover the project!
Author
Owner

@mengxyz commented on GitHub (Apr 5, 2026):

bambuddy-support-20260405-201940.zip

i tested in dev branch.
The problem persists.
i added log fist print without Auto-archive completed prints enable start at 2026-04-05 19:16.xx
second print with Auto-archive completed prints enabled start at 2026-04-05 20:04.xx

<!-- gh-comment-id:4188900766 --> @mengxyz commented on GitHub (Apr 5, 2026): [bambuddy-support-20260405-201940.zip](https://github.com/user-attachments/files/26488523/bambuddy-support-20260405-201940.zip) i tested in dev branch. The problem persists. i added log fist print without Auto-archive completed prints enable start at 2026-04-05 19:16.xx second print with Auto-archive completed prints enabled start at 2026-04-05 20:04.xx
Author
Owner

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

The root cause: when auto-archive is disabled, no archive is created at print start, so at print completion there's no archive_id to look up the 3MF slicer data. The fix now:

  • Searches library files and previous archives by filename to find the 3MF even without an archive
  • Captures the AMS slot-to-tray mapping at print start so it's available at completion regardless of archive state

This means spool weight tracking will work whether auto-archive is on or off, as long as the 3MF exists somewhere (library, or a previous print of the same file).

Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you now.

<!-- gh-comment-id:4196999323 --> @maziggy commented on GitHub (Apr 7, 2026): The root cause: when auto-archive is disabled, no archive is created at print start, so at print completion there's no archive_id to look up the 3MF slicer data. The fix now: - Searches library files and previous archives by filename to find the 3MF even without an archive - Captures the AMS slot-to-tray mapping at print start so it's available at completion regardless of archive state This means spool weight tracking will work whether auto-archive is on or off, as long as the 3MF exists somewhere (library, or a previous print of the same file). Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you now.
Author
Owner

@mengxyz commented on GitHub (Apr 8, 2026):

bambuddy-support-20260408-114244.zip

i test on dev branch problem still persists.

print with auto archive disabled complete 2026-04-08 05:51

print with auto archive enabled complete 2026-04-08 11:40

<!-- gh-comment-id:4203925727 --> @mengxyz commented on GitHub (Apr 8, 2026): [bambuddy-support-20260408-114244.zip](https://github.com/user-attachments/files/26558582/bambuddy-support-20260408-114244.zip) i test on dev branch problem still persists. print with auto archive disabled complete 2026-04-08 05:51 print with auto archive enabled complete 2026-04-08 11:40
Author
Owner

@maziggy commented on GitHub (Apr 8, 2026):

Well...I think I've finally found the problem. Please pull dev branch and try again.

<!-- gh-comment-id:4204225072 --> @maziggy commented on GitHub (Apr 8, 2026): Well...I think I've finally found the problem. Please pull dev branch and try again.
Author
Owner

@mengxyz commented on GitHub (Apr 8, 2026):

Thank you, I've tested it works.

<!-- gh-comment-id:4209656288 --> @mengxyz commented on GitHub (Apr 8, 2026): Thank you, I've tested it works.
Author
Owner

@maziggy commented on GitHub (Apr 9, 2026):


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

<!-- gh-comment-id:4211895377 --> @maziggy commented on GitHub (Apr 9, 2026): ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/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#565
No description provided.