Commit Graph
1137 Commits
Author SHA1 Message Date
maziggy f9b47282a1 Nozzle-aware AMS mapping for dual-nozzle printers, BL spool detection fix, AMS startup fix, SQLite WAL (#318)
Dual-nozzle H2D/H2D Pro: filament matching now respects nozzle assignments
from the 3MF file. Each AMS unit feeds a specific nozzle (L/R), and the
scheduler/frontend constrain matching to only trays on the correct nozzle.
Falls back to unfiltered matching when no trays exist on the target nozzle.
L/R badges shown in the filament mapping UI. Translated in en/de/ja/it.

Fix AMS slot config overwritten on startup: on_ams_change unconditionally
unlinked BL spool assignments on every MQTT pushall, then re-assigned them
sending ams_filament_setting without setting_id — clearing the printer's
filament preset. Now compares spool RFID identifiers before unlinking.

Fix BL spool detection false positives: removed tray_info_idx from detection
logic in both backend is_bambu_lab_spool() and frontend isBambuLabSpool().
Third-party spools using Bambu generic presets had GF-prefixed tray_info_idx
values, causing misidentification. Now uses only tray_uuid and tag_uid.

SQLite WAL mode with 5s busy timeout reduces "database is locked" errors.
2026-02-13 11:48:32 +01:00
maziggy ee2af79f4a Add confirmation modal to skip objects (#346)
Prevent accidentally skipping the wrong object during a print by showing
a warning confirmation dialog with the object name and an irreversible
action warning. Uses the existing ConfirmModal component with warning
variant. Translations added for all 4 locales (en, de, ja, it).
2026-02-13 08:46:15 +01:00
MartinNYHC bd2f6c4133 Merge pull request #350 from sbcrumb/feature/discord-image-embeds
Add camera image embeds to Discord notifications
2026-02-13 08:16:04 +01:00
MartinNYHC 7fd1218205 Merge branch '0.2.0b' into feature/discord-image-embeds 2026-02-13 08:12:21 +01:00
MartinNYHC ac9bbc354a Merge pull request #348 from sbcrumb/fix/duplicate-error-notifications
Fix duplicate HMS error notifications from race condition
2026-02-13 08:11:28 +01:00
MartinNYHC c5246e60fc Merge branch '0.2.0b' into fix/duplicate-error-notifications 2026-02-13 08:07:44 +01:00
MartinNYHC 179a9de521 Merge pull request #328 from jeffsf/fixes/327
Shut down MQTT relay and smart plug services explicitly
2026-02-13 08:06:35 +01:00
MartinNYHC 7c36283665 Merge branch '0.2.0b' into fixes/327 2026-02-13 08:01:52 +01:00
maziggy e3f3c90c3d Sync 2026-02-13 07:53:14 +01:00
MartinNYHC 2af5289736 Merge branch '0.2.0b' into fixes/327 2026-02-13 06:42:50 +01:00
Jeff Kletsky c45568bc7e Shut down MQTT relay and smart plug services explicitly
Existing code did not allow the MQTT relay to be shut down gracefully.

Moved _client.loop_stop() after _client.disconnect() call to allow
Paho to be notified to disconnect and shut down without reconnecting.

Added _client._disconnection_event to help prevent a race condition where
a disconnection is requested but the loop is immediately stopped.
Modify _client.disconnect() to take a timeout parameter (default: 0).
Wait in that routine for the disconnection event with the given timeout.

Apply same logic to MQTTSmartPlugService and add to shutdown sequence.

Shutdown the MQTT relay last in lifespan() with a hard-coded 2 sec timeout.

The disconnect timeout is also available to printer MQTT clients.
It is left to the default of 0 at this time. If later enabled,
it should be a configuration parameters, especially for large farms.

Fixes: #327

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
2026-02-12 10:25:05 -08:00
maziggy a6f6df2e34 Sync fixes 2026-02-12 18:23:55 +01:00
SBCrumb a942fb5474 Add camera image embeds to Discord notifications
Attach printer camera snapshots to Discord webhook notifications using
multipart form-data with embed image references. Images are included
for print start, complete, progress milestones, and error events.
When no image is available, notifications send as text-only as before.
2026-02-12 12:02:47 -05:00
MartinNYHC 16de29c374 Merge pull request #349 from maziggy/feature/inventory
Feature/inventory
2026-02-12 16:40:43 +01:00
MartinNYHC 44df253c67 Merge branch '0.2.0b' into feature/inventory 2026-02-12 16:38:03 +01:00
MartinNYHC ab1b510f94 Merge pull request #347 from maziggy/maziggy-patch-3
Add requirement for spool without RFID tag
2026-02-12 16:31:57 +01:00
MartinNYHC 469a13519a Add requirement for spool without RFID tag
Added requirement for at least one spool without RFID tag.
2026-02-12 16:31:41 +01:00
MartinNYHC c0dad33517 Merge pull request #345 from maziggy/maziggy-patch-2
Update test case number format in issue reporting
2026-02-12 16:23:07 +01:00
MartinNYHC 1e96ea36f3 Update test case number format in issue reporting 2026-02-12 16:22:43 +01:00
maziggy a1f9ac1376 Added BETA_TEST_PLAN.md 2026-02-12 16:18:36 +01:00
maziggy 620ba5ff2a Added docker-publish-beta.sh 2026-02-12 16:01:05 +01:00
maziggy 1366076b31 Added docker-publish-beta.sh 2026-02-12 16:00:41 +01:00
maziggy e6e62f2a68 Add spool inventory: AMS slot assignment, usage tracking, and remaining weight editing
Built-in spool inventory with AMS slot assignment for non-BL spools,
automatic filament usage tracking via 3MF estimates, and remaining
weight editing in the spool form.

Inventory features:
- AMS slot assignment: assign/unassign manual spools to AMS tray slots
- Filter out Bambu Lab spools (RFID-managed) from assignment modal
- Filter out already-assigned spools (one spool per slot)
- Auto-unlink manual assignments when a BL spool is inserted
- Hide assign/unassign UI on BL-occupied slots
- Case-insensitive fingerprint matching for auto-unlink logic

Usage tracking:
- 3MF-based filament consumption tracking for non-BL spools
- Extract per-filament used_g from archived 3MF slice_info
- Map 3MF slot_id to AMS (ams_id, tray_id) positions
- Scale estimates by print progress for failed/aborted prints
- Skip BL spools (tracked via AMS remain% delta, Path 1)
- Prevent double-counting with handled_trays set

Other:
- Add remaining weight field to spool edit form
- Fix hardcoded "Empty" string in AssignSpoolModal (now i18n)
- Add backend unit tests for usage_tracker (11 tests)
- Add frontend tests for AssignSpoolModal filters (5 tests)
- Update CHANGELOG, README, wiki docs, and website
2026-02-12 15:42:27 +01:00
SBCrumb 107947495d Fix duplicate HMS error notifications from race condition
Move _notified_hms_errors tracking update before the async notification
send to prevent concurrent status callbacks from both seeing the same
errors as new. This mirrors the existing milestone tracking pattern
which correctly updates before the await.
2026-02-12 09:12:50 -05:00
maziggy b423283ec3 Fix queued jobs incorrectly skipped after duplicate execution detection (#341)
When the same file was queued multiple times from the archive, all jobs
after the first were automatically skipped with "already printed X hours
ago". The scheduler's 4-hour safety check compared the shared archive's
completed_at timestamp, incorrectly treating legitimate repeat prints as
phantom reprints from crash recovery. This also affected single queue
items created from recently completed archives.

Remove the check entirely — the crash scenario it guarded against is
already prevented by committing item.status="printing" before sending
the print command.
2026-02-12 12:04:41 +01:00
maziggy 1f0931e00c Sync 2026-02-12 11:54:50 +01:00
maziggy aa87e5598b Add clear plate confirmation between queued prints
The print scheduler previously treated FINISH/FAILED as idle states
and would auto-start the next queued print before the user cleared
the build plate. Now requires explicit user confirmation via a
"Clear Plate & Start Next" button on the printer card. Uses an
in-memory plate-cleared flag — no MQTT command needed since the
scheduler's start_print overrides the printer state.
2026-02-12 08:45:05 +01:00
maziggy 1b5683b3a3 Add "Open in new tab" toggle for external sidebar links (#338)
External links behind reverse proxies (Traefik, nginx) block iframe
embedding via X-Frame-Options/CSP headers. Add a per-link boolean
toggle so users can choose between iframe (default) and new-tab
behavior. Keyboard shortcuts also respect the setting.
2026-02-12 07:51:55 +01:00
maziggy 38a1d6f5e9 Fix Telegram bold title broken by underscores in message body (#332)
Underscores in job names or error codes caused parse_mode to be
disabled entirely, rendering *bold* markers as literal asterisks.
Now escapes underscores in the body with \_ so Markdown stays enabled.
2026-02-12 07:28:54 +01:00
maziggy 5787c61f34 Fix printer card cover image not updating between prints
The cover image URL was always /printers/{id}/cover regardless of the
active print, so the browser served its cached image. Now appends the
print name as a cache-busting query parameter and resets load state
when the print changes.
2026-02-12 07:25:22 +01:00
maziggy 13de96127e Fix file downloads showing generic filenames for special characters (#334)
Content-Disposition parser now handles RFC 5987 percent-encoded filenames
(filename*=utf-8''...) used by FastAPI for non-ASCII characters. Applied
to all 7 download endpoints.

Closes #334
2026-02-12 07:19:03 +01:00
maziggy 1ac487254d Add RUB (₽) currency option (#333)
Closes #333
2026-02-12 07:12:02 +01:00
maziggy ec82092bc7 Sync 2026-02-12 07:07:50 +01:00
maziggy 778d1966af Move email settings under Authentication tab in settings
Rename the "Users" settings tab to "Authentication" and move the
standalone "Global Email" tab into it as an "Email Authentication"
sub-tab. This groups email/SMTP configuration with user management
where it logically belongs.

- Remove top-level email tab from settings tab bar
- Add sub-tab navigation (Users / Email Authentication) inside the
  Authentication tab
- Handle legacy ?tab=email URLs by mapping to users tab + email sub-tab
- Update i18n keys in en/de/ja locales
2026-02-11 08:43:40 +01:00
MartinNYHC 4e75703018 Merge pull request #331 from bnap00/feature/currency-symbol-prefix
Implement currency symbol handling and update related components
2026-02-11 08:26:23 +01:00
maziggy 71560b7634 Merge origin/0.2.0b, resolve conflict keeping SUPPORTED_CURRENCIES.map() 2026-02-11 08:23:40 +01:00
maziggy 3c0c499524 Add 14 additional currency options (KRW, SEK, NOK, DKK, PLN, BRL, TWD, SGD, NZD, MXN, CZK, THB, ZAR, TRY) 2026-02-11 08:17:49 +01:00
Bharat Parsiya f5d9c4a1db Adjust padding for input fields to accommodate currency symbol length 2026-02-11 12:31:09 +05:30
maziggy 8e09e4fb65 Add additional currency options for cost tracking (#329)
Added HKD, INR, KRW, SEK, NOK, DKK, PLN, BRL, TWD, SGD, NZD, MXN,
CZK, THB, and ZAR to the currency dropdown in settings.
2026-02-11 07:51:20 +01:00
maziggy 253bee18a1 Fix nozzle rack text unreadable on light filament colors (#300)
Nozzle rack slots use the filament color as background, but light
colors (white, beige) made the white "0.4" text nearly invisible.
Added a luminance check to switch to dark text on light backgrounds
and removed the dark text shadow when not needed.
2026-02-11 07:38:57 +01:00
maziggy 0fe2bb1342 Fix timelapse baseline race condition (#315)
The snapshot-diff timelapse detection captured its baseline of existing
MP4 files at print completion time inside a background task. Fast-
encoding printers could finish writing the timelapse before the baseline
was taken, so the new file appeared in the baseline and was never
detected as "new" — resulting in no timelapse attached.

Move baseline capture to print start time, when the timelapse file
cannot possibly exist yet. The baseline is stored in a module-level dict
keyed by printer_id and popped at completion time. Falls back to
completion-time baseline if the app was restarted mid-print.
2026-02-11 07:33:07 +01:00
maziggy 09d8e7d682 Fix external camera not used for snapshot + stream dropping (#325)
The snapshot endpoint always used the internal printer camera even when
an external camera was configured. Now checks for external camera first,
matching the stream endpoint pattern. Also added retry logic (3 attempts,
2s delay) to MJPEG and RTSP stream generators so they reconnect on
timeout instead of silently ending the stream.
2026-02-11 07:09:39 +01:00
MartinNYHC 0e6f4cc694 Merge pull request #330 from jeffsf/fix/ext-cam-print-2026-02
Remove print() debugging from external_camera.py
2026-02-11 06:52:50 +01:00
MartinNYHC 8570e10f05 Merge branch '0.2.0b' into fix/ext-cam-print-2026-02 2026-02-11 06:52:34 +01:00
Bharat Parsiya ced51e06fb Implement currency symbol handling and update related components 2026-02-11 10:26:18 +05:30
Jeff Kletsky 40f4e60f04 Remove print() debugging from external_camera.py
There were several instances where print() debugging was used instead of
or in addition to formal logging. These messages were tagged `[EXT-CAM]`.

Where there was already a logging call, the print statement was removed.
Where there was not, logger.debug() was used as a replacement.

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
2026-02-10 18:55:05 -08:00
maziggy 905e609e19 Bumped version 2026-02-10 19:13:18 +01:00
maziggy edefce67fe Bumped version 2026-02-10 18:35:24 +01:00
MartinNYHC 38641e91e2 Merge pull request #326 from maziggy/0.1.9
v0.1.9
2026-02-10 18:32:06 +01:00
MartinNYHC e8b2deb54a Merge branch 'main' into 0.1.9 2026-02-10 18:29:35 +01:00