Skip to content

Conversation

@Xento
Copy link
Collaborator

@Xento Xento commented Jan 3, 2026

PR #79 – Update

This pull request introduces a versioned REST API, improves filament/print UI output, and hardens logging around sensitive device identifiers. :contentReference[oaicite:0]{index=0}

✨ New Features

  • Versioned REST API: API routes are now served under a versioned prefix (/api/v1) to enable future evolution without breaking clients. :contentReference[oaicite:1]{index=1}
  • New REST endpoints for printer + AMS + spools
    • List printers: GET /api/v1/printers
    • Get AMS slots/trays for a printer: GET /api/v1/printers/<printer_id>/ams
    • List spools: GET /api/v1/spools
    • Assign a spool to a tray: POST /api/v1/printers/<printer_id>/ams/<tray_index>/assign
    • Unassign a tray: POST /api/v1/printers/<printer_id>/ams/<tray_index>/unassign

🛠 Improvements

  • Print history / filament UI: show used filament length in mm (incl. slicer metadata length where present), with improved tooltips for better readability.
  • Large number formatting for mm values (thousands separators) to make long prints easier to scan.
  • API spool serialization extended with weight_g (derived from spool initial weight or filament weight) for richer client-side display/logic.
  • Color mismatch signal quality: tray/spool color mismatch evaluation now includes a computed color distance (only for single-color spools) and carries mismatch details through the tray serialization.

🐛 Bugfixes

  • Filament mismatch logging correctness: fixes cases where mismatches were not logged or were logged incorrectly, improves update behavior when tray IDs collide/duplicate, and ensures the active spool is handled consistently.
  • Mismatch log location cleanup: mismatch log moved into the logs/ folder (e.g., logs/filament_mismatch.json) to keep state/artifacts in the expected place.
  • fixed spool assignment issue

🔒 Security / Privacy

  • Mask printer serial numbers in mqtt.log: MQTT payload logging now redacts serial/SN-like values before writing to disk.

@Xento Xento merged commit 0a48096 into drndos:main Jan 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant