Commit Graph
100 Commits
Author SHA1 Message Date
maziggyandClaude Opus 4.5 ca2bd6bf57 Fix timelapse auto-download and browser tab crash on print completion
1. Timelapse auto-download rewrite (main.py)
   - New retry mechanism with short delays (5s, 10s, 20s)
   - Grabs most recent file directly without mtime comparison
   - Works with printers that have wrong clock (LAN-only mode)
   - Checks multiple paths: /timelapse, /timelapse/video, /record, /recording

2. Browser tab crash fix (PrintersPage.tsx)
   - Throttled query cache subscription using requestAnimationFrame
   - Prevents rapid re-render cascade on print completion events

3. WebSocket optimization (main.py)
   - Removed large raw_data field from print_complete message
   - Only sends necessary fields: status, filename, subtask_name, timelapse_was_active

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 08:46:38 +01:00
maziggy e85e5fa33e Backend changes:
1. bambu_mqtt.py: Added hms_errors to the completion callback data, which includes the HMS error codes when a print fails
  2. archive.py: Updated update_archive_status() to accept an optional failure_reason parameter
  3. main.py: Added auto-detection of failure reasons:
    - status == "aborted" → failure_reason = "User cancelled"
    - status == "failed" with HMS errors → maps module codes to reasons:
        - Module 0x07 (Filament) → "Filament runout"
      - Module 0x0C (Motion Controller) → "Layer shift"
      - Module 0x05 (Nozzle) → "Clogged nozzle"

  Frontend changes:

  1. ArchivesPage.tsx:
    - Badge now shows "cancelled" for aborted prints, "failed" for failed prints
    - "Failed Prints" collection and "Hide Failed" filter now include both failed and aborted statuses
  2. EditArchiveModal.tsx: Failure reason field now shows for both failed and aborted prints

  New tests added:
  - test_hms_errors_included_in_failed_completion_callback
  - test_aborted_status_when_cancelled

  The HMS error module mapping is basic and can be expanded as you observe more failure types. The actual Bambu HMS error codes are documented in their wiki - we can add
  more mappings as needed.
2025-12-13 10:13:54 +01:00
maziggy f5cec45dbf 1. Timelapse viewer default speed changed to 2x
- frontend/src/components/TimelapseViewer.tsx:17 - Changed from 0.5 to 2

  2. Archive page: hide failed prints filter with persistence
  - Added hideFailed state initialized from localStorage.getItem('archiveHideFailed')
  - Added localStorage persistence via useEffect
  - Added "Hide Failed" toggle button (red styling when active) next to the Favorites button
  - Filter is automatically bypassed when viewing the "Failed Prints" collection
  - "Reset" button also clears this filter

  The filter state persists across page refreshes and browser sessions via localStorage.
2025-12-13 10:04:15 +01:00
maziggy 80c39df7e9 Fixed bug in Dockerfile 2025-12-12 16:20:55 +01:00
maziggy 1a4f146dd0 Notifications:
- Separate AMS and AMS-HT notification switches (one per device type)
  - Fix notification variables not showing (duration, filament, estimated_time)
  - Add fallback values for empty notification variables ("Unknown" instead of blank)

  Settings:
  - Fix API keys badge count only showing after visiting tab
  - Move External Links card to third column above Updates
  - Add Release Notes modal for viewing full notes before updating

  Statistics:
  - Fix filament usage trends not showing (wrong API parameters)
  - Move dashboard controls (Hidden, Reset Layout) to header row
  - Remove duplicate Reset Layout button

  Camera:
  - Fix ffmpeg processes not killed when closing webcam window
  - Add /camera/stop endpoint with POST support for sendBeacon
  - Track active streams and proper cleanup on disconnect
2025-12-12 09:18:59 +01:00
maziggy 7048bafff3 Added anonymous stats 2025-12-11 13:35:59 +01:00
maziggy 77a66ea867 Added system info page 2025-12-11 12:45:38 +01:00
maziggy 5efb7ab2c8 Improved archive card context menu 2025-12-11 12:26:37 +01:00
maziggy ea6d84031a Removed PWA P´push notification 2025-12-11 11:37:13 +01:00
maziggy 2f1ac92598 Restored some files that were deleted by mistake 2025-12-11 11:15:25 +01:00
maziggy e392597192 Added notification module for AMS humidity and temperature 2025-12-10 20:02:22 +01:00
maziggy 0dc76746b4 Add AMS humidity/temperature history tracking with charts
- Add database model for storing AMS sensor history (humidity, temperature)
  - Record sensor data every 5 minutes via background task
  - Add API endpoint to retrieve history with min/max/avg statistics
  - Create AMSHistoryModal component with Recharts line charts
  - Make humidity/temperature indicators clickable to open history
  - Support time range selection (6h, 24h, 48h, 7d)
  - Show threshold reference lines on charts (Good/Fair levels)
  - Add configurable data retention (default 30 days) in Settings
  - Auto-cleanup old data daily
  - Fix dark theme styling in modal using inline styles
  - Add Escape key to close modal
2025-12-10 19:45:38 +01:00
maziggy ca2eb5d052 Added quick button to disable notification 2025-12-10 19:13:47 +01:00
maziggy d1518083fc ## New Features
### Projects / Print Grouping
  - Create projects to group related prints (e.g., "Voron Build" with 50 parts)
  - Track progress with target count and completion percentage
  - Assign archives to projects via edit modal or context menu
  - Project cards show archive thumbnails with clickable links
  - Color-coded project badges on archive cards
  - Filter and manage projects by status (active/completed/archived)

  ### Full-Text Search (FTS5)
  - SQLite FTS5 virtual table for efficient searching
  - Search across print_name, filename, tags, notes, designer, filament_type
  - Automatic index sync with triggers for INSERT/UPDATE/DELETE

  ### Webhooks & API Keys
  - API key authentication with granular permissions
  - Permissions: can_read_status, can_manage_queue, can_control_printer
  - Secure key generation with prefix display only after creation
  - Settings page API Keys tab for key management
  - Webhook endpoints for external integrations

  ### Failure Analysis
  - Dashboard widget showing failure rate with color coding
  - Correlate failures with conditions (filament type, printer, time)
  - Top failure reasons breakdown
  - Weekly trend visualization

  ### Archive Comparison
  - Select 2-5 archives to compare side-by-side
  - Highlight differences in print settings (yellow)
  - Success/failure correlation insights
  - Modal with close via button, X, Escape, or backdrop

  ### CSV/Excel Export
  - Export archives and statistics with current filters
  - Support for both CSV and Excel (.xlsx) formats
  - openpyxl dependency added

  ## Bug Fixes
  - Fixed context menu submenu not showing (removed overflow-hidden)
  - Fixed project card thumbnails using correct API endpoint
  - Fixed EditArchiveModal to invalidate projects query on save
  - Fixed clipboard API fallback for HTTP contexts
  - Fixed archive PATCH 500 error (FTS5 index rebuild)
  - Fixed FastAPI trailing slash routing for projects endpoint

  ## UI Improvements
  - Context menu submenu with hover/click support
  - Project badge on archive cards with project color
  - "Go to Project" context menu item for assigned archives
  - Clickable project card thumbnails linking to archives
  - Reset Layout button moved to Stats page header
2025-12-10 17:06:43 +00:00
maziggy 711140ddf9 Added mobile PWA support 2025-12-10 11:21:25 +00:00
maziggy f317ead3c6 Fixed bug where external links were not respected by hotkeys 2025-12-10 09:44:47 +00:00
maziggy ef927985e4 Added filament spool fill levels to printer card 2025-12-10 08:47:12 +00:00
maziggy 38cc31d64c Improved external link module 2025-12-09 13:35:41 +00:00
maziggy 9504f4fc59 Fixed layout for external link icons 2025-12-09 13:20:09 +00:00
maziggy 42cdfdbd74 * Add comprehensive mobile support with responsive navigation
- Add hamburger drawer navigation for mobile (< 768px)
  - Create useIsMobile hook for responsive breakpoint detection
  - Create useLongPress hook for touch gesture context menus
  - Update Button component with 44px min-height for WCAG touch compliance
  - Update Toggle component with larger mobile size (44x28px)
  - Add responsive padding (p-4 md:p-8) to all pages
  - Update ArchivesPage with mobile menu button and horizontal scroll filters
  - Update SettingsPage with stacked column layout on mobile
  - Increase drag handle sizes for touch-friendly reordering
  - Add CSS utilities for touch-manipulation and safe-area insets
2025-12-09 12:55:59 +00:00
maziggy 36b57bbafb - External links can now be embedded into sidebar navigation 2025-12-09 12:06:58 +00:00
maziggy ef829f8045 - Improved backup/restore module 2025-12-09 11:08:21 +00:00
maziggy cf972f42c1 - Improved backup/restore module 2025-12-09 11:04:48 +00:00
maziggy 3f9b7e0b7f - Improved backup/restore module 2025-12-09 10:55:54 +00:00
maziggy fb6ff3130e - Improved backup/restore module 2025-12-09 10:33:22 +00:00
maziggy 6d71261de7 Renaming app to Bambuddy 2025-12-09 08:55:59 +00:00
maziggy a0f0892ea0 * Added user options to backup module; Fixed HTTP 500 bug 2025-12-09 08:20:27 +00:00
maziggy ce18b38264 Fixed os.path issue in update module 2025-12-08 17:58:20 +00:00
maziggy 7ea923e0ce Redesign AMS section with BambuStudio-style device icons
- Add AMS4TrayIcon and AMS1TrayIcon SVG components with colored spool slots
  - Spool colors displayed inside device icon windows with gray overlay frames
  - Empty slots shown as white with diagonal strike (matching slicer style)
  - Fix AMS-HT nozzle mapping bug (HT-A was showing Left instead of Right)
  - Use actual ams.id for extruder map lookup before normalizing
2025-12-08 17:01:39 +00:00
maziggy c74f24353a - Added smart plug monitoring and scheduling
- Added daily digest to notification module
2025-12-08 16:30:53 +00:00
maziggy 29aadfb774 Added template system to notification module. 2025-12-08 15:23:17 +00:00
maziggy 1a17b547dc - Added maintenance interval type clendar days
- Minor improvements to maintenance module
2025-12-08 14:52:16 +00:00
maziggy 75776fe509 Added tabed design and auto-save to settings page. 2025-12-08 14:20:28 +00:00
maziggy 2867401116 Add Cloud Profiles template visibility and preset diff view
Cloud Profiles (ProfilesPage.tsx):
  - Add template visibility control (showInModal flag)
    - Eye/EyeOff toggle in templates modal to show/hide templates
    - Only templates with showInModal=true appear in preset modals
    - Default new templates to showInModal=true in save dialog
  - Add preset diff/compare view with two modes:
    - Compare button in edit modal (preset vs base)
    - Compare mode on main page (two-preset comparison)
    - Side-by-side diff with added/removed/changed highlighting
    - Stats showing added/removed/changed/same counts
    - Search filter and Changes/All toggle
    - Type restriction (only compare same preset types)
  - Fix array value display (show "value" instead of ["value"])
  - Fix printer preset G-code display (format escaped \n as real newlines)
  - Fix modal overflow issues with proper flex patterns
  - Fix light theme colors for compare selection text
2025-12-08 14:03:38 +00:00
maziggy e47ef36630 sync 2025-12-08 09:56:21 +00:00
maziggy 71e15b0ed7 Add AMS humidity/temperature indicators with configurable thresholds
- Add dynamic humidity indicator with Bambu Lab style water drop icons
    - Empty drop for good (dry), half-filled for fair, full for bad (wet)
    - Configurable thresholds via Settings page

  - Add dynamic temperature indicator with thermometer icons
    - Empty for good, half-filled for fair, full for hot
    - Colors match humidity: green/gold/red

  - Add AMS Display Thresholds settings card
    - Humidity thresholds (good/fair) configurable
    - Temperature thresholds (good/fair) configurable
    - Persisted in backend settings

  - Fix AMS card stability issues
    - Add ams_extruder_map to WebSocket broadcasts
    - Cache AMS data and extruder map to prevent bouncing
    - Fix L/R nozzle indicator for dual-nozzle H2 printers

  - Fix status summary bar counting
    - Don't count printers with unknown status as offline

  - Theme-aware L/R nozzle badges (light/dark theme support)
2025-12-07 14:56:52 +00:00
maziggy e688c35719 sync 2025-12-07 14:29:54 +00:00
maziggy 53e196c38f Added printer image to printer card 2025-12-07 11:38:30 +00:00
maziggy 577d9ff366 Added Wifi signal strength to printer card 2025-12-07 11:33:32 +00:00
maziggy cef6cd593b Added Wifi signal strength to printer card 2025-12-07 11:30:19 +00:00
maziggy 0c452a12e9 Fixed bug in MQTT debug viewer; Added filter and search for MQTT messages 2025-12-07 11:03:11 +00:00
maziggy 29327d0f16 Added power switch dropdown to printer card for offline printers 2025-12-07 10:42:41 +00:00
maziggy 06bfaa3c74 Completely removed control page and all it's related code 2025-12-07 10:19:25 +00:00
Martin Ziegler eb6d6e6ce5 Refactoring AMS module 2025-12-06 15:24:48 +01:00
Martin Ziegler e44bc318ac Refactoring AMS module 2025-12-05 16:00:56 +01:00
Martin Ziegler 8f3c36e920 Improvements AMS card 2025-12-05 15:20:09 +01:00
Martin Ziegler fc9f12d3f2 Improvements AMS card 2025-12-05 14:18:07 +01:00
Martin Ziegler 065f22a0e3 Replaced camera settings with wifi signal in top bar 2025-12-05 13:22:34 +01:00
Martin Ziegler f5e0395375 Wiring up AMS module 2025-12-05 13:09:27 +01:00
Martin Ziegler 720e1c459a Wiring up AMS module 2025-12-05 12:58:40 +01:00