mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-03 12:46:49 +02:00
Issue 1: Spool detection only checked tray_uuid/tag_uid, missing spools that have tray_info_idx (Bambu preset ID like "GFG02") but incomplete RFID data. Issue 2: Partial MQTT updates from printer could overwrite complete tray data, causing loss of tray_sub_brands, tray_id_name, and other fields. Backend changes (services/spoolman.py): - Add tray_info_idx to AMSTray dataclass - Parse tray_info_idx from raw MQTT data - Check tray_info_idx first in is_bambu_lab_spool() (GF* prefix) - Fall back to tray_uuid then tag_uid for identification - Add warning when Bambu spool detected but no unique ID for Spoolman Backend changes (api/routes/spoolman.py): - Pass tray_info_idx to is_bambu_lab_spool() in both sync endpoints - Guard against empty spool_tag when adding to tracking set Backend changes (services/bambu_mqtt.py): - Implement deep merge at tray level for AMS MQTT updates - Preserve existing tray fields unless new update has non-empty value - Numeric fields (remain, k, id, cali_idx) always update Frontend changes (pages/PrintersPage.tsx): - Add isBambuLabSpool() helper with same detection logic as backend - Check tray_info_idx (GF*), tray_uuid, and tag_uid - Update all 4 vendor detection locations in AMS cards