Commit Graph
614 Commits
Author SHA1 Message Date
MartinNYHC 0d3709ee9b Merge pull request #186 from maziggy/feature/176
Add script automation and visibility options (#176)
2026-01-31 14:44:19 +01:00
maziggyandClaude Opus 4.5 26728f268f Merge branch '0.1.6-final' into feature/176
Resolved conflicts:
- CHANGELOG.md: Kept both HA Script Support and STL Thumbnail features
- database.py: Kept both migration sets (UNIQUE constraint removal + queue columns)
- SmartPlugCard.tsx: Merged script UI support with base styling
- static/: Rebuilt frontend with merged changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:43:45 +01:00
maziggy 196b7a93e9 Added one-shot install scripts 2026-01-31 14:31:10 +01:00
maziggy 428f54a68d Fix Home Assistant smart plug auto-on for queued prints (Issue #200)
The print scheduler was hardcoded to use Tasmota service when powering
on printers for queued prints. Home Assistant plugs were not checked,
causing "Tasmota device not found" errors.

Changes:
- Make get_service_for_plug() public in smart_plug_manager
- Update print_scheduler to use smart_plug_manager.get_service_for_plug()
  instead of tasmota_service directly
- Fixes both _power_on_and_wait() and _power_off_if_needed() methods

Closes #200
2026-01-31 12:59:45 +01:00
maziggy 29bede21b8 Mobile layout fixes 2026-01-31 09:36:36 +01:00
maziggy 4c8f0fbeeb Housekeeping 2026-01-31 07:54:55 +01:00
maziggy 25043beafa Sync 2026-01-30 16:57:58 +01:00
MartinNYHC a1064d077c Merge pull request #196 from MisterBeardy/feature/stl_thumbnail
Feature/stl thumbnail
2026-01-30 16:46:43 +01:00
maziggy ed046a062b Merge 0.1.6-final into feature/stl_thumbnail 2026-01-30 16:38:14 +01:00
maziggy 7382ee1b20 Add frontend tests for STL thumbnails, update README and CHANGELOG
- Add 9 frontend tests for STL thumbnail generation
  - Update CHANGELOG with STL thumbnail feature details
  - Update README File Manager section

  Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 16:27:51 +01:00
maziggy fa84835876 Improve File Manager mobile responsiveness 2026-01-30 15:59:56 +01:00
MisterBeardy c291e3a0a8 feat: Add STL thumbnail generation functionality
- Implemented batch STL thumbnail generation API endpoint.
- Added Pydantic schemas for batch thumbnail requests and responses.
- Created service for generating thumbnails from STL files using trimesh and matplotlib.
- Updated file upload and ZIP extraction endpoints to include thumbnail generation option.
- Enhanced frontend to support STL thumbnail generation during file uploads and ZIP extractions.
- Added integration and unit tests for the new thumbnail generation features.
- Updated requirements to include necessary libraries for STL processing.
2026-01-30 09:37:30 -05:00
maziggy c937e6781b Improved docker tests 2026-01-30 13:54:20 +01:00
MartinNYHC 129ed5a29f Merge pull request #189 from maziggy/feature/printer_model_queue
Feature/printer model queue
2026-01-30 13:11:29 +01:00
MartinNYHC ba3ad1d2f1 Merge branch '0.1.6-final' into feature/printer_model_queue 2026-01-30 13:11:15 +01:00
maziggy 49acd8c148 Improved frontend tests 2026-01-30 13:02:57 +01:00
MartinNYHC 4639fdacd1 Merge pull request #191 from maziggy/fix/190
Fix Spoolman sync for transparent/natural filament spools
2026-01-30 12:37:57 +01:00
maziggy 5004d94388 Fix Spoolman sync for transparent/natural filament spools
Transparent spools (like Natural PLA Support) report color "00000000"
which was being skipped as invalid. Now these spools are synced with
a light cream color (F5E6D3) that represents how natural PLA looks.

Fixes #190
2026-01-30 12:25:09 +01:00
maziggy 74379da28e Fix X1E model-based queue
Backend - X1E model-based queue support:
- Fix 'PrinterState' object has no attribute 'ams_units' error
  by accessing AMS data via status.raw_data.get("ams", [])
- Add model name normalization in print_queue.py to convert
  "Bambu Lab X1E" or "C13" to canonical "X1E" format
- Add case-insensitive model matching in print_scheduler.py
  using func.lower() for database queries

Fixes #162
2026-01-30 12:05:18 +01:00
maziggy 87b10c636a Minor mobile layout fixes 2026-01-30 11:56:33 +01:00
maziggy 520ec13bc4 iPhone button overflow fix 2026-01-30 11:39:22 +01:00
maziggy 836335be7d Correct AMS data access in print scheduler filament validation
The _get_missing_filament_types() method was incorrectly accessing
status.ams_units and status.virtual_tray, but PrinterState stores
this data in raw_data["ams"] and raw_data["vt_tray"] respectively.

This caused "'PrinterState' object has no attribute 'ams_units'" error
when using model-based queue assignment with filament type requirements.

Fixes #162
2026-01-30 11:32:35 +01:00
maziggy bced6415e0 Updated systemd script 2026-01-30 10:08:34 +01:00
maziggy 4c2cef64b3 Add script automation and visibility options (#176)
Enhance Home Assistant script support with automation triggers and
printer card visibility control.

- Script automation: Run scripts automatically when main plug turns on/off
- Show/hide scripts on printer cards (configurable per script)
- Scripts appear in dedicated row on printer cards with quick-run buttons
- Toast notification when triggering scripts from settings/sidebar

Closes #176
2026-01-30 09:46:03 +01:00
MartinNYHC 48c349bed1 Merge pull request #179 from maziggy/revert-178-feature/stl-thumbnail
Revert "Feature/stl thumbnail"
2026-01-29 15:52:58 +01:00
MartinNYHC 221f9ffcc3 Revert "Feature/stl thumbnail" 2026-01-29 15:52:46 +01:00
MartinNYHC d9b4b011ba Merge pull request #178 from maziggy/feature/stl-thumbnail
Feature/stl thumbnail
2026-01-29 15:49:42 +01:00
MartinNYHC c4b3b69914 Merge branch '0.1.6-final' into feature/stl-thumbnail 2026-01-29 15:49:27 +01:00
maziggy 0a120b7735 Trigger CI 2026-01-29 15:20:37 +01:00
maziggy 523d14c216 Updated CI 2026-01-29 15:10:03 +01:00
MisterBeardyandClaude Opus 4.5 375d5238d0 Add STL thumbnail generation support
- Add trimesh and matplotlib dependencies for software-based 3D rendering
- Create stl_thumbnail service with generate_stl_thumbnail() function
- Handle mesh simplification for large files (>100k vertices)
- Auto-generate thumbnails during STL file upload and ZIP extraction
- Add POST /library/files/{id}/regenerate-thumbnail endpoint
- Add POST /library/generate-stl-thumbnails batch endpoint
- Add "Generate Thumbnails" button to file manager toolbar
- Add "Regenerate Thumbnail" option to file context menu
- Add unit and integration tests for new functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:06:01 +01:00
maziggy 86ad13398a Updated CI 2026-01-29 13:31:07 +01:00
maziggy 48b897a5a9 Updated CI 2026-01-29 13:30:45 +01:00
maziggy 18fbd9c156 Remove timestamps from GitHub backup files for cleaner diffs
- Remove created_at from backup_metadata.json
- Remove exported_at from K-profile files
 - Remove exported_at from cloud profile files (filament, printer, process)
- Remove exported_at from app settings backup
- Git already tracks file modification history, so these were redundant
- Backups now only show changes in git diff when actual data changes
2026-01-29 08:27:20 +01:00
maziggy e74d5be4b8 @renovate
- vitest: ^2.1.0 → ^3.2.4
- @vitest/coverage-v8: upgraded to match
2026-01-29 08:17:53 +01:00
maziggy a367ddc66e Add toggle to disable printer firmware update checks
Add new setting "Check printer firmware" in Settings → General → Updates
that allows users to disable automatic firmware update checks from
Bambu Lab servers.

Closes #169
2026-01-29 07:50:32 +01:00
maziggy c123fa08c0 Fix A1/A1 Mini showing Printing instead of Idle (Issue #168)
Some A1/A1 Mini firmware versions incorrectly report stg_cur=0 (which
maps to "Printing") even when the printer is idle. This is a known
firmware bug also observed in the Home Assistant Bambu Lab integration.

- Add A1_MODELS constant listing affected model variants
- Add has_stg_cur_idle_bug() helper to identify affected models
- Update get_derived_status_name() to check gcode_state before stg_cur
  for A1 models: if IDLE + stg_cur=0, return None to show "Idle"
- Fix only applies when all conditions match (A1 model + IDLE + stg_cur=0)
- Non-A1 printers and A1 printers without the bug are unaffected

Closes #168
2026-01-29 07:23:53 +01:00
maziggy c203d9bf5b Fix multi-plate thumbnail display in queue and add archive plate browsing
- Queue now shows correct plate thumbnail based on selected plate_id
  (previously always showed plate 1 regardless of selection)
- Archive cards now support plate browsing for multi-plate 3MF files:
  - Left/right arrows to cycle through plates on hover
  - Dot indicators at bottom show current plate (clickable)
  - Lazy-loads plate data only when user hovers
- Added getArchivePlateThumbnail and getLibraryFilePlateThumbnail API methods

Closes #166
2026-01-28 16:22:33 +01:00
maziggy be34b778ff Uodated CHANGELOG 2026-01-28 15:57:43 +01:00
maziggy 6fe3956316 Added variables to queue related notificatuon templates 2026-01-28 14:02:58 +01:00
maziggy 2afdbc5e60 Fix K-profiles backup status showing incorrect printer connection count
The GitHub backup settings page was showing "1/2 connected" even when
both printers were connected. This happened because the code read
printer status from the React Query cache, which is only populated by
WebSocket messages received on other pages.

Changed to use useQueries to fetch printer status directly from the API
(/api/v1/printers/{id}/status) instead of relying on cached WebSocket
data. Results are cached for 10s and refreshed every 30s.
2026-01-28 13:56:37 +01:00
maziggy 7c5c4ee5bb Model-based queue assignment with filament validation and queue notifications (#162)
Model-based queue assignment:
- Extract printer_model from sliced 3MF files during upload
- Display sliced-for model in archive view
- New queue mode: assign to "Any [Model]" instead of specific printer
- Scheduler auto-assigns to first idle printer of matching model
- Filament validation: only assign to printers with required filament types loaded
- Waiting reason display shows why jobs are waiting (e.g., "Waiting for filament: Printer1 (needs PLA)")
- "Waiting" status badge (purple) distinguishes from regular "Pending"

Queue notifications (7 new events):
- Job Added: When a job is added to queue
- Job Assigned: When a model-based job is assigned to a printer
- Job Started: When a queue job starts printing
- Job Waiting: When a job is waiting for filament (enabled by default)
- Job Skipped: When a job is skipped due to previous failure (enabled by default)
- Job Failed: When a job fails to start (enabled by default)
- Queue Complete: When all queued jobs finish

Backend changes:
- New columns: print_queue.target_model, print_queue.required_filament_types, print_queue.waiting_reason
- New columns: notification_providers.on_queue_job_* (7 event triggers)
- Notification templates for all queue events
- Scheduler validates filament compatibility before model-based assignment
- Queue API extracts filament types from 3MF when adding model-based items
- Local backup/restore includes queue notification settings

Frontend changes:
- TypeScript interfaces updated for new fields
- Queue page shows waiting reason and "Waiting" badge
- Notification settings includes "Print Queue" section with 7 toggles

Closes #162
2026-01-28 13:39:08 +01:00
maziggy 65a6e7791b Fix Bambu Cloud preset lookup by transforming filament_id to setting_id
Printers report filament_id (e.g., GFA00) but the Bambu Cloud API expects
setting_id format which has an "S" inserted after "GF" (e.g., GFSA00).

- Add _filament_id_to_setting_id() helper function
- Transform IDs before API calls: GFx## -> GFSx##
- User presets (P-prefix) and already-correct IDs unchanged
- Improved warning message to show both original and transformed IDs
2026-01-28 09:34:56 +01:00
maziggy 54abee53f8 Updated Github workflow 2026-01-28 09:15:46 +01:00
maziggy 180752f7e6 Updated Github workflow 2026-01-28 09:15:26 +01:00
maziggy 2eb21e8b42 Issue #162 2026-01-28 09:14:22 +01:00
maziggy ead2bfc822 @renovate baseline-browser-mapping@latest 2026-01-28 07:18:19 +01:00
maziggy a1c59fd6cb Updated the workflow:
- Changed stale-issue-label from feedback to stale (so stale issues get the "stale" label)
- Added remove-issue-labels: 'feedback' to remove the feedback label when issues are auto-closed
2026-01-28 07:13:35 +01:00
maziggy f17c9e572b Updated the workflow:
- Changed stale-issue-label from feedback to stale (so stale issues get the "stale" label)
- Added remove-issue-labels: 'feedback' to remove the feedback label when issues are auto-closed
2026-01-28 07:13:01 +01:00
maziggy 2bc0ef122d Minor layout fixes 2026-01-27 17:15:26 +01:00