Commit Graph
849 Commits
Author SHA1 Message Date
maziggy ff55e63caa Docker permissions fix:
- Add user directive to docker-compose.yml using PUID/PGID env vars
- Allows container to run as host user, fixing permission issues with
  bind-mounted volumes (e.g., ./virtual_printer)
- Add chmod 777 to /app/data and /app/logs in Dockerfile for non-root compatibility
- Usage: PUID=$(id -u) PGID=$(id -g) docker compose up -d

Note: Existing named volumes (bambuddy_logs, bambuddy_data) created by previous
root containers may need to be removed or have permissions fixed manually.
2026-02-05 11:33:05 +01:00
maziggy 2cac34795e Fix Safari camera stream failing with Service Worker error
Camera streams on macOS Safari were failing with "FetchEvent.respondWith
received an error: Load failed" because the Service Worker was intercepting
MJPEG streaming responses. Safari has known issues handling continuous
streaming responses through Service Workers.

- Add exclusion for /camera/stream and /camera/snapshot URLs in SW fetch handler
- Bump cache version to v24 to force SW update on clients

The camera components already have robust error handling with reconnect logic,
so bypassing the SW for these endpoints is safe and improves performance.
2026-02-05 11:05:46 +01:00
maziggy 964be0eb26 Improved Docker tests 2026-02-05 10:28:06 +01:00
maziggy 62804d764f Housekeeping 2026-02-05 09:17:39 +01:00
maziggy 861cc006d4 Changed issue templates 2026-02-05 09:05:25 +01:00
maziggy d950b48023 Only show plate detection popup to users with control permission
The plate detection alert popup (shown when objects are detected on
build plate and print is paused) was visible to all users. Now it
only shows to users who have the printers:control permission.

- Added hasPermission('printers:control') check before showing alert
- When auth disabled: all users see it (backward compatible)
- When auth enabled: only users with printers:control permission see it

Addresses #244
2026-02-05 08:21:55 +01:00
maziggy 379ba726e1 Fix A1/A1 Mini FTP upload EOFError (#271)
The FTP code called prot_p() (protected data channel) for all printers,
but for A1/A1 Mini it didn't wrap the data connection in SSL. This
mismatch caused an immediate EOFError - server expected encrypted data
but received plain data.

Fix:
- Use prot_c() (clear/unencrypted data channel) for A1/A1 Mini
- Use prot_p() (protected/encrypted data channel) for X1C/P1S/etc
- Removed non-functional ftplib._SSLSocket = None workaround

A1/A1 Mini: control channel encrypted (implicit TLS), data channel clear
X1C/P1S/etc: both channels encrypted with SSL session reuse

Closes #271
2026-02-05 08:13:13 +01:00
maziggy 00caf3ee1a Fix date format parsing for queue scheduling (#233)
Date input for scheduled prints was swapping month and day for European
users because:
1. EU format only accepted "/" separator, not "." which is common in
   European locales (e.g., "5.2.2026" for Feb 5th)
2. System format fell back to new Date() which interprets ambiguous
   dates in US format

Changes:
- Added splitDateParts() helper to accept /, ., and - separators
- Updated parseDateInput() to use proper locale detection for system
  format instead of relying on Date constructor
- All explicit formats (us, eu, iso) now accept any of the three
  separators

Closes #233
2026-02-05 08:00:34 +01:00
maziggy f8ca38cd5b Fix API keys failing when authentication is enabled (#270)
When auth was enabled, API keys were not accepted by the permission
checking functions. Only JWT tokens were validated.

API keys are accepted via two methods:
- X-API-Key header with the key value
- Authorization: Bearer header (keys starting with "bb_" are treated
  as API keys, others as JWT tokens)

Closes #270
2026-02-05 07:52:39 +01:00
maziggy 819ab896bd Fix Python 3.10 compatibility (Issue #269)
Replace datetime.UTC with timezone.utc for Python 3.10 support.
datetime.UTC was added in Python 3.11, but requirements state 3.10+.

Closes #269
2026-02-05 07:46:22 +01:00
maziggy 87cf0e83e9 Fix H2D print commands and HMS notification issues
Issue #245: H2D Pro print errors (extrusion motor overloaded)
- H2D series requires integer format (0/1) for boolean fields
- Other printers (X1C, P1S, A1) require actual booleans (true/false)
- Added model detection to use correct format per printer type
- Affected fields: timelapse, bed_leveling, flow_cali, vibration_cali,
  layer_inspect, use_ams

Closes #245
2026-02-05 07:26:30 +01:00
maziggy 6890c16efd Fix HMS notification display and filtering for H2D
- Mask HMS error codes to 16 bits to fix malformed display
  (H2D sends code 0x2001B which displayed as "0C00_2001B" instead of "0C00_001B")
- Filter notifications to severity >= 2, skipping informational messages
  (H2D sends severity 1 camera status that isn't a real error)
2026-02-05 07:10:18 +01:00
maziggy 33d002e1af Fix P1S/P1P FTP upload failures
Removed P1S and P1P from SKIP_SESSION_REUSE_MODELS
- These printers use vsFTPd which requires SSL session reuse on data channel
- Only A1/A1 Mini should skip session reuse (they have issues with SSL on data channel)
- P1S/P1P were incorrectly added in commit 9969005, causing EOFError on FTP upload

Closes #266
2026-02-04 17:05:39 +01:00
maziggy a92db92a0c Issue #265 Summary:
- Problem: Skip objects icon (z-10) overlays the 3-dot menu dropdown (z-10)
  - Fix: Increased menu dropdown z-index from z-10 to z-20
  - File: frontend/src/pages/PrintersPage.tsx:1606

Closes #265
2026-02-04 17:00:26 +01:00
MartinNYHC b7520cdf66 Merge pull request #253 from sbcrumb/feature/pushover-image-attachments
Add camera image attachments to Pushover notifications
2026-02-04 16:27:20 +01:00
MartinNYHC 925cc13669 Merge branch '0.1.8b' into feature/pushover-image-attachments 2026-02-04 16:18:13 +01:00
maziggy 39f90616f3 Post work #2 PR #262 2026-02-04 16:12:57 +01:00
MartinNYHC a91a9eacbf Delete .github/workflows/codeql.yml 2026-02-04 16:07:37 +01:00
maziggy 6a35e945ce Post work PR #262 2026-02-04 15:54:34 +01:00
MartinNYHC 6420e9d7ad Merge pull request #262 from MisterBeardy/feature/updated_plate_view_v2
Feature/updated_plate_view_v2
2026-02-04 15:27:28 +01:00
MartinNYHC 2833270e29 Merge branch '0.1.8b' into feature/updated_plate_view_v2 2026-02-04 15:27:02 +01:00
SBCrumb 6aa7a560d8 Add camera image attachments to Pushover notifications 2026-02-04 09:21:59 -05:00
MisterBeardy 008fc702fa fixed lint error 2026-02-04 09:15:00 -05:00
maziggy 6577295cc2 Cleanup for PR #258 2026-02-04 14:58:38 +01:00
MartinNYHC 2526728223 Merge pull request #258 from cadtoolbox/cadtoolbox/248
Cadtoolbox - Issue# 248 Files Manager Print/Schedule Consistency with Archives
2026-02-04 14:53:15 +01:00
MartinNYHC cf286407fb Merge branch '0.1.8b' into cadtoolbox/248 2026-02-04 14:53:05 +01:00
maziggy bff7da2861 Updated all CodeQL actions to v4 2026-02-04 14:48:15 +01:00
maziggy 8bdd64e54d Fixed ruff errors 2026-02-04 14:47:15 +01:00
maziggy ab63fed637 Updated CI 2026-02-04 14:43:36 +01:00
MartinNYHC d0d520b64d Merge pull request #260 from karaktaka/fix/virtual_printer_proxy_error
Fix/virtual printer proxy error
2026-02-04 14:39:15 +01:00
MartinNYHC 31a8016c80 Merge branch '0.1.8b' into fix/virtual_printer_proxy_error 2026-02-04 14:38:53 +01:00
Dennis bf75cd2527 Remove unused import statement for sqlalchemy in main.py 2026-02-04 14:36:32 +01:00
Dennis 84f1347bd0 Reorder import statement for jwt in main.py 2026-02-04 14:36:32 +01:00
maziggy cf6f374fee Fix filament hover card overlapping navigation bar (#259)
The FilamentHoverCard positioning logic now accounts for the fixed 56px
header when calculating available space above the trigger element.

Previously, when hovering over AMS slots near the top of the page, the
hover card would appear above the slot but go behind the navigation bar.
Now it correctly detects there isn't enough usable space and flips to
show below the slot instead.

Closes #259
2026-02-04 14:26:16 +01:00
maziggy 85598346f7 Issue #257 Fix:
- Changed the 401 handling in request() to only clear the auth token when the error message indicates the token is actually invalid
- Previously: ANY 401 response cleared the token (could cause cascading failures)
- Now: Only clears on specific messages like "Token has expired", "Could not validate credentials", etc.
- "Authentication required" (which might be a timing issue) no longer clears the token

Closes #257
2026-02-04 14:20:12 +01:00
maziggy 4910bce0b2 Fixed auth header for tasmota discovery 2026-02-04 14:10:11 +01:00
maziggy 3571cd1a42 Fix AMS auto-matching when multiple trays have same tray_info_idx
The tray_info_idx field is a filament TYPE identifier (e.g., "GFA00" for
generic PLA), not unique per spool. When multiple AMS trays are loaded
with the same filament type, the previous code used find() which always
returned the first match regardless of color.

Now checks if tray_info_idx is unique among available trays:
- If unique: use that tray as definitive match (existing behavior)
- If not unique: fall back to color matching among matching trays

Fixed in both backend (print_scheduler.py) and frontend (useFilamentMapping.ts).

Closes #245
2026-02-04 14:03:50 +01:00
maziggy 81d18cb8bd Virtual Printer Proxy Mode Improvements
- SSDP proxy for cross-network setups: select slicer network interface for automatic printer discovery via SSDP relay
- FTP proxy now listens on privileged port 990 (matching Bambu Studio expectations) instead of 9990
- For systemd: requires `AmbientCapabilities=CAP_NET_BIND_SERVICE` capability
- Automatic directory permission checking at startup with clear error messages for Docker/bare metal
2026-02-04 12:29:20 +01:00
Thomas Rambach 332e607f51 Merge pull request #10 from cadtoolbox/copilot/fix-schedule-button-visibility
Revert incorrect conditional visibility on grid view file card action buttons
2026-02-04 06:22:56 -05:00
copilot-swe-agent[bot]andcadtoolbox b9b5302bae Revert: Individual file card buttons should always be visible
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:14:09 +00:00
copilot-swe-agent[bot]andcadtoolbox 0d48aba520 Fix: Only show buttons for the selected file, not all files
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:07:24 +00:00
copilot-swe-agent[bot]andcadtoolbox 25affaf004 Fix: Show Print/Schedule buttons only when exactly 1 file is selected
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:06:21 +00:00
copilot-swe-agent[bot]andcadtoolbox c28fa602e5 Fix: Hide Print/Schedule buttons only when more than 1 file selected
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:05:12 +00:00
copilot-swe-agent[bot]andcadtoolbox 44443eafca Revert list view changes - keep per-file buttons visible
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:02:52 +00:00
copilot-swe-agent[bot]andcadtoolbox 91af6f25f4 Hide Print and Schedule buttons in individual file actions when files are selected
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 11:02:00 +00:00
copilot-swe-agent[bot] 39d57d5226 Initial plan 2026-02-04 10:55:43 +00:00
Thomas Rambach 13e8c6d27b Merge pull request #9 from cadtoolbox/copilot/hide-schedule-button-on-select 2026-02-04 05:47:50 -05:00
copilot-swe-agent[bot]andcadtoolbox 358394402c Hide Schedule button when more than 1 file selected and update tests
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
2026-02-04 10:32:56 +00:00
copilot-swe-agent[bot] c695d69c75 Initial plan 2026-02-04 10:28:56 +00:00
Thomas Rambach 32db62be64 Merge pull request #8 from cadtoolbox/copilot/hide-uploaded-by-column 2026-02-04 05:27:13 -05:00