瀏覽代碼

Add comprehensive documentation

maziggy 5 月之前
父節點
當前提交
67d57e6a5e

+ 160 - 928
README.md

@@ -1,1014 +1,246 @@
-TESTERS NEEDED!!!
-Since I only have X1C and H2D devices, I'm not able to test the application with other Bambu Lab models. Collaborate today and help the project to support the whole Bambu Lab printer family!
-
 <p align="center">
   <img src="static/img/bambuddy_logo_dark.png" alt="Bambuddy Logo" width="300">
 </p>
 
-<p align="center">
-  <strong>A self-hosted print archive and management system for Bambu Lab 3D printers</strong>
-</p>
+<h1 align="center">Bambuddy</h1>
 
 <p align="center">
-  <a href="#features">Features</a> •
-  <a href="#screenshots">Screenshots</a> •
-  <a href="#installation">Installation</a> •
-  <a href="#configuration">Configuration</a> •
-  <a href="#usage">Usage</a> •
-  <a href="#contributing">Contributing</a>
+  <strong>Self-hosted print archive and management system for Bambu Lab 3D printers</strong>
 </p>
 
----
-
-## Features
-
-- **Multi-Printer Support** - Connect and monitor multiple Bambu Lab printers (H2D and X1C testet. H2C, H2S, X1, X1C, P1P, P1S, A1 and A1 Mini needs to be testet)
-- **Automatic Print Archiving** - Automatically saves 3MF files with full metadata extraction
-- **3D Model Preview** - Interactive Three.js viewer for archived prints
-- **Real-time Monitoring** - Live printer status via WebSocket with print progress, temperatures, layer count, and more
-- **Print Queue & Scheduling** - Schedule prints for specific times with powerful automation:
-  - Queue multiple prints per printer
-  - Schedule prints for a specific date/time
-  - Auto power-on printer before scheduled print starts
-  - Auto power-off after print completes (with nozzle cooldown)
-  - Stop active prints with one click
-  - Drag-and-drop queue reordering
-- **Smart Plug Integration** - Control Tasmota-based smart plugs with automation:
-  - Auto power-on when print starts
-  - Auto power-off when print completes
-  - Time-based delay (1-60 minutes)
-  - Temperature-based delay (waits for nozzle to cool down)
-  - Scheduled power on/off times (daily schedule)
-  - Power consumption monitoring with alerts
-- **Print Statistics Dashboard** - Customizable dashboard with drag-and-drop widgets
-  - Print success rates
-  - Filament usage trends
-  - Print activity calendar
-  - Cost tracking
-  - Time accuracy tracking
-- **Print Time Accuracy** - Compare estimated vs actual print times
-  - Color-coded badges (green=accurate, blue=faster, orange=slower)
-  - Per-printer accuracy statistics
-  - Dashboard widget showing average accuracy
-- **Duplicate Detection** - Automatically detect when models have been printed before
-  - SHA256 content hash for exact matching
-  - Purple badge indicator on archive cards
-  - "Duplicates" collection filter to find all duplicates
-  - View duplicate history when viewing archive details
-- **HMS Error Monitoring** - Real-time Health Management System status
-  - Always-visible status indicator on printer cards
-  - Green "OK" when healthy, orange/red when errors detected
-  - Severity-based coloring (fatal, serious, common, info)
-- **MQTT Debug Logging** - Built-in debugging tool for printer communication
-  - Start/stop logging with one click
-  - Real-time message capture with auto-refresh
-  - View incoming and outgoing MQTT messages
-  - Expandable JSON payloads for detailed inspection
-- **Filament Cost Tracking** - Track costs per print with customizable filament database
-- **Photo Attachments** - Attach photos to archived prints for documentation
-  - Automatic finish photo capture when print completes (via printer camera)
-  - Manual photo uploads
-- **Print Metadata** - Rich metadata extracted from 3MF files:
-  - Print time estimate and actual time comparison
-  - Filament usage (grams) and type
-  - Total layer count and layer height
-  - Nozzle/bed temperatures
-  - Multi-color support with color swatches
-- **Failure Analysis** - Document failed prints with notes and photos
-- **Project Page Editor** - View and edit embedded MakerWorld project pages with images, descriptions, and designer info
-- **K-Profiles (Pressure Advance)** - Manage pressure advance settings directly on your printers
-  - View, edit, add, and delete K-profiles per printer
-  - Filter by nozzle size (0.2, 0.4, 0.6, 0.8mm) and flow type (High Flow, Standard)
-  - Search by profile name or filament
-  - Dual-nozzle support for H2 series (auto-detected from MQTT)
-  - Left/Right extruder column layout for dual-nozzle printers
-- **Push Notifications** - Get notified about print events via multiple channels:
-  - WhatsApp (via CallMeBot)
-  - ntfy (self-hosted or ntfy.sh)
-  - Pushover
-  - Telegram
-  - Email (SMTP with TLS/SSL/plain options)
-  - Discord webhooks
-  - Generic webhooks (custom integrations)
-  - Configurable event triggers (start, complete, failed, stopped, progress milestones)
-  - Quiet hours to suppress notifications during sleep
-  - Daily digest mode (batch notifications into daily summary)
-  - Customizable message templates with variables
-  - Per-printer filtering
-- **Spoolman Integration** - Sync AMS filament data with your Spoolman server
-  - Automatic or manual sync modes
-  - Per-printer or all-printer sync
-  - Auto-creates spools and filaments in Spoolman
-  - Matches Bambu Lab spools by unique tray UUID
-  - Tracks filament usage during prints
-  - Third-party spools (SpoolEase, etc.) gracefully skipped
-- **Cloud Profiles Sync** - Access your Bambu Cloud slicer presets
-  - View and manage filament, printer, and process presets
-  - **Template system** for quick preset creation:
-    - Save any preset as a reusable template
-    - Visibility control to choose which templates appear in modals
-    - Apply templates when creating or editing presets
-  - **Preset comparison/diff view**:
-    - Compare any preset against its base preset
-    - Compare any two presets of the same type side-by-side
-    - Highlights added, removed, and changed settings
-    - Searchable diff with change statistics
-- **File Manager** - Browse and manage files on your printer's SD card
-- **Re-print** - Send archived prints back to any connected printer
-- **Dark/Light Theme** - Easy on the eyes, day or night
-- **Keyboard Shortcuts** - Quick navigation with keyboard shortcuts
-- **Multi-language Support** - Interface available in English and German
-  - Browser language auto-detection
-  - Manual language override in settings
-  - Separate notification language setting
-- **Auto Updates** - Automatic update checking and one-click updates from GitHub releases
-- **Maintenance Tracker** - Track and schedule printer maintenance
-  - Customizable maintenance types (nozzle changes, lubrication, belt tension, etc.)
-  - Interval-based reminders (print hours or calendar days)
-  - Maintenance history logging
-  - Push notifications when maintenance is due
-
-## Screenshots
-
-<!-- Add your screenshots here -->
 <p align="center">
-  <img src="docs/screenshots/printers.png" alt="Printers" width="800">
+  <a href="https://github.com/maziggy/bambuddy/releases"><img src="https://img.shields.io/github/v/release/maziggy/bambuddy?style=flat-square&color=blue" alt="Release"></a>
+  <a href="https://github.com/maziggy/bambuddy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/maziggy/bambuddy?style=flat-square" alt="License"></a>
+  <a href="https://github.com/maziggy/bambuddy/stargazers"><img src="https://img.shields.io/github/stars/maziggy/bambuddy?style=flat-square" alt="Stars"></a>
+  <a href="https://github.com/maziggy/bambuddy/issues"><img src="https://img.shields.io/github/issues/maziggy/bambuddy?style=flat-square" alt="Issues"></a>
 </p>
 
 <p align="center">
-  <img src="docs/screenshots/archives.png" alt="Archives" width="800">
+  <a href="#-features">Features</a> •
+  <a href="#-screenshots">Screenshots</a> •
+  <a href="#-quick-start">Quick Start</a> •
+  <a href="https://github.com/maziggy/bambuddy/wiki">Documentation</a> •
+  <a href="#-contributing">Contributing</a>
 </p>
 
-<p align="center">
-  <img src="docs/screenshots/queue.png" alt="Queue" width="800">
-</p>
+---
 
-<p align="center">
-  <img src="docs/screenshots/statistics.png" alt="Statistics" width="800">
-</p>
+> **Testers Needed!** I only have X1C and H2D devices. Help make Bambuddy work with all Bambu Lab printers by [reporting your experience](https://github.com/maziggy/bambuddy/issues)!
 
-<p align="center">
-  <img src="docs/screenshots/cloud_profiles.png" alt="Cloud Profiles" width="800">
-</p>
+## Why Bambuddy?
 
-<p align="center">
-  <img src="docs/screenshots/cloud_profiles_2.png" alt="Cloud Profiles 2" width="800">
-</p>
+- **Own your data** — All print history stored locally, no cloud dependency
+- **Works offline** — Uses LAN Mode for direct printer communication
+- **Full automation** — Schedule prints, auto power-off, get notified when done
+- **Multi-printer support** — Manage your entire print farm from one interface
 
-<p align="center">
-  <img src="docs/screenshots/k_profiles.png" alt="K Profiles" width="800">
-</p>
+---
+
+## ✨ Features
+
+<table>
+<tr>
+<td width="50%" valign="top">
+
+### 📦 Print Archive
+- Automatic 3MF archiving with metadata
+- 3D model preview (Three.js)
+- Duplicate detection
+- Photo attachments & failure analysis
+- Re-print to any connected printer
+
+### 📊 Monitoring & Stats
+- Real-time printer status via WebSocket
+- HMS error monitoring
+- Print success rates & trends
+- Filament usage tracking
+- Cost analytics
+
+### ⏰ Scheduling & Automation
+- Print queue with drag-and-drop
+- Scheduled prints (date/time)
+- Smart plug integration (Tasmota)
+- Auto power-on before print
+- Auto power-off after cooldown
+
+</td>
+<td width="50%" valign="top">
+
+### 🔔 Notifications
+- WhatsApp, Telegram, Discord
+- Email, Pushover, ntfy
+- Custom webhooks
+- Quiet hours & daily digest
+- Customizable message templates
+
+### 🔧 Integrations
+- [Spoolman](https://github.com/Donkie/Spoolman) filament sync
+- Bambu Cloud profile management
+- K-profiles (pressure advance)
+- External sidebar links
+
+### 🛠️ Maintenance
+- Maintenance scheduling & tracking
+- Interval reminders (hours/days)
+- Print time accuracy stats
+- File manager for printer storage
+
+</td>
+</tr>
+</table>
+
+**Plus:** Dark/light theme • Mobile responsive • Keyboard shortcuts • Multi-language (EN/DE) • Auto updates
+
+---
+
+## 📸 Screenshots
+
+<details>
+<summary><strong>Click to expand screenshots</strong></summary>
 
 <p align="center">
-  <img src="docs/screenshots/maintenance_settings.png" alt="Maintenance Settings" width="800">
+  <img src="docs/screenshots/printers.png" alt="Printers" width="800">
+  <br><em>Real-time printer monitoring</em>
 </p>
 
 <p align="center">
-  <img src="docs/screenshots/maintenance_status.png" alt="Maintenance Status" width="800">
+  <img src="docs/screenshots/archives.png" alt="Archives" width="800">
+  <br><em>Print archive with 3D preview</em>
 </p>
 
 <p align="center">
-  <img src="docs/screenshots/settings.png" alt="Settings" width="800">
+  <img src="docs/screenshots/queue.png" alt="Queue" width="800">
+  <br><em>Print scheduling and queue management</em>
 </p>
 
 <p align="center">
-  <img src="docs/screenshots/notifications.png" alt="Notifications" width="800">
+  <img src="docs/screenshots/statistics.png" alt="Statistics" width="800">
+  <br><em>Customizable statistics dashboard</em>
 </p>
 
 <p align="center">
-  <img src="docs/screenshots/smart_plugs.png" alt="Smart Plugs" width="800">
+  <img src="docs/screenshots/settings.png" alt="Settings" width="800">
+  <br><em>Configuration and integrations</em>
 </p>
 
-## Requirements
+</details>
 
-### System Requirements
-- **Python 3.10+** (3.11 or 3.12 recommended)
-- **Node.js 18+** (only needed if building frontend from source)
-- **Git** (for cloning the repository)
-
-### Network Requirements
-- Bambu Lab printer with **LAN Mode** enabled
-- Printer and Bambuddy server must be on the same local network
-- Ports used: 8883 (MQTT/TLS), 990 (FTPS)
+---
 
-### Supported Printers
-- Bambu Lab H2C / H2D / H2S
-- Bambu Lab X1 / X1 Carbon
-- Bambu Lab P1P / P1S
-- Bambu Lab A1 / A1 Mini
+## 🚀 Quick Start
 
-## Installation
+### Requirements
+- Python 3.10+ (3.11/3.12 recommended)
+- Bambu Lab printer with **LAN Mode** enabled
+- Same local network as printer
 
-### Option 1: Quick Install (Linux/macOS)
+### Installation
 
 ```bash
-# Clone the repository
+# Clone and setup
 git clone https://github.com/maziggy/bambuddy.git
 cd bambuddy
-
-# Create and activate virtual environment
 python3 -m venv venv
 source venv/bin/activate
-
-# Install Python dependencies
 pip install -r requirements.txt
 
-# Start the server
+# Run
 uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
 ```
 
-Open http://localhost:8000 in your browser.
-
-### Option 2: Detailed Install (All Platforms)
-
-#### Step 1: Install Prerequisites
-
-**macOS:**
-```bash
-# Install Homebrew if not installed
-/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
-# Install Python and Node.js
-brew install python@3.12 node
-```
-
-**Ubuntu/Debian:**
-```bash
-sudo apt update
-sudo apt install python3 python3-venv python3-pip nodejs npm git
-```
-
-**Windows:**
-1. Download and install [Python 3.12](https://www.python.org/downloads/) (check "Add to PATH")
-2. Download and install [Node.js LTS](https://nodejs.org/)
-3. Download and install [Git](https://git-scm.com/download/win)
-
-#### Step 2: Clone the Repository
-
-```bash
-git clone https://github.com/maziggy/bambuddy.git
-cd bambuddy
-```
-
-#### Step 3: Set Up Python Environment
-
-**Linux/macOS:**
-```bash
-python3 -m venv venv
-source venv/bin/activate
-pip install --upgrade pip
-pip install -r requirements.txt
-```
-
-**Windows (PowerShell):**
-```powershell
-python -m venv venv
-.\venv\Scripts\Activate.ps1
-pip install --upgrade pip
-pip install -r requirements.txt
-```
-
-**Windows (Command Prompt):**
-```cmd
-python -m venv venv
-venv\Scripts\activate.bat
-pip install --upgrade pip
-pip install -r requirements.txt
-```
-
-#### Step 4: Build Frontend (Optional)
+Open **http://localhost:8000** and add your printer!
 
-The repository includes pre-built frontend files in `/static`. If you want to build from source:
+> **Need detailed instructions?** See the [Installation Guide](https://github.com/maziggy/bambuddy/wiki/Installation)
 
-```bash
-cd frontend
-npm install
-npm run build
-cd ..
-```
-
-#### Step 5: Run the Application
-
-```bash
-uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
-```
+### Enabling LAN Mode
 
-Open http://localhost:8000 in your browser.
+1. On printer: **Settings** → **Network** → **LAN Mode**
+2. Enable LAN Mode and note the **Access Code**
+3. Find IP address in network settings
+4. Find Serial Number in device info
 
-### Running as a Service (Linux)
+---
 
-Create a systemd service for automatic startup:
+## 📚 Documentation
 
-```bash
-sudo nano /etc/systemd/system/bambuddy.service
-```
+Full documentation available in the **[Wiki](https://github.com/maziggy/bambuddy/wiki)**:
 
-Add the following content (adjust paths as needed):
+- [Installation](https://github.com/maziggy/bambuddy/wiki/Installation) — All installation methods
+- [Getting Started](https://github.com/maziggy/bambuddy/wiki/Getting-Started) — First printer setup
+- [Features](https://github.com/maziggy/bambuddy/wiki/Home#feature-documentation) — Detailed feature guides
+- [Troubleshooting](https://github.com/maziggy/bambuddy/wiki/Troubleshooting) — Common issues & solutions
+- [API Reference](https://github.com/maziggy/bambuddy/wiki/API-Reference) — REST API documentation
 
-```ini
-[Unit]
-Description=Bambuddy Print Archive
-After=network.target
+---
 
-[Service]
-Type=simple
-User=YOUR_USERNAME
-WorkingDirectory=/home/YOUR_USERNAME/bambuddy
-Environment="PATH=/home/YOUR_USERNAME/bambuddy/venv/bin"
-ExecStart=/home/YOUR_USERNAME/bambuddy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
-Restart=always
-RestartSec=10
+## 🖨️ Supported Printers
 
-[Install]
-WantedBy=multi-user.target
-```
+| Series | Models | Status |
+|--------|--------|--------|
+| H2 | H2C, H2D, H2S | ✅ Tested (H2D) |
+| X1 | X1, X1 Carbon | ✅ Tested (X1C) |
+| P1 | P1P, P1S | 🧪 Needs testing |
+| A1 | A1, A1 Mini | 🧪 Needs testing |
 
-Enable and start the service:
+---
 
-```bash
-sudo systemctl daemon-reload
-sudo systemctl enable bambuddy
-sudo systemctl start bambuddy
+## 🛠️ Tech Stack
 
-# Check status
-sudo systemctl status bambuddy
+| Component | Technology |
+|-----------|------------|
+| Backend | Python, FastAPI, SQLAlchemy |
+| Frontend | React, TypeScript, Tailwind CSS |
+| Database | SQLite |
+| 3D Viewer | Three.js |
+| Communication | MQTT (TLS), FTPS |
 
-# View logs
-sudo journalctl -u bambuddy -f
-```
+---
 
-### Running with Docker (Coming Soon)
+## 🤝 Contributing
 
-```bash
-docker run -d \
-  --name bambuddy \
-  -p 8000:8000 \
-  -v bambuddy_data:/app/data \
-  -v bambuddy_archive:/app/archive \
-  maziggy/bambuddy:latest
-```
+Contributions welcome! Here's how to help:
 
-### Updating Bambuddy
+1. **Test** — Report issues with your printer model
+2. **Translate** — Add new languages
+3. **Code** — Submit PRs for bugs or features
+4. **Document** — Improve wiki and guides
 
 ```bash
+# Development setup
+git clone https://github.com/maziggy/bambuddy.git
 cd bambuddy
-git pull origin main
 
-# Activate virtual environment
-source venv/bin/activate  # Linux/macOS
-# or: .\venv\Scripts\Activate.ps1  # Windows PowerShell
-
-# Update dependencies
+# Backend
+python3 -m venv venv && source venv/bin/activate
 pip install -r requirements.txt
+DEBUG=true uvicorn backend.app.main:app --reload
 
-# Rebuild frontend (if needed)
-cd frontend
-npm install
-npm run build
-cd ..
-
-# Restart the application
-```
-
-## Configuration
-
-### Enabling LAN Mode on Your Printer
-
-To connect Bambuddy to your printer, you need to enable LAN Mode:
-
-1. On your printer, go to **Settings** > **Network** > **LAN Mode**
-2. Enable **LAN Mode** (this requires Developer Mode to be enabled first)
-3. Note down the **Access Code** displayed
-4. Find your printer's **IP Address** in network settings
-5. Find your printer's **Serial Number** in device info
-
-### Adding a Printer in Bambuddy
-
-1. Go to the **Printers** page
-2. Click **Add Printer**
-3. Enter:
-   - **Name**: A friendly name for your printer
-   - **IP Address**: Your printer's local IP
-   - **Access Code**: The code from LAN Mode settings
-   - **Serial Number**: Your printer's serial number
-4. Click **Save**
-
-The printer should connect automatically and show real-time status.
-
-### Environment Variables
-
-Bambuddy can be configured using environment variables or a `.env` file in the project root. Copy `.env.example` to `.env` and adjust as needed:
-
-```bash
-cp .env.example .env
-```
-
-| Variable | Default | Description |
-|----------|---------|-------------|
-| `DEBUG` | `false` | Enable debug mode (verbose logging, SQL queries) |
-| `LOG_LEVEL` | `INFO` | Log level when DEBUG=false (`DEBUG`, `INFO`, `WARNING`, `ERROR`) |
-| `LOG_TO_FILE` | `true` | Write logs to `logs/bambuddy.log` |
-
-**Production (default):**
-- INFO level logging
-- SQLAlchemy and HTTP library noise suppressed
-- Logs written to `logs/bambuddy.log` (5MB rotating, 3 backups)
-
-**Development (`DEBUG=true`):**
-- DEBUG level logging (verbose)
-- All SQL queries logged
-- Useful for troubleshooting printer connections
-
-Example `.env` for development:
-```bash
-DEBUG=true
-LOG_TO_FILE=true
-```
-
-## Usage
-
-### Keyboard Shortcuts
-
-| Key | Action |
-|-----|--------|
-| `1` | Go to Printers |
-| `2` | Go to Archives |
-| `3` | Go to Statistics |
-| `4` | Go to Cloud Profiles |
-| `5` | Go to Settings |
-| `?` | Show keyboard shortcuts |
-
-### Dashboard Widgets
-
-The statistics dashboard features draggable, resizable widgets:
-- **Drag** widgets by the grip handle to reorder
-- **Resize** widgets by clicking the resize icon (cycles through 1/4, 1/2, full width)
-- **Hide** widgets by clicking the eye icon
-- **Reset** layout using the Reset Layout button
-
-Your layout preferences are saved automatically.
-
-### Archiving Prints
-
-Prints are automatically archived when they complete. You can also:
-- Manually add photos to any archive
-- Add failure analysis notes for failed prints
-- Re-print any archived 3MF to a connected printer
-- Export archives for backup
-
-### Print Queue & Scheduling
-
-The print queue allows you to schedule prints for later execution with smart automation.
-
-#### Adding to Queue
-
-1. Go to the **Archives** page
-2. Right-click an archive and select **Schedule**, or click the calendar icon
-3. Choose a printer and optional scheduled time
-4. Configure options:
-   - **Scheduled Time**: Leave empty for "next available" or pick a specific date/time
-   - **Auto Power Off**: Automatically turn off the printer when the print completes
-
-#### Queue Management
-
-- **View Queue**: Click the queue icon on any printer card, or go to the Queue page
-- **Reorder**: Drag and drop queue items to change print order
-- **Cancel Pending**: Click the X button on any pending queue item
-- **Stop Active Print**: Click the stop button on an actively printing item (with confirmation)
-
-#### Automation Flow
-
-When a scheduled print is ready to start:
-1. **Power On**: If linked to a smart plug, the printer powers on automatically
-2. **Wait for Connection**: System waits for the printer to connect (up to 2 minutes)
-3. **Upload & Start**: The 3MF file is uploaded via FTP and the print starts
-4. **Monitor**: Progress is tracked in real-time
-5. **Completion**: When the print finishes:
-   - Queue item is marked complete/failed
-   - If "Auto Power Off" was enabled, waits for nozzle to cool below 50°C
-   - Printer powers off automatically
-
-### Project Page
-
-3MF files downloaded from MakerWorld contain embedded project pages with model information. To view:
-1. Right-click any archive in the Archives page
-2. Select "Project Page" from the context menu
-3. View title, description, designer info, license, and images
-4. Click "Edit" to modify the project page metadata
-5. Changes are saved directly to the 3MF file
-
-### K-Profiles (Pressure Advance)
-
-K-profiles store pressure advance (Linear Advance) settings for different filament and nozzle combinations. Bambuddy lets you view and manage these settings directly on your printers.
-
-#### Viewing K-Profiles
-
-1. Go to **Settings** > **K-Profiles**
-2. Select a connected printer from the dropdown
-3. Choose a nozzle size (0.2, 0.4, 0.6, or 0.8mm)
-4. Profiles are displayed with:
-   - K-value (pressure advance factor)
-   - Profile name and filament
-   - Flow type (HF = High Flow, S = Standard)
-
-#### Dual-Nozzle Printers (H2 Series)
-
-For dual-nozzle printers (H2D, H2C, H2S), Bambuddy automatically detects the nozzle configuration and displays:
-- **Left/Right columns** showing profiles for each extruder
-- **Extruder filter** to show profiles for one extruder only
-- **Extruder selector** when adding new profiles
-
-The nozzle count is auto-detected from MQTT temperature data when the printer connects.
-
-#### Editing K-Profiles
-
-1. Click on any profile card to open the edit modal
-2. Modify the K-value (typical ranges: 0.01-0.06 for PLA, 0.02-0.10 for PETG)
-3. Click **Save** to update the profile on the printer
-4. Click the trash icon to delete a profile (with confirmation)
-
-#### Adding K-Profiles
-
-1. Click **Add Profile** in the header
-2. Select a filament from the dropdown (populated from existing profiles on the printer)
-3. Choose flow type (High Flow or Standard) and nozzle size
-4. For dual-nozzle printers, select Left or Right extruder
-5. Enter the K-value and click **Save**
-
-**Note:** Filaments must first be calibrated in Bambu Studio to appear in the dropdown. Bambuddy reads the filament list from existing K-profiles on the printer.
-
-#### Filtering and Search
-
-- **Search**: Type to filter by profile name or filament ID
-- **Extruder filter** (dual-nozzle only): Show All, Left Only, or Right Only
-- **Flow type filter**: Show All, HF Only, or S Only
-
-### Smart Plug Integration
-
-Bambuddy supports Tasmota-based smart plugs for automated power control. This is useful for:
-- Automatically turning on your printer when a print starts
-- Safely turning off the printer after it cools down
-- Energy savings by powering off idle printers
-
-#### Supported Devices
-
-Any smart plug running [Tasmota](https://tasmota.github.io/docs/) firmware with HTTP API enabled. Popular compatible devices include:
-- Sonoff S31 / S26
-- Gosund / Teckin / Treatlife smart plugs
-- Any ESP8266/ESP32-based plug with Tasmota
-
-#### Setting Up a Smart Plug
-
-1. Go to **Settings** > **Smart Plugs**
-2. Click **Add Plug**
-3. Enter the plug's IP address and click **Test** to verify connection
-4. Give it a name (auto-filled from device if available)
-5. Optionally add username/password if your Tasmota requires authentication
-6. Link it to a printer for automation
-7. Click **Add**
-
-#### Automation Options
-
-Once linked to a printer, you can configure:
-
-| Setting | Description |
-|---------|-------------|
-| **Enabled** | Master toggle for all automation |
-| **Auto On** | Turn on plug when a print starts |
-| **Auto Off** | Turn off plug when print completes |
-| **Delay Mode** | Choose how to delay the power-off |
-
-**Delay Modes:**
-- **Time-based**: Wait a fixed number of minutes (1-60) after print completes
-- **Temperature-based**: Wait until nozzle temperature drops below threshold (default 70°C)
-
-#### Scheduled Power On/Off
-
-Set daily schedules to automatically turn plugs on or off at specific times:
-
-1. Expand the plug settings panel
-2. Enable **Scheduled On** and/or **Scheduled Off**
-3. Set the desired time for each
-
-Use cases:
-- Turn on printer at 8am to warm up before you start working
-- Turn off printer at midnight as a safety measure
-- Save energy by scheduling off during non-printing hours
-
-#### Power Monitoring & Alerts
-
-For Tasmota plugs with energy monitoring (e.g., Sonoff S31), Bambuddy can alert you when power consumption exceeds a threshold:
-
-1. Enable **Power Alert** in the plug settings
-2. Set the **Power Threshold** in watts (e.g., 200W)
-3. Receive notifications when power exceeds the threshold
-
-This is useful for detecting:
-- Printer issues (unexpected high power draw)
-- Heater failures (power too low during printing)
-- Confirming the printer is actively heating/printing
-
-#### Manual Control
-
-Each plug card shows:
-- Current status (ON/OFF/Offline)
-- Current power consumption (if supported)
-- On/Off buttons for manual control
-- Expandable settings panel
-
-### Push Notifications
-
-Bambuddy can send push notifications when print events occur. Notifications are useful for monitoring prints remotely without checking the app constantly.
-
-#### Supported Providers
-
-| Provider | Description | Setup Required |
-|----------|-------------|----------------|
-| **WhatsApp** | Via [CallMeBot](https://www.callmebot.com/blog/free-api-whatsapp-messages/) | Free API key from CallMeBot |
-| **ntfy** | Self-hosted or [ntfy.sh](https://ntfy.sh) | Just a topic name (no account needed for public server) |
-| **Pushover** | [Pushover](https://pushover.net/) push notifications | Pushover account + app token |
-| **Telegram** | Via Telegram Bot | Bot token from @BotFather |
-| **Email** | SMTP email | SMTP server credentials |
-| **Discord** | Discord channel webhooks | Webhook URL from Discord channel settings |
-| **Webhook** | Generic HTTP webhooks | Any URL that accepts POST requests |
-
-#### Adding a Notification Provider
-
-1. Go to **Settings** > **Notifications**
-2. Click **Add Provider**
-3. Select a provider type and enter the required configuration
-4. Click **Send Test** to verify the configuration works
-5. Configure which events should trigger notifications
-6. Click **Add**
-
-#### Event Triggers
-
-Configure which events send notifications:
-
-| Event | Description |
-|-------|-------------|
-| **Print Started** | When a print job begins |
-| **Print Completed** | When a print finishes successfully |
-| **Print Failed** | When a print fails or errors out |
-| **Print Stopped** | When you manually stop/cancel a print |
-| **Progress Milestones** | At 25%, 50%, and 75% progress |
-| **Printer Offline** | When a printer disconnects |
-| **Printer Error** | When HMS errors are detected |
-| **Low Filament** | When filament is running low |
-
-#### Quiet Hours
-
-Enable quiet hours to suppress notifications during sleep or work hours:
-
-1. Enable **Quiet Hours** toggle
-2. Set start time (e.g., 22:00)
-3. Set end time (e.g., 07:00)
-
-Notifications during quiet hours are silently skipped.
-
-#### Per-Printer Filtering
-
-By default, notifications are sent for all printers. To limit notifications to a specific printer:
-
-1. Open the notification provider settings
-2. Select a printer from the **Printer** dropdown
-3. Only events from that printer will trigger notifications
-
-#### Daily Digest
-
-Instead of receiving individual notifications for each event, you can batch them into a single daily summary:
-
-1. Enable **Daily Digest** toggle on a notification provider
-2. Set the digest time (e.g., 08:00)
-3. All notifications for that provider are collected throughout the day
-4. At the scheduled time, a single summary notification is sent
-
-The digest includes counts and details of all events that occurred since the last digest.
-
-#### Customizable Message Templates
-
-Customize the content of your notification messages using templates with variables:
-
-1. Go to **Settings** > **Notifications** > **Templates** tab
-2. Click on any event type to edit its template
-3. Use the variable buttons to insert dynamic content
-4. Preview your template with sample data
-5. Click **Save** to apply changes
-
-**Available Variables by Event:**
-
-| Event | Variables |
-|-------|-----------|
-| Print Start | `{printer}`, `{filename}`, `{estimated_time}` |
-| Print Complete | `{printer}`, `{filename}`, `{duration}`, `{filament_grams}` |
-| Print Failed | `{printer}`, `{filename}`, `{duration}`, `{reason}` |
-| Print Progress | `{printer}`, `{filename}`, `{progress}`, `{remaining_time}` |
-| Printer Offline | `{printer}` |
-| Printer Error | `{printer}`, `{error_type}`, `{error_detail}` |
-| Filament Low | `{printer}`, `{slot}`, `{remaining_percent}`, `{color}` |
-
-Common variables available for all events: `{timestamp}`, `{app_name}`
-
-**Reset to Default:** Click the reset button on any template to restore the original message.
-
-### Spoolman Integration
-
-Bambuddy integrates with [Spoolman](https://github.com/Donkie/Spoolman) for filament inventory management. When enabled, AMS filament data syncs with your Spoolman server, allowing you to track remaining filament across all your spools.
-
-#### Prerequisites
-
-- A running Spoolman server (self-hosted or Docker)
-- Bambu Lab spools with original RFID tags in your AMS
-- Spools registered in Spoolman with matching filament types
-
-#### Setting Up Spoolman
-
-1. Go to **Settings** > scroll to **Spoolman Integration**
-2. Enable the **Enable Spoolman** toggle
-3. Enter your Spoolman server URL (e.g., `http://192.168.1.100:7912`)
-4. Click **Save**
-5. Click **Connect** to establish the connection
-
-#### Sync Modes
-
-| Mode | Description |
-|------|-------------|
-| **Automatic** | AMS data syncs automatically when changes are detected (filament loaded/unloaded, usage during prints) |
-| **Manual Only** | Only sync when you click the Sync button |
-
-#### Manual Sync
-
-When connected:
-1. Select a specific printer from the dropdown, or "All Printers"
-2. Click **Sync** to sync AMS data to Spoolman
-3. Results show how many trays were synced
-
-#### How Syncing Works
-
-Bambuddy matches AMS spools to Spoolman spools using the **tray UUID** - a unique 32-character identifier that Bambu Lab assigns to each original spool. This ensures consistent matching across different printer models.
-
-**What gets synced:**
-- Remaining filament weight (from AMS sensor)
-- Filament usage during prints (deducted from Spoolman inventory)
-
-**Auto-Creation:**
-- When a Bambu Lab spool is detected that doesn't exist in Spoolman, it's automatically created
-- Filament types are matched by material and color, or created if needed
-- The "Bambu Lab" vendor is auto-created if it doesn't exist
-- New spools include a comment noting they were auto-created
-
-**Limitations:**
-- Only **Bambu Lab original spools** can be synced (they have valid tray UUIDs)
-- Third-party spools (SpoolEase, refilled spools, etc.) are gracefully skipped - they won't cause errors
-
-#### Troubleshooting Spoolman
-
-**Third-party spools showing in AMS:**
-- SpoolEase and other third-party spools are automatically skipped during sync
-- This is normal behavior - they don't have Bambu Lab tray UUIDs
-
-**Connection issues:**
-- Verify the Spoolman URL is accessible from your Bambuddy server
-- Check that no firewall is blocking port 7912 (or your custom port)
-- Ensure Spoolman is running and healthy
-
-#### Provider Setup Guides
-
-**WhatsApp (CallMeBot):**
-1. Add CallMeBot to your contacts: +34 644 51 95 23
-2. Send "I allow callmebot to send me messages" via WhatsApp
-3. You'll receive an API key
-4. Enter your phone number (with country code) and API key in Bambuddy
-
-**ntfy:**
-1. Choose a unique topic name (e.g., `my-printer-alerts-xyz123`)
-2. Subscribe to it on your phone using the ntfy app or web interface
-3. Enter the topic name in Bambuddy (server defaults to ntfy.sh)
-
-**Pushover:**
-1. Create an account at [pushover.net](https://pushover.net/)
-2. Create an application to get an API token
-3. Enter your user key and app token in Bambuddy
-
-**Telegram:**
-1. Message @BotFather on Telegram to create a bot
-2. Get your chat ID by messaging @userinfobot
-3. Enter the bot token and chat ID in Bambuddy
-
-**Email:**
-1. Configure your SMTP server settings
-2. For Gmail, use an App Password (not your regular password)
-3. Choose security mode: STARTTLS (port 587), SSL (port 465), or None (port 25)
-4. Enable/disable authentication as needed
-
-**Discord:**
-1. In your Discord server, go to channel settings > Integrations > Webhooks
-2. Click "New Webhook" and customize the name/avatar if desired
-3. Copy the webhook URL
-4. Paste the webhook URL in Bambuddy
-
-**Webhook (Generic):**
-1. Enter any URL that accepts POST requests
-2. Optionally add custom headers (e.g., Authorization tokens)
-3. Bambuddy sends JSON payloads with event details
-4. Useful for integrating with custom systems, Home Assistant, IFTTT, etc.
-
-## Tech Stack
-
-- **Backend**: Python / FastAPI
-- **Frontend**: React / TypeScript / Tailwind CSS
-- **Database**: SQLite
-- **3D Viewer**: Three.js
-- **Printer Communication**: MQTT (TLS) + FTPS
-
-## Project Structure
-
-```
-bambuddy/
-├── backend/
-│   └── app/
-│       ├── api/routes/      # API endpoints
-│       ├── core/            # Config, database
-│       ├── models/          # SQLAlchemy models
-│       ├── schemas/         # Pydantic schemas
-│       └── services/        # Business logic (MQTT, FTP, etc.)
-├── frontend/                # React application
-├── static/                  # Built frontend + images
-├── archive/                 # Stored 3MF files
-└── bambuddy.db              # SQLite database
+# Frontend (separate terminal)
+cd frontend && npm install && npm run dev
 ```
 
-## API Documentation
-
-Once running, API documentation is available at:
-- Swagger UI: http://localhost:8000/docs
-- ReDoc: http://localhost:8000/redoc
-
-## Contributing
-
-Contributions are welcome! Please feel free to submit a Pull Request.
-
-1. Fork the repository
-2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
-3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
-4. Push to the branch (`git push origin feature/AmazingFeature`)
-5. Open a Pull Request
-
-## Troubleshooting
-
-### Printer won't connect
-
-1. **Check LAN Mode is enabled** on your printer (Settings > Network > LAN Mode)
-2. **Verify the Access Code** - it changes when you toggle LAN Mode
-3. **Check network connectivity** - printer and server must be on the same network
-4. **Firewall issues** - ensure ports 8883 (MQTT) and 990 (FTPS) are not blocked
-5. **Correct Serial Number** - find it in printer settings under Device Info
+See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
 
-### "Connection refused" errors
-
-- The printer may be in sleep mode - wake it up and try again
-- Check if another application is connected (only one MQTT connection allowed)
-- Restart the printer if issues persist
-
-### 3MF files not archiving automatically
-
-- Ensure the printer is connected (green status indicator)
-- Check that the print completed successfully
-- Look at the server logs for any error messages
-
-### Frontend not loading
-
-- Make sure you built the frontend: `cd frontend && npm run build`
-- Check that the `/static` folder contains `index.html` and `/assets`
-- Clear browser cache and hard refresh (Ctrl+Shift+R)
-
-### Database errors
-
-The SQLite database (`bambuddy.db`) is created automatically. If you encounter issues:
-
-```bash
-# Backup and reset database
-mv bambuddy.db bambuddy.db.backup
-# Restart the application - a new database will be created
-```
+---
 
-### View server logs
+## 📄 License
 
-Bambuddy writes logs to `bambuddy.log` in the application directory (rotating, max 5MB × 3 files).
+MIT License — see [LICENSE](LICENSE) for details.
 
-```bash
-# View live log file
-tail -f bambuddy.log
-
-# If running directly with verbose output
-uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --log-level debug
+---
 
-# If running as systemd service
-sudo journalctl -u bambuddy -f
-```
+## 🙏 Acknowledgments
 
-### Smart plug not responding
-
-1. **Check the IP address** - Make sure the plug is on the same network and the IP hasn't changed
-2. **Test via browser** - Visit `http://<plug-ip>/cm?cmnd=Power` to test directly
-3. **Check Tasmota web interface** - Access `http://<plug-ip>` to verify Tasmota is running
-4. **Authentication** - If Tasmota has a password set, configure it in the plug settings
-5. **Firewall** - Ensure port 80 is accessible between Bambuddy server and the plug
-
-### Auto power-off not working
-
-1. **Check plug is linked** - The plug must be linked to a printer for automation
-2. **Verify automation is enabled** - Check the Enabled, Auto On, and Auto Off toggles
-3. **Temperature mode issues** - If using temperature mode, ensure the printer is still connected so Bambuddy can read the nozzle temperature
-
-### Scheduled print not starting
-
-1. **Check printer connection** - The printer must be able to connect after power-on
-2. **Verify smart plug** - If using auto power-on, ensure the smart plug is configured and working
-3. **Check queue status** - Look at the queue page for error messages
-4. **Time zone issues** - Scheduled times are in your local time zone; ensure your system clock is correct
-5. **View logs** - Check `bambuddy.log` for detailed error messages
-
-### Print queue shows "Failed to start"
-
-Common causes:
-- **Printer not ready** - The printer needs to be idle and connected
-- **File upload failed** - Check FTP connectivity to the printer
-- **HMS errors** - Check the printer for any health system errors that prevent printing
-
-### Timelapse not attaching automatically
-
-**The Problem:**
-When printers run in **LAN-only mode** (disconnected from Bambu Cloud), they cannot sync time via NTP. This causes the printer's internal clock to drift significantly (sometimes days or weeks off). Bambuddy matches timelapses by comparing the print completion time with the timelapse file's modification time - when the printer's clock is wrong, this matching fails.
-
-**Symptoms:**
-- "Scan for Timelapse" shows "No matching timelapse found"
-- Timelapse files exist on the printer but don't auto-attach
-- Printer shows incorrect date/time in its settings
-
-**Workaround - Manual Selection:**
-When automatic matching fails, Bambuddy now offers manual timelapse selection:
-
-1. Right-click the archive and select **"Scan for Timelapse"**
-2. If no match is found, a dialog appears showing all available timelapse files on the printer
-3. Files are sorted by date (newest first) with size information
-4. Select the correct timelapse and click to attach it
-
-**Permanent Fix:**
-To fix the printer's clock:
-1. Temporarily connect the printer to the internet (via router or mobile hotspot)
-2. Wait for the printer to sync time via NTP
-3. Return to LAN-only mode - the clock should remain accurate until the next power cycle
-
-**Note:** Some users report the clock resets after power cycling. In this case, you'll need to either:
-- Periodically connect to the internet to sync time
-- Use the manual timelapse selection feature
-
-## Known Issues / Roadmap
-
-### Beta Limitations
-- [ ] Docker support not yet available
-- [ ] No user authentication (single-user only)
-- [ ] Limited to local network printers
-
-### Planned Features
-- [x] Timelapse video integration
-- [x] Smart plug integration (Tasmota)
-- [x] Print time accuracy tracking
-- [x] Duplicate detection
-- [x] HMS error monitoring
-- [x] MQTT debug logging
-- [x] Embedded project page editor
-- [x] QR code labels
-- [x] Energy monitoring and statistics
-- [x] Print scheduling and queuing
-- [x] Automatic finish photo capture
-- [x] K-Profiles management (pressure advance)
-- [x] Push notifications (WhatsApp, ntfy, Pushover, Telegram, Email, Discord, Webhook)
-- [x] Notification message templates
-- [x] Daily digest notifications
-- [x] Spoolman integration (filament inventory sync)
-- [x] Maintenance tracker
-- [x] Multi-language support (English, German)
-- [x] Smart plug scheduling and power alerts
-- [x] Auto updates from GitHub releases
-- [x] Cloud Profiles template system and diff view
-- [ ] Full printer control
-- [ ] Mobile-optimized UI
-- [ ] docs: readme -> wiki
-
-## License
-
-This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
-
-## Acknowledgments
-
-- [Bambu Lab](https://bambulab.com/) for making great printers
-- The reverse engineering community for documenting the Bambu Lab protocol
-- All contributors and testers
+- [Bambu Lab](https://bambulab.com/) for amazing printers
+- The reverse engineering community for protocol documentation
+- All testers and contributors
 
 ---
 
 <p align="center">
   Made with ❤️ for the 3D printing community
+  <br><br>
+  <a href="https://github.com/maziggy/bambuddy/issues">Report Bug</a> •
+  <a href="https://github.com/maziggy/bambuddy/issues">Request Feature</a> •
+  <a href="https://github.com/maziggy/bambuddy/wiki">Documentation</a>
 </p>

+ 305 - 0
docs/wiki/API-Reference.md

@@ -0,0 +1,305 @@
+# API Reference
+
+Bambuddy provides a REST API for programmatic access to all features.
+
+## Interactive Documentation
+
+When Bambuddy is running, access interactive API docs:
+
+- **Swagger UI**: http://localhost:8000/docs
+- **ReDoc**: http://localhost:8000/redoc
+
+These provide:
+- Complete endpoint documentation
+- Request/response schemas
+- Try-it-out functionality
+- Authentication details
+
+---
+
+## Base URL
+
+```
+http://localhost:8000/api/v1
+```
+
+Replace `localhost:8000` with your server address.
+
+---
+
+## Authentication
+
+Currently, Bambuddy does not require authentication for API access. The API is intended for local network use.
+
+> **Note**: Future versions may add authentication. Keep your Bambuddy instance on a trusted network.
+
+---
+
+## Endpoints Overview
+
+### Printers
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/printers` | List all printers |
+| POST | `/printers` | Add a new printer |
+| GET | `/printers/{id}` | Get printer details |
+| PUT | `/printers/{id}` | Update printer |
+| DELETE | `/printers/{id}` | Delete printer |
+| POST | `/printers/{id}/connect` | Connect to printer |
+| POST | `/printers/{id}/disconnect` | Disconnect from printer |
+
+### Archives
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/archives` | List all archives |
+| GET | `/archives/{id}` | Get archive details |
+| DELETE | `/archives/{id}` | Delete archive |
+| POST | `/archives/{id}/reprint` | Send to printer |
+| GET | `/archives/{id}/download` | Download 3MF file |
+| POST | `/archives/{id}/photos` | Upload photo |
+
+### Print Queue
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/queue` | List all queue items |
+| POST | `/queue` | Add to queue |
+| GET | `/queue/{id}` | Get queue item |
+| DELETE | `/queue/{id}` | Remove from queue |
+| PUT | `/queue/{id}/reorder` | Change queue position |
+| POST | `/queue/{id}/cancel` | Cancel queued print |
+
+### Smart Plugs
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/smart-plugs` | List all smart plugs |
+| POST | `/smart-plugs` | Add smart plug |
+| GET | `/smart-plugs/{id}` | Get plug details |
+| PUT | `/smart-plugs/{id}` | Update plug |
+| DELETE | `/smart-plugs/{id}` | Delete plug |
+| POST | `/smart-plugs/{id}/on` | Turn on |
+| POST | `/smart-plugs/{id}/off` | Turn off |
+| GET | `/smart-plugs/{id}/status` | Get current status |
+
+### Notifications
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/notifications/providers` | List providers |
+| POST | `/notifications/providers` | Add provider |
+| PUT | `/notifications/providers/{id}` | Update provider |
+| DELETE | `/notifications/providers/{id}` | Delete provider |
+| POST | `/notifications/providers/{id}/test` | Send test |
+| GET | `/notifications/templates` | Get templates |
+| PUT | `/notifications/templates/{event}` | Update template |
+
+### Settings
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/settings` | Get all settings |
+| PUT | `/settings` | Update settings |
+| GET | `/settings/filaments` | List filaments |
+| POST | `/settings/filaments` | Add filament |
+
+### Maintenance
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/maintenance/types` | List maintenance types |
+| POST | `/maintenance/types` | Create type |
+| GET | `/maintenance/status` | Get maintenance status |
+| POST | `/maintenance/log` | Log maintenance |
+
+### Cloud Profiles
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/cloud/profiles` | List profiles |
+| POST | `/cloud/sync` | Sync with cloud |
+| GET | `/cloud/profiles/{id}` | Get profile |
+| POST | `/cloud/templates` | Create template |
+
+### Updates
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| GET | `/updates/check` | Check for updates |
+| POST | `/updates/apply` | Apply update |
+| GET | `/updates/status` | Get update status |
+
+---
+
+## WebSocket
+
+Real-time updates via WebSocket:
+
+```
+ws://localhost:8000/api/v1/ws
+```
+
+### Connection
+```javascript
+const ws = new WebSocket('ws://localhost:8000/api/v1/ws');
+
+ws.onmessage = (event) => {
+  const data = JSON.parse(event.data);
+  console.log('Event:', data.type, data.payload);
+};
+```
+
+### Event Types
+
+| Event | Description |
+|-------|-------------|
+| `printer_state` | Printer status update |
+| `print_progress` | Print progress update |
+| `print_complete` | Print finished |
+| `print_failed` | Print failed |
+| `queue_update` | Queue changed |
+| `notification` | System notification |
+
+### Message Format
+```json
+{
+  "type": "printer_state",
+  "printer_id": 1,
+  "payload": {
+    "status": "printing",
+    "progress": 45,
+    "nozzle_temp": 210,
+    "bed_temp": 60
+  }
+}
+```
+
+---
+
+## Common Response Formats
+
+### Success Response
+```json
+{
+  "success": true,
+  "data": { ... }
+}
+```
+
+### Error Response
+```json
+{
+  "success": false,
+  "error": {
+    "code": "PRINTER_NOT_FOUND",
+    "message": "Printer with ID 123 not found"
+  }
+}
+```
+
+### List Response
+```json
+{
+  "success": true,
+  "data": [ ... ],
+  "pagination": {
+    "total": 100,
+    "page": 1,
+    "per_page": 20
+  }
+}
+```
+
+---
+
+## Example Requests
+
+### List Printers
+```bash
+curl http://localhost:8000/api/v1/printers
+```
+
+### Add Printer
+```bash
+curl -X POST http://localhost:8000/api/v1/printers \
+  -H "Content-Type: application/json" \
+  -d '{
+    "name": "Workshop X1C",
+    "ip_address": "192.168.1.100",
+    "access_code": "12345678",
+    "serial_number": "00M00A000000000"
+  }'
+```
+
+### Get Archives
+```bash
+curl "http://localhost:8000/api/v1/archives?limit=10&offset=0"
+```
+
+### Schedule Print
+```bash
+curl -X POST http://localhost:8000/api/v1/queue \
+  -H "Content-Type: application/json" \
+  -d '{
+    "archive_id": 42,
+    "printer_id": 1,
+    "scheduled_time": "2024-01-15T14:00:00Z",
+    "auto_power_off": true
+  }'
+```
+
+### Control Smart Plug
+```bash
+# Turn on
+curl -X POST http://localhost:8000/api/v1/smart-plugs/1/on
+
+# Turn off
+curl -X POST http://localhost:8000/api/v1/smart-plugs/1/off
+```
+
+### Send Test Notification
+```bash
+curl -X POST http://localhost:8000/api/v1/notifications/providers/1/test
+```
+
+---
+
+## Rate Limiting
+
+Currently no rate limiting is implemented. For high-frequency polling, consider using WebSocket instead.
+
+---
+
+## Error Codes
+
+| Code | Description |
+|------|-------------|
+| `PRINTER_NOT_FOUND` | Printer ID doesn't exist |
+| `PRINTER_OFFLINE` | Printer not connected |
+| `ARCHIVE_NOT_FOUND` | Archive ID doesn't exist |
+| `QUEUE_ITEM_NOT_FOUND` | Queue item doesn't exist |
+| `PLUG_NOT_FOUND` | Smart plug doesn't exist |
+| `PLUG_OFFLINE` | Smart plug not responding |
+| `INVALID_REQUEST` | Request validation failed |
+| `FTP_ERROR` | File transfer failed |
+| `MQTT_ERROR` | Printer communication failed |
+
+---
+
+## SDK / Client Libraries
+
+No official client libraries yet. The API is standard REST and can be consumed with:
+- `fetch` / `axios` (JavaScript)
+- `requests` / `httpx` (Python)
+- `curl` (command line)
+- Any HTTP client
+
+---
+
+## Webhooks (Outgoing)
+
+Configure outgoing webhooks in notification settings. Bambuddy sends POST requests to your URL with JSON payloads for print events.
+
+See [Push Notifications](Features-Notifications#webhook-generic) for details.

+ 245 - 0
docs/wiki/Features-Cloud-Profiles.md

@@ -0,0 +1,245 @@
+# Cloud Profiles
+
+Access and manage your Bambu Cloud slicer presets with powerful template and comparison features.
+
+## Overview
+
+Cloud Profiles syncs with your Bambu Cloud account to provide:
+- View and manage filament, printer, and process presets
+- Template system for quick preset creation
+- Side-by-side preset comparison with diff view
+- Local storage of synced presets
+
+---
+
+## Connecting to Bambu Cloud
+
+### Step 1: Get Your Credentials
+You'll need your Bambu Cloud account credentials or access token.
+
+### Step 2: Configure in Bambuddy
+1. Go to **Settings** > **Cloud Profiles**
+2. Enter your credentials
+3. Click **Connect**
+4. Presets will sync automatically
+
+### Step 3: Verify Connection
+- Status shows "Connected"
+- Presets appear in the Cloud Profiles page
+
+---
+
+## Preset Types
+
+### Filament Presets
+Settings for specific filament types:
+- Temperature profiles
+- Cooling settings
+- Retraction settings
+- Flow calibration
+
+### Printer Presets
+Machine-specific settings:
+- Build volume
+- Speed limits
+- Acceleration values
+- Hardware capabilities
+
+### Process Presets
+Print quality and speed settings:
+- Layer height
+- Print speed
+- Infill patterns
+- Support settings
+
+---
+
+## Browsing Presets
+
+### Filtering
+- **By Type**: Filament, Printer, Process
+- **By Source**: Official, User-created, Templates
+- **Search**: Find by name
+
+### Preset Cards
+Each preset shows:
+- Name and type
+- Source (official/user)
+- Base preset (if derived)
+- Last modified date
+
+### Preset Details
+Click a preset to view:
+- All settings and values
+- Base preset reference
+- Modification history
+
+---
+
+## Template System
+
+Create reusable templates from any preset for quick preset creation.
+
+### Creating a Template
+
+1. Find a preset you want to use as a base
+2. Click the template icon (or right-click > "Save as Template")
+3. Give the template a name
+4. Template is saved for future use
+
+### Template Visibility
+
+Control which templates appear in creation modals:
+1. Go to template management
+2. Toggle visibility for each template
+3. Only visible templates show in dropdowns
+
+### Using Templates
+
+When creating a new preset:
+1. Click "New Preset"
+2. Select a template from the dropdown
+3. Template settings are pre-filled
+4. Modify as needed
+5. Save the new preset
+
+---
+
+## Preset Comparison
+
+Compare presets side-by-side to understand differences.
+
+### Compare with Base
+
+See what's changed from the original preset:
+1. Open a preset that's derived from another
+2. Click "Compare with Base"
+3. View differences highlighted
+
+### Compare Any Two Presets
+
+Compare any presets of the same type:
+1. Select first preset
+2. Click "Compare"
+3. Select second preset
+4. View side-by-side diff
+
+### Diff View Features
+
+| Feature | Description |
+|---------|-------------|
+| **Added** | Settings only in new preset (green) |
+| **Removed** | Settings only in base preset (red) |
+| **Changed** | Different values (yellow) |
+| **Search** | Filter diff by setting name |
+| **Statistics** | Count of changes by type |
+
+---
+
+## Managing Presets
+
+### Editing Presets
+1. Open the preset
+2. Click "Edit"
+3. Modify settings
+4. Save changes
+
+> Note: Official presets cannot be edited. Create a copy first.
+
+### Creating Presets
+1. Click "New Preset"
+2. Select preset type
+3. Choose a base preset or template
+4. Configure settings
+5. Save with a unique name
+
+### Deleting Presets
+1. Right-click the preset
+2. Select "Delete"
+3. Confirm deletion
+
+> Official presets cannot be deleted.
+
+---
+
+## Syncing
+
+### Automatic Sync
+Presets sync periodically with Bambu Cloud:
+- New presets downloaded
+- Changes uploaded
+- Deleted presets removed
+
+### Manual Sync
+Force a sync:
+1. Go to Cloud Profiles page
+2. Click "Sync Now"
+3. Wait for sync to complete
+
+### Sync Status
+- **Synced**: Up to date with cloud
+- **Pending**: Local changes not yet uploaded
+- **Conflict**: Different changes locally and in cloud
+
+---
+
+## Local Storage
+
+Synced presets are stored locally:
+- Available offline after initial sync
+- Faster loading times
+- Backup of your presets
+
+### Storage Location
+Presets stored in SQLite database alongside other Bambuddy data.
+
+---
+
+## Use Cases
+
+### Standardizing Settings
+1. Create a "Standard PLA" preset with your preferred settings
+2. Save as template
+3. Use template for all PLA prints
+4. Consistent quality across prints
+
+### Experimenting Safely
+1. Copy an existing preset
+2. Make experimental changes
+3. Compare with original
+4. Keep or discard based on results
+
+### Team Sharing
+1. Create optimized presets
+2. Export or share via Bambu Cloud
+3. Team members sync the same presets
+4. Consistent settings across all printers
+
+---
+
+## Troubleshooting
+
+### Connection Failed
+- Verify credentials are correct
+- Check internet connection
+- Try logging out and back in to Bambu Cloud
+
+### Presets Not Appearing
+- Force a manual sync
+- Check filter settings
+- Verify presets exist in Bambu Cloud
+
+### Sync Conflicts
+- Local changes may conflict with cloud
+- Review differences in comparison view
+- Choose which version to keep
+
+---
+
+## Tips
+
+- Use templates for consistent starting points
+- Compare before and after making changes
+- Keep official presets as reference
+- Create project-specific presets
+- Regular syncs ensure latest settings

+ 186 - 0
docs/wiki/Features-External-Links.md

@@ -0,0 +1,186 @@
+# External Sidebar Links
+
+Add custom links to external tools directly in the sidebar navigation.
+
+## Overview
+
+External links let you:
+- Add quick access to other tools
+- Customize the sidebar with your frequently used services
+- Embed external pages within Bambuddy
+
+---
+
+## Use Cases
+
+Quick access to:
+- **OctoPrint** or **Mainsail** (other print managers)
+- **Spoolman** (filament inventory)
+- **Obico** (AI print monitoring)
+- **Home Assistant** (home automation)
+- Documentation or reference sites
+- Internal dashboards
+
+---
+
+## Adding External Links
+
+1. Go to **Settings**
+2. Scroll to **Sidebar Links**
+3. Click **Add Link**
+4. Configure:
+   - **Name**: Display name for the link
+   - **URL**: Full URL to the external site
+   - **Icon**: Choose icon type
+5. Click **Save**
+
+---
+
+## Link Configuration
+
+### Name
+- Display text shown in sidebar
+- Keep it short (1-2 words)
+- Examples: "Spoolman", "OctoPrint", "Docs"
+
+### URL
+- Full URL including protocol
+- Examples:
+  - `http://192.168.1.100:7912` (Spoolman)
+  - `https://docs.example.com`
+  - `http://octopi.local`
+
+### Icon Options
+
+**Built-in Icons**
+Choose from common icons:
+- Link icon
+- External link icon
+- Home icon
+- Settings icon
+- And more...
+
+**Custom Icons**
+Upload your own:
+1. Select "Custom Icon"
+2. Upload an SVG file
+3. Icon is stored and displayed
+
+---
+
+## Managing Links
+
+### Reordering
+Drag links to change their position:
+1. Hover over the link
+2. Click and hold the grip handle
+3. Drag to new position
+4. Release to drop
+
+Links can be mixed with internal navigation items.
+
+### Editing
+1. Click the pencil icon on a link
+2. Modify settings
+3. Click **Save**
+
+### Deleting
+1. Click the trash icon on a link
+2. Confirm deletion
+
+---
+
+## How Links Open
+
+### Embedded Mode (Default)
+External pages open in an iframe within Bambuddy:
+- Stays within Bambuddy interface
+- Quick switching between tools
+- Sidebar remains accessible
+
+### New Tab
+Some sites require opening in a new tab:
+- Sites that block iframe embedding
+- Complex applications
+- When you need full browser features
+
+---
+
+## Iframe Limitations
+
+Some websites block iframe embedding for security:
+
+### Common Restrictions
+- `X-Frame-Options` header set to DENY
+- Content Security Policy restrictions
+- Same-origin policy violations
+
+### Affected Sites
+Sites that typically don't work in iframes:
+- Google services
+- Social media sites
+- Banking/financial sites
+- Some cloud dashboards
+
+### Workaround
+If a site doesn't load in the iframe:
+1. Right-click the link
+2. Select "Open in New Tab"
+3. Or configure the link to always open externally
+
+---
+
+## Icon Upload
+
+### Supported Formats
+- SVG (recommended)
+- PNG
+- JPG
+
+### Icon Guidelines
+- Square aspect ratio works best
+- Keep file size small (<50KB)
+- Simple designs show better at sidebar size
+- SVG scales best at any size
+
+### Finding Icons
+Sources for icons:
+- [Lucide Icons](https://lucide.dev/)
+- [Simple Icons](https://simpleicons.org/)
+- [Heroicons](https://heroicons.com/)
+- Product brand guidelines (for official logos)
+
+---
+
+## Examples
+
+### Spoolman
+```
+Name: Spoolman
+URL: http://192.168.1.100:7912
+Icon: Built-in database icon
+```
+
+### Home Assistant
+```
+Name: Home
+URL: http://homeassistant.local:8123
+Icon: Custom (Home Assistant logo SVG)
+```
+
+### Documentation
+```
+Name: Docs
+URL: https://wiki.example.com
+Icon: Built-in book icon
+```
+
+---
+
+## Tips
+
+- Keep link names short for cleaner sidebar
+- Use custom icons for brand recognition
+- Test iframe embedding before relying on it
+- Group related links by ordering them together
+- Remove unused links to keep sidebar clean

+ 171 - 0
docs/wiki/Features-File-Manager.md

@@ -0,0 +1,171 @@
+# File Manager
+
+Browse and manage files on your printer's internal storage.
+
+## Overview
+
+The File Manager allows you to:
+- Browse files on printer's SD card
+- View file details and thumbnails
+- Delete unwanted files
+- Free up storage space
+
+---
+
+## Accessing File Manager
+
+1. Go to **Printers** page
+2. Click on a connected printer
+3. Select **File Manager** or click the folder icon
+
+---
+
+## File Browser
+
+### Navigation
+- **Folder tree**: Navigate directory structure
+- **Breadcrumbs**: Quick path navigation
+- **Back button**: Return to parent folder
+
+### File List
+Each file shows:
+- **Thumbnail**: Preview image (for 3MF files)
+- **Name**: Filename
+- **Size**: File size
+- **Date**: Last modified date
+- **Type**: File type icon
+
+### Sorting
+Sort files by:
+- Name (A-Z, Z-A)
+- Date (newest, oldest)
+- Size (largest, smallest)
+
+---
+
+## File Types
+
+### 3MF Files
+Print files with:
+- Model geometry
+- Slicer settings
+- Thumbnails
+- Metadata
+
+### Timelapse Videos
+Recorded print timelapses:
+- MP4 format
+- Stored in timelapse folder
+- Can be downloaded or deleted
+
+### Other Files
+- Gcode files (legacy)
+- Log files
+- Cache files
+
+---
+
+## Managing Files
+
+### Viewing Details
+Click a file to see:
+- Full filename
+- File size
+- Created/modified date
+- Preview (if available)
+
+### Deleting Files
+1. Select file(s) to delete
+2. Click **Delete**
+3. Confirm deletion
+
+> Deleted files cannot be recovered!
+
+### Downloading Files
+1. Click on a file
+2. Select **Download**
+3. File downloads to your computer
+
+---
+
+## Storage Information
+
+### Space Usage
+View storage status:
+- Total capacity
+- Used space
+- Available space
+- Usage percentage
+
+### Low Storage Warning
+Bambuddy warns when storage is low:
+- Yellow warning at 80% full
+- Red warning at 95% full
+
+---
+
+## Common Operations
+
+### Freeing Up Space
+To free storage:
+1. Delete old timelapse videos
+2. Remove failed print files
+3. Clear cache files
+4. Delete prints you won't reprint
+
+### Finding Large Files
+1. Sort by size (largest first)
+2. Identify large files to remove
+3. Timelapses are usually the largest
+
+### Cleaning Up Timelapses
+Timelapses consume significant storage:
+1. Navigate to timelapse folder
+2. Sort by date
+3. Delete old timelapses you don't need
+
+---
+
+## FTP Connection
+
+File Manager uses FTPS to connect:
+- Port 990 (implicit FTPS)
+- Encrypted connection
+- Same credentials as printer connection
+
+### Connection Issues
+If File Manager won't connect:
+- Verify printer is online
+- Check FTP port (990) is accessible
+- Ensure LAN Mode is enabled
+- Try reconnecting the printer
+
+---
+
+## Limitations
+
+### Read-Only Folders
+Some folders are system-protected:
+- Cannot delete system files
+- Cannot modify firmware files
+
+### File Upload
+Currently not supported:
+- Use Bambu Studio for uploads
+- Or use the print queue feature
+
+### Simultaneous Access
+Only one FTP connection at a time:
+- Close other FTP clients
+- Bambu Studio may hold connection
+- Wait and retry if busy
+
+---
+
+## Tips
+
+- Regularly clean up timelapses to save space
+- Download important files for backup
+- Delete failed print files promptly
+- Check storage before starting large prints
+- Keep 20%+ storage free for new prints

+ 205 - 0
docs/wiki/Features-K-Profiles.md

@@ -0,0 +1,205 @@
+# K-Profiles (Pressure Advance)
+
+Manage pressure advance settings directly on your printers for improved print quality.
+
+## What Are K-Profiles?
+
+K-profiles store pressure advance (also called Linear Advance) settings:
+- Compensate for filament compression in the extruder
+- Reduce corner bulging and improve sharp edges
+- Different values needed for different filaments and speeds
+
+### K-Value Basics
+| Material | Typical K-Value Range |
+|----------|----------------------|
+| PLA | 0.01 - 0.06 |
+| PETG | 0.02 - 0.10 |
+| ABS | 0.02 - 0.08 |
+| TPU | 0.10 - 0.30 |
+
+> Lower values = less compensation. Higher values = more compensation.
+
+---
+
+## Accessing K-Profiles
+
+1. Go to **Settings** > **K-Profiles**
+2. Select a connected printer from the dropdown
+3. Choose a nozzle size (0.2, 0.4, 0.6, 0.8mm)
+4. Profiles are loaded from the printer
+
+---
+
+## Viewing Profiles
+
+### Profile Cards
+Each profile displays:
+- **K-Value**: The pressure advance factor
+- **Profile Name**: Usually the filament name
+- **Filament ID**: Material identifier
+- **Flow Type**: HF (High Flow) or S (Standard)
+
+### Filtering Options
+- **Search**: Filter by profile name or filament ID
+- **Nozzle Size**: 0.2, 0.4, 0.6, 0.8mm
+- **Flow Type**: All, HF Only, or S Only
+- **Extruder**: All, Left Only, or Right Only (dual-nozzle)
+
+---
+
+## Dual-Nozzle Printers (H2 Series)
+
+For H2D, H2C, and H2S printers with dual nozzles:
+
+### Automatic Detection
+Bambuddy detects nozzle count from MQTT temperature data:
+- Single nozzle: Standard interface
+- Dual nozzle: Left/Right column layout
+
+### Column Layout
+Profiles are organized by extruder:
+- **Left Column**: Left extruder profiles
+- **Right Column**: Right extruder profiles
+
+### Extruder Filter
+Show profiles for one extruder only:
+- All (default)
+- Left Only
+- Right Only
+
+---
+
+## Editing K-Profiles
+
+1. Click on any profile card
+2. Edit modal opens with current values
+3. Modify the K-value
+4. Click **Save**
+5. Profile is updated on the printer
+
+### K-Value Guidelines
+- Start with recommended values for your material
+- Increase if you see corner bulging
+- Decrease if you see gaps at corners
+- Small changes (0.01-0.02) make noticeable differences
+
+---
+
+## Adding K-Profiles
+
+1. Click **Add Profile** in the header
+2. Select a filament from the dropdown
+3. Choose flow type (High Flow or Standard)
+4. Choose nozzle size
+5. For dual-nozzle: Select Left or Right extruder
+6. Enter the K-value
+7. Click **Save**
+
+### Filament Selection
+The filament dropdown shows:
+- Filaments already calibrated on the printer
+- Materials from existing K-profiles
+
+> **Note**: New filaments must first be calibrated in Bambu Studio before they appear in this dropdown.
+
+---
+
+## Deleting K-Profiles
+
+1. Click on the profile card
+2. Click the trash icon
+3. Confirm deletion
+4. Profile is removed from the printer
+
+---
+
+## Calibrating K-Values
+
+Bambu Lab printers can auto-calibrate K-values:
+
+### In Bambu Studio
+1. Go to Calibration menu
+2. Select "Pressure Advance"
+3. Choose filament and settings
+4. Run calibration print
+5. Results saved to printer automatically
+
+### In Bambuddy
+After calibration in Bambu Studio:
+1. Profiles appear in K-Profiles page
+2. View and fine-tune values
+3. Add profiles for specific use cases
+
+---
+
+## Understanding Flow Types
+
+### High Flow (HF)
+- For high-speed printing
+- Faster extrusion rates
+- Usually needs lower K-value
+
+### Standard (S)
+- Normal printing speeds
+- Standard extrusion rates
+- Baseline K-value
+
+> Create separate profiles for HF and Standard if you print at varying speeds.
+
+---
+
+## Best Practices
+
+### Per-Material Profiles
+Create profiles for each material you use:
+- PLA (various brands may differ)
+- PETG
+- ABS
+- Specialty materials
+
+### Per-Nozzle Profiles
+Different nozzle sizes need different values:
+- 0.2mm: Usually lower K-values
+- 0.4mm: Standard K-values
+- 0.6mm+: May need adjustment
+
+### Testing Changes
+After modifying K-values:
+1. Print a test object (sharp corners work well)
+2. Examine corner quality
+3. Adjust K-value if needed
+4. Repeat until satisfied
+
+---
+
+## Troubleshooting
+
+### No Profiles Showing
+- Ensure printer is connected
+- Select the correct nozzle size
+- Check if any profiles exist (calibrate first)
+
+### Can't Add New Filaments
+- Filaments must be calibrated in Bambu Studio first
+- Bambuddy reads filament list from existing profiles
+- Run a calibration print to add new filaments
+
+### Dual-Nozzle Not Detected
+- Ensure printer is connected and communicating
+- Nozzle count detected from temperature data
+- Try disconnecting and reconnecting
+
+### Changes Not Saving
+- Verify printer connection is active
+- Check for error messages
+- Try refreshing the page
+
+---
+
+## Tips
+
+- Calibrate new filaments in Bambu Studio first
+- Fine-tune values in Bambuddy for quick adjustments
+- Document your optimal K-values for reference
+- Different brands of same material may need different values
+- Test with a simple calibration print after changes

+ 205 - 0
docs/wiki/Features-Maintenance.md

@@ -0,0 +1,205 @@
+# Maintenance Tracker
+
+Schedule and track printer maintenance to keep your printers in optimal condition.
+
+## Overview
+
+The maintenance tracker helps you:
+- Define maintenance tasks with intervals
+- Track when maintenance was last performed
+- Get reminders when maintenance is due
+- Log maintenance history
+
+---
+
+## Maintenance Types
+
+### Default Maintenance Tasks
+
+Bambuddy includes common maintenance types:
+
+| Task | Description | Suggested Interval |
+|------|-------------|-------------------|
+| Nozzle Change | Replace worn nozzle | 500 print hours |
+| Lubrication | Lubricate linear rails and lead screws | 200 print hours |
+| Belt Tension | Check and adjust belt tension | 100 print hours |
+| Clean Build Plate | Deep clean the print surface | 50 print hours |
+| Clean Nozzle | Remove debris from nozzle | 20 print hours |
+| Firmware Update | Check for firmware updates | 30 days |
+
+### Custom Maintenance Types
+
+Create your own maintenance tasks:
+1. Go to **Settings** > **Maintenance**
+2. Click **Add Maintenance Type**
+3. Configure:
+   - **Name**: Task description
+   - **Interval Type**: Print hours or calendar days
+   - **Interval Value**: How often (e.g., every 100 hours)
+   - **Description**: Detailed instructions (optional)
+4. Click **Save**
+
+---
+
+## Interval Types
+
+### Print Hours
+Maintenance triggered based on actual printing time:
+- Tracks cumulative print hours per printer
+- More accurate for wear-based maintenance
+- Example: "Every 500 print hours"
+
+### Calendar Days
+Maintenance triggered based on time passed:
+- Simple date-based tracking
+- Good for time-sensitive tasks
+- Example: "Every 30 days"
+
+---
+
+## Tracking Maintenance
+
+### Maintenance Page
+
+View all maintenance for all printers:
+- Status indicators (OK, Due, Overdue)
+- Next due date/hours
+- Last completed date
+
+### Per-Printer View
+
+See maintenance for a specific printer:
+1. Go to Printers page
+2. Click maintenance icon on printer card
+3. View that printer's maintenance status
+
+### Status Indicators
+
+| Status | Color | Meaning |
+|--------|-------|---------|
+| OK | Green | Not due yet |
+| Due Soon | Yellow | Due within 10% of interval |
+| Due | Orange | Maintenance interval reached |
+| Overdue | Red | Past due date/hours |
+
+---
+
+## Logging Maintenance
+
+When you perform maintenance:
+
+1. Find the maintenance task
+2. Click **Log Maintenance**
+3. Optionally add notes
+4. Click **Save**
+
+The tracker updates:
+- Last performed date
+- Next due date/hours calculated
+- Entry added to history
+
+---
+
+## Maintenance History
+
+View past maintenance for any task:
+1. Click on a maintenance task
+2. View history log showing:
+   - Date performed
+   - Print hours at time of maintenance
+   - Notes (if any)
+   - Who performed it (if tracked)
+
+---
+
+## Notifications
+
+Get notified when maintenance is due:
+
+### Enabling Notifications
+1. Go to **Settings** > **Notifications**
+2. Enable **Maintenance Due** event
+3. Configure provider(s)
+
+### Notification Timing
+- Sent when maintenance becomes due
+- Reminder sent if still due after 24 hours
+- No spam—one notification per due task
+
+---
+
+## Managing Maintenance Types
+
+### Editing Types
+1. Go to **Settings** > **Maintenance**
+2. Click on a maintenance type
+3. Modify settings
+4. Click **Save**
+
+### Deleting Types
+1. Go to **Settings** > **Maintenance**
+2. Click delete icon on a type
+3. Confirm deletion
+
+> Deleting a type removes it from all printers.
+
+### Per-Printer Customization
+Different printers may need different intervals:
+1. Go to printer's maintenance view
+2. Override interval for that printer
+3. Original type remains unchanged
+
+---
+
+## Print Hour Tracking
+
+Bambuddy automatically tracks print hours:
+- Accumulated during active prints
+- Stored per printer
+- Used for hour-based maintenance intervals
+
+### Viewing Print Hours
+- Displayed on printer cards
+- Available in statistics
+- Shown in maintenance calculations
+
+### Resetting Print Hours
+After major service (like a rebuild):
+1. Go to printer settings
+2. Find "Print Hours" section
+3. Click "Reset" or enter new value
+4. Maintenance intervals recalculate
+
+---
+
+## Best Practices
+
+### Regular Schedule
+- Check maintenance page weekly
+- Address "Due" items promptly
+- Don't ignore "Overdue" warnings
+
+### Document Everything
+- Add notes when logging maintenance
+- Record any issues found
+- Track parts replaced
+
+### Customize for Your Printers
+- Adjust intervals based on usage
+- Add tasks specific to your workflow
+- Remove irrelevant default tasks
+
+### Preventive vs Reactive
+- Preventive maintenance prevents failures
+- Cheaper than repairs
+- Less downtime
+
+---
+
+## Tips
+
+- Set conservative intervals initially, adjust based on experience
+- Use calendar-based intervals for firmware/software updates
+- Use print-hour intervals for wear-related maintenance
+- Enable notifications to never miss maintenance
+- Log maintenance immediately after performing it

+ 151 - 0
docs/wiki/Features-Monitoring.md

@@ -0,0 +1,151 @@
+# Real-time Monitoring
+
+Bambuddy provides live monitoring of all your connected Bambu Lab printers through WebSocket-based real-time updates.
+
+## Printer Status
+
+Each printer card displays real-time information:
+
+### Connection Status
+- **Green indicator**: Connected and communicating
+- **Red indicator**: Disconnected or connection error
+- **Yellow indicator**: Connecting or reconnecting
+
+### Temperature Readouts
+| Sensor | Description |
+|--------|-------------|
+| Nozzle | Current hotend temperature |
+| Bed | Heated bed temperature |
+| Chamber | Enclosure temperature (if available) |
+
+### Print Progress
+When a print is active:
+- **Progress bar**: Visual completion percentage
+- **Current layer**: Layer X of Y
+- **Time remaining**: Estimated time to completion
+- **Filament used**: Grams consumed
+
+---
+
+## HMS Error Monitoring
+
+The Health Management System (HMS) monitors printer health:
+
+### Status Indicator
+Always visible on printer cards:
+- **Green "OK"**: No issues detected
+- **Yellow**: Minor issues or warnings
+- **Orange**: Serious errors requiring attention
+- **Red**: Fatal errors - stop printing
+
+### Error Severity Levels
+| Level | Color | Action Required |
+|-------|-------|-----------------|
+| Info | Blue | Informational only |
+| Common | Yellow | Check when convenient |
+| Serious | Orange | Address before next print |
+| Fatal | Red | Immediate attention needed |
+
+### Error Details
+Click the HMS indicator to see:
+- Error code and description
+- Affected component
+- Recommended action
+- Link to Bambu Lab support article
+
+---
+
+## MQTT Debug Logging
+
+Built-in debugging tool for printer communication:
+
+### Starting Debug Logging
+1. Go to printer settings
+2. Click "Start MQTT Debug"
+3. Messages are captured in real-time
+
+### Viewing Messages
+- **Incoming**: Messages from printer to Bambuddy
+- **Outgoing**: Commands sent to printer
+- **JSON payloads**: Expandable for detailed inspection
+- **Auto-refresh**: New messages appear automatically
+
+### Use Cases
+- Troubleshooting connection issues
+- Understanding printer behavior
+- Debugging automation problems
+- Reporting issues to developers
+
+---
+
+## AMS (Automatic Material System)
+
+For printers with AMS units:
+
+### Slot Status
+- **Filament color**: Visual swatch for each slot
+- **Material type**: PLA, PETG, ABS, etc.
+- **Remaining**: Estimated filament left
+- **Temperature**: Drying chamber temp (if applicable)
+
+### Humidity Monitoring
+- Current humidity level in AMS
+- Warning indicators for high humidity
+
+---
+
+## Camera Feed
+
+Access your printer's camera:
+
+1. Click the camera icon on a printer card
+2. View live camera feed
+3. Take snapshots
+4. Monitor print progress visually
+
+### Camera Page
+Dedicated camera view with:
+- Larger video display
+- Multiple printer support
+- Snapshot history
+
+---
+
+## WebSocket Architecture
+
+Bambuddy uses WebSocket for real-time updates:
+
+```
+Printer → MQTT → Bambuddy Backend → WebSocket → Browser
+```
+
+### Connection Handling
+- Automatic reconnection on disconnect
+- State synchronization on reconnect
+- Efficient delta updates (only changed data)
+
+### Performance
+- Low latency updates (<1 second typical)
+- Minimal bandwidth usage
+- Multiple browser tabs supported
+
+---
+
+## Notifications on Status Changes
+
+Configure alerts for printer events:
+- **Printer Offline**: When connection is lost
+- **Printer Error**: When HMS errors occur
+- **Print Complete**: When a job finishes
+- **Print Failed**: When a print fails
+
+See [Push Notifications](Features-Notifications) for setup details.
+
+---
+
+## Tips
+
+- Keep the Printers page open for at-a-glance monitoring
+- Use the camera page for visual confirmation of print quality
+- Enable HMS error notifications to catch problems early
+- Check MQTT debug logs if a printer behaves unexpectedly

+ 277 - 0
docs/wiki/Features-Notifications.md

@@ -0,0 +1,277 @@
+# Push Notifications
+
+Get notified about print events via multiple channels including WhatsApp, Telegram, Discord, Email, and more.
+
+## Supported Providers
+
+| Provider | Description | Setup Complexity |
+|----------|-------------|------------------|
+| **WhatsApp** | Via CallMeBot service | Easy |
+| **ntfy** | Self-hosted or ntfy.sh | Very Easy |
+| **Pushover** | Dedicated push service | Easy |
+| **Telegram** | Via Telegram Bot | Medium |
+| **Email** | SMTP email | Medium |
+| **Discord** | Channel webhooks | Easy |
+| **Webhook** | Generic HTTP POST | Flexible |
+
+---
+
+## Adding a Notification Provider
+
+1. Go to **Settings** > **Notifications**
+2. Click **Add Provider**
+3. Select provider type
+4. Enter required configuration
+5. Click **Send Test** to verify
+6. Configure event triggers
+7. Click **Add**
+
+---
+
+## Provider Setup Guides
+
+### WhatsApp (CallMeBot)
+
+Free WhatsApp notifications via CallMeBot:
+
+1. Add CallMeBot to contacts: **+34 644 51 95 23**
+2. Send via WhatsApp: `I allow callmebot to send me messages`
+3. You'll receive an API key
+4. In Bambuddy, enter:
+   - **Phone Number**: Your number with country code (e.g., +1234567890)
+   - **API Key**: The key from CallMeBot
+
+### ntfy
+
+Simple topic-based notifications:
+
+1. Choose a unique topic name (e.g., `my-printer-xyz123`)
+2. Subscribe on your phone:
+   - Install ntfy app ([Android](https://play.google.com/store/apps/details?id=io.heckel.ntfy) / [iOS](https://apps.apple.com/app/ntfy/id1625396347))
+   - Subscribe to your topic
+3. In Bambuddy, enter:
+   - **Topic**: Your chosen topic name
+   - **Server**: `https://ntfy.sh` (default) or your self-hosted server
+
+> No account needed for ntfy.sh public server!
+
+### Pushover
+
+Professional push notification service:
+
+1. Create account at [pushover.net](https://pushover.net/)
+2. Install Pushover app on your device
+3. Create an Application in Pushover dashboard
+4. In Bambuddy, enter:
+   - **User Key**: From your Pushover account
+   - **API Token**: From your Application
+
+### Telegram
+
+Via Telegram Bot:
+
+1. Message [@BotFather](https://t.me/BotFather) on Telegram
+2. Send `/newbot` and follow prompts
+3. Save the **Bot Token** provided
+4. Message [@userinfobot](https://t.me/userinfobot) to get your **Chat ID**
+5. In Bambuddy, enter:
+   - **Bot Token**: From BotFather
+   - **Chat ID**: Your user or group chat ID
+
+> For group notifications, add the bot to the group and use the group's chat ID.
+
+### Email (SMTP)
+
+Send notifications via email:
+
+1. Gather your SMTP server details
+2. In Bambuddy, enter:
+   - **SMTP Server**: e.g., `smtp.gmail.com`
+   - **Port**: 587 (STARTTLS), 465 (SSL), or 25 (None)
+   - **Security**: STARTTLS, SSL, or None
+   - **Username**: Your email address
+   - **Password**: Your password or app password
+   - **From Address**: Sender email
+   - **To Address**: Recipient email
+
+#### Gmail Setup
+1. Enable 2-Factor Authentication on your Google account
+2. Generate an [App Password](https://myaccount.google.com/apppasswords)
+3. Use the app password (not your regular password)
+4. Server: `smtp.gmail.com`, Port: 587, Security: STARTTLS
+
+### Discord
+
+Via channel webhooks:
+
+1. In Discord, go to channel settings
+2. Navigate to **Integrations** > **Webhooks**
+3. Click **New Webhook**
+4. Customize name/avatar if desired
+5. Click **Copy Webhook URL**
+6. In Bambuddy, paste the **Webhook URL**
+
+### Webhook (Generic)
+
+For custom integrations (Home Assistant, IFTTT, etc.):
+
+1. Enter your webhook URL
+2. Optionally add custom headers (e.g., Authorization)
+3. Bambuddy sends JSON payloads:
+
+```json
+{
+  "event": "print_complete",
+  "printer": "Workshop X1C",
+  "filename": "benchy.3mf",
+  "duration": "2h 15m",
+  "timestamp": "2024-01-15T14:30:00Z"
+}
+```
+
+---
+
+## Event Triggers
+
+Configure which events send notifications:
+
+| Event | Description |
+|-------|-------------|
+| **Print Started** | When a print job begins |
+| **Print Completed** | When a print finishes successfully |
+| **Print Failed** | When a print fails or errors out |
+| **Print Stopped** | When you manually cancel a print |
+| **Progress Milestones** | At 25%, 50%, and 75% progress |
+| **Printer Offline** | When a printer disconnects |
+| **Printer Error** | When HMS errors are detected |
+| **Low Filament** | When filament is running low |
+
+Enable/disable each event per provider.
+
+---
+
+## Quiet Hours
+
+Suppress notifications during sleep or focus time:
+
+1. Enable **Quiet Hours** toggle
+2. Set **Start Time** (e.g., 22:00)
+3. Set **End Time** (e.g., 07:00)
+
+Notifications during quiet hours are silently skipped.
+
+---
+
+## Per-Printer Filtering
+
+Limit notifications to specific printers:
+
+1. Open provider settings
+2. Find **Printer** dropdown
+3. Select a specific printer (or "All Printers")
+
+Only events from the selected printer(s) trigger notifications.
+
+---
+
+## Daily Digest
+
+Batch notifications into a daily summary:
+
+1. Enable **Daily Digest** toggle
+2. Set **Digest Time** (e.g., 08:00)
+
+### How It Works
+- Individual events are collected (not sent immediately)
+- At digest time, one summary notification is sent
+- Summary includes counts and details of all events
+
+### Example Digest
+```
+Daily Print Summary:
+- 3 prints completed
+- 1 print failed
+- Total print time: 8h 45m
+- Filament used: 245g
+```
+
+---
+
+## Message Templates
+
+Customize notification messages using variables:
+
+### Accessing Templates
+1. Go to **Settings** > **Notifications**
+2. Click **Templates** tab
+3. Click any event type to edit
+
+### Using Variables
+Insert dynamic content using `{variable}` syntax:
+- Click variable buttons to insert
+- Preview with sample data
+- Save to apply changes
+
+### Available Variables
+
+**Print Start**
+- `{printer}` - Printer name
+- `{filename}` - Print filename
+- `{estimated_time}` - Estimated duration
+
+**Print Complete**
+- `{printer}`, `{filename}`
+- `{duration}` - Actual print time
+- `{filament_grams}` - Filament used
+
+**Print Failed**
+- `{printer}`, `{filename}`, `{duration}`
+- `{reason}` - Failure reason
+
+**Print Progress**
+- `{printer}`, `{filename}`
+- `{progress}` - Percentage complete
+- `{remaining_time}` - Time remaining
+
+**Printer Offline**
+- `{printer}`
+
+**Printer Error**
+- `{printer}`
+- `{error_type}` - HMS error type
+- `{error_detail}` - Error description
+
+**Filament Low**
+- `{printer}`
+- `{slot}` - AMS slot number
+- `{remaining_percent}` - Filament remaining
+- `{color}` - Filament color
+
+**Common Variables** (all events)
+- `{timestamp}` - Event time
+- `{app_name}` - "Bambuddy"
+
+### Reset to Default
+Click the reset button on any template to restore the original message.
+
+---
+
+## Testing Notifications
+
+Before relying on notifications:
+
+1. Configure your provider
+2. Click **Send Test**
+3. Verify you receive the test message
+4. If it fails, check configuration and try again
+
+---
+
+## Tips
+
+- Use **ntfy** for the simplest setup (no account needed)
+- Enable **quiet hours** to avoid middle-of-night alerts
+- Set up **multiple providers** for redundancy
+- Use **progress milestones** for long prints
+- Configure **printer filtering** if you have multiple printers
+- Customize **templates** to include only the info you need

+ 156 - 0
docs/wiki/Features-Print-Archiving.md

@@ -0,0 +1,156 @@
+# Print Archiving
+
+Bambuddy automatically archives every print with full metadata extraction, creating a searchable history of all your 3D prints.
+
+## How It Works
+
+When a print completes on any connected printer:
+
+1. **Detection**: Bambuddy detects the print completion via MQTT
+2. **Download**: The 3MF file is downloaded from the printer via FTPS
+3. **Extraction**: Metadata is extracted from the 3MF (layers, filament, settings)
+4. **Storage**: Everything is saved to the `archive/` directory
+5. **Display**: The print appears in your Archives with a thumbnail
+
+## What Gets Archived
+
+### Files
+- **3MF File**: Complete print file (can be re-printed later)
+- **Thumbnail**: Preview image from the slicer
+- **Timelapse**: Video if enabled on printer (auto-attached or manual)
+- **Finish Photo**: Automatic camera capture on completion
+
+### Metadata
+| Field | Description |
+|-------|-------------|
+| Print Time | Estimated vs actual duration |
+| Filament | Material type, color, weight used |
+| Layers | Total count and layer height |
+| Temperatures | Nozzle and bed temperatures |
+| Printer | Which printer completed the job |
+| Result | Success, failed, or stopped |
+| Colors | Multi-color prints show color swatches |
+
+---
+
+## Archive Features
+
+### 3D Model Preview
+Click any archive to open an interactive Three.js viewer:
+- Rotate, zoom, and pan the model
+- View from different angles
+- See the actual geometry that was printed
+
+### Duplicate Detection
+Bambuddy automatically detects when you've printed the same model before:
+- **SHA256 hash** matches exact file content
+- **Purple badge** indicates duplicates
+- **"Duplicates" filter** shows all duplicate prints
+- View duplicate history in archive details
+
+### Print Time Accuracy
+Compare estimated vs actual print times:
+- **Green badge**: Accurate (within 5%)
+- **Blue badge**: Faster than estimated
+- **Orange badge**: Slower than estimated
+- Per-printer accuracy statistics available
+
+### Photo Attachments
+Document your prints with photos:
+- **Automatic finish photo**: Camera captures when print completes
+- **Manual uploads**: Add your own photos
+- Multiple photos per archive supported
+
+### Failure Analysis
+When a print fails, document what went wrong:
+- Add failure notes
+- Attach photos of the failure
+- Track failure patterns over time
+
+---
+
+## Managing Archives
+
+### Filtering & Search
+- **By Printer**: Show prints from specific printers
+- **By Date**: Filter by time range
+- **By Status**: Success, failed, stopped
+- **By Collection**: Custom collections you create
+- **Search**: Find by filename
+
+### Context Menu Actions
+Right-click any archive card for:
+- **Re-print**: Send to any connected printer
+- **Schedule**: Add to print queue
+- **Project Page**: View/edit MakerWorld metadata
+- **Scan for Timelapse**: Find matching timelapse
+- **Delete**: Remove from archive
+
+### Collections
+Organize archives into custom collections:
+1. Right-click an archive
+2. Select "Add to Collection"
+3. Create or select a collection
+4. Filter archives by collection
+
+---
+
+## Project Page Editor
+
+3MF files from MakerWorld contain embedded project pages with:
+- Model title and description
+- Designer information
+- License details
+- Preview images
+
+### Viewing Project Pages
+1. Right-click an archive
+2. Select "Project Page"
+3. View all embedded information
+
+### Editing Project Pages
+1. Open the project page
+2. Click "Edit"
+3. Modify title, description, or other fields
+4. Click "Save" (changes are saved to the 3MF file)
+
+---
+
+## Re-printing Archives
+
+Send any archived print back to a printer:
+
+1. Right-click the archive
+2. Select "Re-print" or "Schedule"
+3. Choose a target printer
+4. Optionally set a scheduled time
+5. Confirm to start the print
+
+The 3MF file is uploaded via FTP and the print starts automatically.
+
+---
+
+## Storage
+
+Archives are stored in the `archive/` directory:
+```
+archive/
+├── {printer_id}/
+│   ├── {archive_id}/
+│   │   ├── model.3mf
+│   │   ├── thumbnail.png
+│   │   ├── timelapse.mp4 (if available)
+│   │   └── photos/
+│   │       └── finish.jpg
+```
+
+The SQLite database (`bambuddy.db`) stores metadata and indexes.
+
+---
+
+## Tips
+
+- **Enable timelapse** on your printer to automatically capture print videos
+- **Enable camera capture** in settings for automatic finish photos
+- Use **collections** to organize prints by project or client
+- Check **duplicate detection** before reprinting to see previous results

+ 181 - 0
docs/wiki/Features-Print-Queue.md

@@ -0,0 +1,181 @@
+# Print Queue & Scheduling
+
+Schedule prints for specific times with powerful automation including smart plug integration for automatic power control.
+
+## Overview
+
+The print queue allows you to:
+- Queue multiple prints per printer
+- Schedule prints for specific date/time
+- Automatically power on printers before scheduled prints
+- Automatically power off after prints complete
+- Drag-and-drop queue reordering
+
+---
+
+## Adding Prints to Queue
+
+### From Archives
+1. Go to the **Archives** page
+2. Right-click an archive
+3. Select **Schedule** (or click the calendar icon)
+4. Choose options:
+   - **Printer**: Select target printer
+   - **Scheduled Time**: Leave empty for "next available" or pick a specific time
+   - **Auto Power Off**: Turn off printer when complete
+5. Click **Add to Queue**
+
+### Queue Options
+| Option | Description |
+|--------|-------------|
+| **Printer** | Which printer to send the job to |
+| **Scheduled Time** | When to start (empty = ASAP) |
+| **Auto Power Off** | Power off printer after completion |
+
+---
+
+## Managing the Queue
+
+### Queue Page
+Access the dedicated queue page to see all queued prints across all printers.
+
+### Per-Printer Queue
+Click the queue icon on any printer card to see that printer's queue.
+
+### Queue Item States
+| State | Description |
+|-------|-------------|
+| **Pending** | Waiting for scheduled time or previous print |
+| **Waiting** | Scheduled time reached, waiting for printer |
+| **Uploading** | Transferring 3MF to printer |
+| **Printing** | Currently printing |
+| **Completed** | Print finished successfully |
+| **Failed** | Print failed or was cancelled |
+
+### Reordering
+Drag and drop queue items to change print order:
+1. Click and hold the grip handle
+2. Drag to new position
+3. Release to reorder
+
+> Note: Only pending items can be reordered. Active prints cannot be moved.
+
+### Cancelling Prints
+- **Pending items**: Click the X button to remove
+- **Active prints**: Click the stop button (with confirmation)
+
+---
+
+## Automation Flow
+
+When a scheduled print is ready to start:
+
+```
+1. Scheduled time reached
+        ↓
+2. Smart plug powers ON (if configured)
+        ↓
+3. Wait for printer connection (up to 2 minutes)
+        ↓
+4. Upload 3MF via FTP
+        ↓
+5. Start print command sent
+        ↓
+6. Monitor progress in real-time
+        ↓
+7. Print completes
+        ↓
+8. If "Auto Power Off" enabled:
+   - Wait for nozzle to cool below 50°C
+   - Power off smart plug
+```
+
+---
+
+## Smart Plug Integration
+
+For full automation, link a smart plug to your printer. See [Smart Plug Integration](Features-Smart-Plugs) for setup.
+
+### Pre-Print Power On
+When a scheduled print is about to start:
+1. Bambuddy sends power-on command to smart plug
+2. Waits for printer to boot and connect
+3. Proceeds with print upload once connected
+
+### Post-Print Power Off
+When a print completes with "Auto Power Off" enabled:
+1. Waits for nozzle temperature to drop below threshold
+2. Sends power-off command to smart plug
+3. Marks queue item as complete
+
+---
+
+## Scheduling Tips
+
+### Overnight Prints
+Schedule long prints to start overnight:
+1. Queue the print with a late evening start time
+2. Enable "Auto Power Off"
+3. Printer runs while you sleep and turns off when done
+
+### Morning Warm-Up
+Schedule a print to start before you arrive:
+1. Set start time 30 minutes before arrival
+2. Printer warms up and starts
+3. Print is running when you get there
+
+### Batch Printing
+Queue multiple prints for sequential execution:
+1. Add all prints to the queue (no scheduled time)
+2. First print starts immediately
+3. Each subsequent print starts when the previous completes
+
+---
+
+## Error Handling
+
+### Connection Timeout
+If the printer doesn't connect within 2 minutes after power-on:
+- Queue item marked as failed
+- Error message displayed
+- Smart plug remains on (manual intervention needed)
+
+### Upload Failure
+If FTP upload fails:
+- Automatic retry (up to 3 attempts)
+- Queue item marked as failed if all retries fail
+
+### Print Failure
+If the print fails mid-job:
+- Queue item marked as failed
+- Next queued item does NOT auto-start
+- Manual intervention required
+
+---
+
+## Queue Notifications
+
+Get notified about queue events:
+- **Print Started**: When a queued print begins
+- **Print Completed**: When a queued print finishes
+- **Print Failed**: When a queued print fails
+
+Configure notifications in [Push Notifications](Features-Notifications).
+
+---
+
+## Limitations
+
+- One active print per printer at a time
+- Scheduled prints require the printer to be available
+- Smart plug automation requires compatible Tasmota device
+- Queue items expire after 24 hours if printer remains unavailable
+
+---
+
+## Tips
+
+- Use "Auto Power Off" for energy savings and safety
+- Schedule long prints during off-peak electricity hours
+- Keep the queue page open to monitor progress
+- Set up notifications to know when prints complete

+ 221 - 0
docs/wiki/Features-Smart-Plugs.md

@@ -0,0 +1,221 @@
+# Smart Plug Integration
+
+Control Tasmota-based smart plugs for automated power management of your 3D printers.
+
+## Overview
+
+Smart plug integration enables:
+- Automatic power-on when prints start
+- Safe power-off after prints complete (with cooldown)
+- Scheduled power on/off times
+- Power consumption monitoring
+- Energy alerts
+
+---
+
+## Supported Devices
+
+Any smart plug running [Tasmota](https://tasmota.github.io/docs/) firmware with HTTP API enabled:
+
+### Popular Compatible Devices
+- Sonoff S31 / S26
+- Gosund smart plugs
+- Teckin smart plugs
+- Treatlife smart plugs
+- Any ESP8266/ESP32-based plug with Tasmota
+
+### Requirements
+- Tasmota firmware installed
+- HTTP API enabled (default)
+- Same network as Bambuddy server
+
+---
+
+## Setting Up a Smart Plug
+
+### Step 1: Flash Tasmota (if needed)
+If your plug doesn't have Tasmota:
+1. Follow the [Tasmota installation guide](https://tasmota.github.io/docs/Getting-Started/)
+2. Configure WiFi to connect to your network
+3. Note the plug's IP address
+
+### Step 2: Add to Bambuddy
+1. Go to **Settings** > **Smart Plugs**
+2. Click **Add Plug**
+3. Enter the plug's IP address
+4. Click **Test** to verify connection
+5. Enter a name (auto-filled from device if available)
+6. Optionally add authentication credentials
+7. Click **Add**
+
+### Step 3: Link to Printer
+1. In the plug settings, find **Linked Printer**
+2. Select the printer this plug controls
+3. The plug is now associated with that printer
+
+---
+
+## Automation Options
+
+### Master Toggle
+**Enabled**: Turns all automation on/off for this plug
+
+### Auto Power On
+When enabled, the plug turns on automatically when:
+- A print starts on the linked printer
+- A scheduled print is about to begin
+
+### Auto Power Off
+When enabled, the plug turns off after:
+- A print completes successfully
+- The delay mode conditions are met
+
+---
+
+## Delay Modes
+
+Control when the printer powers off after a print completes:
+
+### Time-Based Delay
+Wait a fixed number of minutes:
+- Range: 1-60 minutes
+- Use case: Simple cooldown period
+- Example: Power off 15 minutes after print ends
+
+### Temperature-Based Delay
+Wait until nozzle cools down:
+- Default threshold: 50°C (configurable)
+- Safer for the printer and environment
+- Monitors actual nozzle temperature
+
+> **Recommendation**: Use temperature-based delay for safety. Hot nozzles can be a fire hazard.
+
+---
+
+## Scheduled Power On/Off
+
+Set daily schedules for automatic power control:
+
+### Scheduled Power On
+Turn on the plug at a specific time each day:
+- Use case: Warm up printer before work hours
+- Example: Power on at 8:00 AM
+
+### Scheduled Power Off
+Turn off the plug at a specific time each day:
+- Use case: Safety shutoff at night
+- Example: Power off at 11:00 PM
+
+### Configuring Schedules
+1. Expand the plug settings panel
+2. Enable **Scheduled On** and/or **Scheduled Off**
+3. Set the desired time for each
+4. Schedules run daily at the specified times
+
+---
+
+## Power Monitoring
+
+For Tasmota plugs with energy monitoring (e.g., Sonoff S31):
+
+### Live Power Display
+- Current wattage shown on plug card
+- Updates in real-time
+
+### Power Alerts
+Get notified when power consumption exceeds a threshold:
+1. Enable **Power Alert** in plug settings
+2. Set **Power Threshold** in watts (e.g., 200W)
+3. Receive notification when threshold exceeded
+
+### Use Cases for Power Alerts
+- Detect printer issues (unexpected high power)
+- Confirm heater failures (power too low during printing)
+- Verify printer is actively heating/printing
+
+---
+
+## Manual Control
+
+Each plug card displays:
+- **Status**: ON / OFF / Offline
+- **Power**: Current consumption (if supported)
+- **On/Off buttons**: Manual toggle
+
+Click the buttons to manually control the plug at any time.
+
+---
+
+## Plug Settings Panel
+
+Expand any plug card to access all settings:
+
+| Setting | Description |
+|---------|-------------|
+| **Name** | Display name for the plug |
+| **IP Address** | Network address of the plug |
+| **Username/Password** | Authentication (if Tasmota requires it) |
+| **Linked Printer** | Which printer this plug controls |
+| **Enabled** | Master automation toggle |
+| **Auto On** | Power on when print starts |
+| **Auto Off** | Power off when print completes |
+| **Delay Mode** | Time-based or temperature-based |
+| **Delay Value** | Minutes or temperature threshold |
+| **Scheduled On/Off** | Daily power schedule |
+| **Power Alert** | Enable consumption alerts |
+| **Power Threshold** | Wattage for alerts |
+
+---
+
+## Troubleshooting
+
+### Plug Not Responding
+1. Verify IP address is correct
+2. Check plug is on the same network
+3. Test via browser: `http://<plug-ip>/cm?cmnd=Power`
+4. Access Tasmota web UI: `http://<plug-ip>`
+
+### Authentication Issues
+If Tasmota has a password:
+1. Edit the plug in Bambuddy
+2. Enter username and password
+3. Save and test connection
+
+### Auto Power-Off Not Working
+1. Verify plug is linked to a printer
+2. Check Enabled, Auto On, Auto Off toggles
+3. For temperature mode: ensure printer is still connected
+4. Check logs for error messages
+
+### Power Monitoring Not Showing
+- Not all plugs support power monitoring
+- Requires Tasmota with energy module
+- Check Tasmota console for power readings
+
+---
+
+## Best Practices
+
+### Safety First
+- Always use temperature-based delay for power-off
+- Set a scheduled power-off time as a safety net
+- Don't leave printers unattended for extended periods
+
+### Network Reliability
+- Use static IP or DHCP reservation for plugs
+- Ensure strong WiFi signal at plug location
+- Consider wired connection if reliability is critical
+
+### Printer Compatibility
+- Ensure your printer handles power cycling gracefully
+- Some printers need manual intervention after power-on
+- Test the automation flow before relying on it
+
+---
+
+## Tips
+
+- Use power monitoring to track electricity costs
+- Set up power alerts to detect print failures
+- Combine with print scheduling for full automation
+- Schedule power-off at night for safety and savings

+ 218 - 0
docs/wiki/Features-Spoolman.md

@@ -0,0 +1,218 @@
+# Spoolman Integration
+
+Sync your AMS filament data with [Spoolman](https://github.com/Donkie/Spoolman) for comprehensive filament inventory management.
+
+## Overview
+
+When enabled, Bambuddy syncs AMS filament data with your Spoolman server:
+- Track remaining filament across all spools
+- Automatic usage deduction during prints
+- Auto-create spools and filaments in Spoolman
+- Support for multiple printers and AMS units
+
+---
+
+## Prerequisites
+
+- A running Spoolman server (self-hosted or Docker)
+- Bambu Lab spools with original RFID tags in your AMS
+- Printer connected to Bambuddy
+
+---
+
+## Setting Up Spoolman
+
+### Step 1: Enable Integration
+1. Go to **Settings** > scroll to **Spoolman Integration**
+2. Enable the **Enable Spoolman** toggle
+
+### Step 2: Configure Connection
+1. Enter your Spoolman server URL:
+   - Example: `http://192.168.1.100:7912`
+   - Include protocol (http/https) and port
+2. Click **Save**
+
+### Step 3: Connect
+1. Click **Connect** to establish the connection
+2. Status should change to "Connected"
+3. If connection fails, verify URL and network access
+
+---
+
+## Sync Modes
+
+### Automatic Sync
+AMS data syncs automatically when changes are detected:
+- Filament loaded/unloaded
+- Filament usage during prints
+- AMS slot changes
+
+Enable automatic sync for hands-off operation.
+
+### Manual Only
+Sync only when you explicitly request it:
+- Click the **Sync** button
+- Select specific printer or "All Printers"
+- Results show how many trays were synced
+
+---
+
+## How Syncing Works
+
+### Tray UUID Matching
+Bambuddy matches AMS spools to Spoolman using the **tray UUID**:
+- Unique 32-character identifier
+- Assigned by Bambu Lab to each original spool
+- Consistent across different printers
+
+### What Gets Synced
+
+| Data | Direction | Description |
+|------|-----------|-------------|
+| Remaining weight | AMS → Spoolman | Current filament amount |
+| Usage during print | AMS → Spoolman | Deducted from inventory |
+| Filament type | AMS → Spoolman | PLA, PETG, ABS, etc. |
+| Color | AMS → Spoolman | Spool color |
+
+### Auto-Creation
+
+When a Bambu Lab spool is detected that doesn't exist in Spoolman:
+
+1. **Vendor**: "Bambu Lab" vendor created if needed
+2. **Filament**: Filament type created (matched by material/color)
+3. **Spool**: New spool created with:
+   - Tray UUID as identifier
+   - Material type and color
+   - Comment noting auto-creation
+
+---
+
+## Supported Spools
+
+### Bambu Lab Original Spools ✓
+- Have valid RFID tags with tray UUIDs
+- Full sync support
+- Automatic matching
+
+### Third-Party Spools ✗
+These are gracefully skipped (no errors):
+- SpoolEase refilled spools
+- Other refilled spools
+- Generic filament without RFID
+- Spools with invalid/missing UUIDs
+
+> Third-party spools don't cause sync errors—they're simply skipped.
+
+---
+
+## Manual Sync
+
+When using manual sync mode:
+
+1. Go to **Settings** > **Spoolman Integration**
+2. Select a printer from the dropdown (or "All Printers")
+3. Click **Sync**
+4. Results display:
+   - Number of trays synced
+   - Any skipped spools
+   - Error messages if applicable
+
+---
+
+## Viewing Synced Data
+
+### In Spoolman
+After syncing, check your Spoolman interface:
+- New spools appear in inventory
+- Remaining amounts are updated
+- Usage history is recorded
+
+### In Bambuddy
+AMS data displayed on printer cards shows:
+- Slot colors and materials
+- Remaining filament percentages
+- Sync status indicators
+
+---
+
+## Troubleshooting
+
+### Connection Issues
+
+**"Connection refused" or timeout**
+- Verify Spoolman URL is correct
+- Check server is running: `http://<spoolman-ip>:7912/api/v1/info`
+- Ensure no firewall blocking port 7912
+- Verify same network or proper routing
+
+**"Invalid URL"**
+- Include protocol: `http://` or `https://`
+- Include port: `:7912`
+- No trailing slash
+
+### Sync Issues
+
+**"No spools synced"**
+- Verify AMS has spools loaded
+- Check spools have valid RFID (original Bambu Lab)
+- Ensure printer is connected
+
+**"Third-party spools skipped"**
+- This is normal behavior
+- SpoolEase and refilled spools don't have valid UUIDs
+- No action needed
+
+**"Spool not found in Spoolman"**
+- Auto-creation should handle this
+- Check Spoolman logs for errors
+- Verify Spoolman API is accessible
+
+### Data Mismatch
+
+**Spoolman shows wrong amount**
+- Manual edits in Spoolman override synced data
+- Re-sync to update from AMS
+- AMS sensor may have calibration issues
+
+---
+
+## Best Practices
+
+### Initial Setup
+1. Do a full manual sync first
+2. Verify all spools appear in Spoolman
+3. Then enable automatic sync
+
+### Filament Changes
+- Sync after loading new spools
+- Spoolman updates automatically during prints
+- Check periodically for accuracy
+
+### Multiple Printers
+- Each printer's AMS syncs independently
+- Same spool moved between printers is tracked by UUID
+- Use "All Printers" sync for comprehensive update
+
+---
+
+## API Endpoints
+
+Bambuddy uses these Spoolman API endpoints:
+
+| Endpoint | Purpose |
+|----------|---------|
+| `/api/v1/info` | Connection test |
+| `/api/v1/spool` | List/create spools |
+| `/api/v1/filament` | List/create filaments |
+| `/api/v1/vendor` | List/create vendors |
+| `/api/v1/spool/{id}/use` | Record usage |
+
+---
+
+## Tips
+
+- Use automatic sync for seamless tracking
+- Check Spoolman periodically for accuracy
+- Original Bambu Lab spools work best
+- Third-party spools need manual tracking in Spoolman
+- Export Spoolman data for backup

+ 153 - 0
docs/wiki/Features-Statistics.md

@@ -0,0 +1,153 @@
+# Statistics Dashboard
+
+The Statistics page provides analytics and insights about your printing activity through customizable, drag-and-drop widgets.
+
+## Dashboard Widgets
+
+### Print Success Rate
+Track reliability across all printers:
+- **Success**: Completed prints
+- **Failed**: Prints that failed mid-job
+- **Stopped**: Manually cancelled prints
+- Visual pie chart breakdown
+- Per-printer filtering available
+
+### Filament Usage
+Monitor material consumption:
+- **By material type**: PLA, PETG, ABS, etc.
+- **By color**: Breakdown of colors used
+- **Over time**: Trend charts
+- **Total weight**: Cumulative usage in grams/kg
+
+### Print Activity Calendar
+GitHub-style contribution calendar showing:
+- Daily print activity
+- Color intensity = number of prints
+- Click any day to see prints from that date
+- Identify patterns in your printing habits
+
+### Cost Tracking
+Calculate printing costs:
+- **Per print**: Based on filament used
+- **Total costs**: Cumulative spending
+- **By material**: Cost breakdown by filament type
+- Requires filament costs to be configured
+
+### Time Accuracy
+Analyze estimated vs actual print times:
+- **Average accuracy**: How close estimates are
+- **Per-printer breakdown**: Compare printer accuracy
+- **Trend over time**: Is accuracy improving?
+- Helps calibrate expectations for future prints
+
+### Print Duration Distribution
+Understand your typical print lengths:
+- Histogram of print durations
+- Short vs long print patterns
+- Average print time
+
+---
+
+## Customizing Your Dashboard
+
+### Drag and Drop
+Rearrange widgets by clicking and dragging the grip handle:
+1. Hover over a widget header
+2. Click the grip icon (⋮⋮)
+3. Drag to new position
+4. Release to drop
+
+### Resizing Widgets
+Change widget sizes:
+1. Click the resize icon on any widget
+2. Cycles through: 1/4 width → 1/2 width → Full width
+3. Layout adjusts automatically
+
+### Hiding Widgets
+Remove widgets you don't need:
+1. Click the eye icon on any widget
+2. Widget is hidden from view
+3. Re-enable from widget settings
+
+### Reset Layout
+Return to default layout:
+1. Click "Reset Layout" button
+2. All widgets return to original positions and sizes
+
+### Persistence
+Your layout preferences are saved automatically and persist across sessions.
+
+---
+
+## Filtering Data
+
+### Time Range
+Filter statistics by date range:
+- Last 7 days
+- Last 30 days
+- Last 90 days
+- All time
+- Custom range
+
+### Printer Selection
+View statistics for:
+- All printers combined
+- Individual printers
+- Compare across printers
+
+---
+
+## Filament Cost Configuration
+
+To enable cost tracking:
+
+1. Go to **Settings** > **Filaments**
+2. Add your filaments with costs:
+   - Material type (PLA, PETG, etc.)
+   - Color
+   - Cost per kg
+   - Vendor (optional)
+3. Statistics will calculate costs based on usage
+
+---
+
+## Export Data
+
+Export your statistics:
+- **CSV format**: For spreadsheets
+- **Date range**: Select period to export
+- **Fields**: Print name, duration, filament, cost, etc.
+
+---
+
+## Widget Details
+
+### Print Count Widget
+- Total prints in selected period
+- Comparison to previous period
+- Growth/decline indicator
+
+### Filament by Type Widget
+- Pie chart of material distribution
+- Click segments to filter
+- Legend with exact amounts
+
+### Printer Utilization Widget
+- Hours of active printing
+- Idle time percentage
+- Per-printer breakdown
+
+### Recent Activity Widget
+- Latest completed prints
+- Quick status overview
+- Click to view archive details
+
+---
+
+## Tips
+
+- Check the dashboard weekly to spot trends
+- Use per-printer filtering to identify reliability issues
+- Configure filament costs for accurate expense tracking
+- Export data monthly for record keeping
+- Watch time accuracy to improve print estimates

+ 141 - 0
docs/wiki/Getting-Started.md

@@ -0,0 +1,141 @@
+# Getting Started
+
+This guide will help you set up your first printer and start using Bambuddy.
+
+## Prerequisites
+
+Before adding a printer, ensure:
+- Bambuddy is running (see [Installation](Installation))
+- Your printer is powered on and connected to your network
+- You have access to your printer's settings
+
+---
+
+## Enabling LAN Mode on Your Printer
+
+Bambuddy connects to printers via LAN Mode. Here's how to enable it:
+
+### Step 1: Enable Developer Mode (if required)
+Some printer models require Developer Mode to be enabled first:
+1. On your printer's touchscreen, go to **Settings**
+2. Navigate to **General** or **About**
+3. Look for **Developer Mode** and enable it
+
+### Step 2: Enable LAN Mode
+1. Go to **Settings** > **Network** > **LAN Mode**
+2. Toggle **LAN Mode** to **ON**
+3. Note down the **Access Code** displayed (8 characters)
+
+### Step 3: Find Your Printer's Information
+You'll need these details:
+- **IP Address**: Found in **Settings** > **Network**
+- **Serial Number**: Found in **Settings** > **Device Info**
+- **Access Code**: Shown when LAN Mode is enabled
+
+> **Tip**: The access code changes every time you toggle LAN Mode off and on.
+
+---
+
+## Adding Your First Printer
+
+1. Open Bambuddy in your browser (default: http://localhost:8000)
+2. Go to the **Printers** page
+3. Click **Add Printer**
+4. Enter the following information:
+   - **Name**: A friendly name (e.g., "Workshop X1C")
+   - **IP Address**: Your printer's local IP
+   - **Access Code**: The 8-character code from LAN Mode
+   - **Serial Number**: Your printer's serial number
+5. Click **Save**
+
+The printer should connect automatically. You'll see:
+- A **green indicator** when connected
+- Real-time status updates (temperatures, print progress, etc.)
+
+---
+
+## Understanding the Interface
+
+### Printers Page
+- **Printer Cards**: Show real-time status for each printer
+- **HMS Status**: Health Management System indicator (green = OK)
+- **Temperature Readouts**: Nozzle, bed, and chamber temperatures
+- **Print Progress**: Current layer, time remaining, filament usage
+
+### Archives Page
+- **Archive Cards**: All completed prints with thumbnails
+- **Filters**: Sort by printer, date, status, collections
+- **Search**: Find prints by name
+- **Context Menu**: Right-click for actions (re-print, delete, etc.)
+
+### Statistics Page
+- **Drag-and-drop Widgets**: Customize your dashboard
+- **Print Success Rate**: Track reliability
+- **Filament Usage**: Monitor material consumption
+- **Cost Tracking**: Calculate printing costs
+
+---
+
+## Your First Archived Print
+
+Once your printer is connected, Bambuddy automatically archives completed prints:
+
+1. Start a print on your Bambu Lab printer (via Bambu Studio, Handy, or the printer itself)
+2. Bambuddy detects the print and monitors progress
+3. When the print completes:
+   - The 3MF file is downloaded via FTP
+   - Metadata is extracted (layers, filament, temperatures, etc.)
+   - A thumbnail is generated
+   - The print appears in your Archives
+
+### What Gets Archived
+- **3MF File**: The complete print file
+- **Thumbnail**: Preview image from the slicer
+- **Metadata**: Print time, filament usage, layer count, temperatures
+- **Finish Photo**: Automatic camera capture (if enabled)
+- **Print Result**: Success, failed, or stopped status
+
+---
+
+## Keyboard Shortcuts
+
+Navigate quickly with keyboard shortcuts:
+
+| Key | Action |
+|-----|--------|
+| `1` | Go to Printers |
+| `2` | Go to Archives |
+| `3` | Go to Statistics |
+| `4` | Go to Cloud Profiles |
+| `5` | Go to Settings |
+| `?` | Show keyboard shortcuts |
+
+---
+
+## Mobile Access
+
+Bambuddy works on phones and tablets:
+
+- **Hamburger Menu**: Tap the menu icon to open navigation
+- **Touch-Friendly**: All controls are sized for easy tapping
+- **Responsive Layout**: Pages adapt to smaller screens
+- **Context Menus**: Tap the three-dot icon on cards for actions
+
+---
+
+## Next Steps
+
+Now that you're set up, explore these features:
+
+- **[Print Queue & Scheduling](Features-Print-Queue)** - Schedule prints for later
+- **[Smart Plug Integration](Features-Smart-Plugs)** - Automate power control
+- **[Push Notifications](Features-Notifications)** - Get alerts on your phone
+- **[Spoolman Integration](Features-Spoolman)** - Track filament inventory
+
+---
+
+## Having Issues?
+
+- **Printer won't connect?** See [Troubleshooting](Troubleshooting#printer-connection-issues)
+- **Prints not archiving?** See [Troubleshooting](Troubleshooting#archiving-issues)
+- **Need help?** Open an [issue on GitHub](https://github.com/maziggy/bambuddy/issues)

+ 57 - 0
docs/wiki/Home.md

@@ -0,0 +1,57 @@
+# Bambuddy Wiki
+
+Welcome to the Bambuddy documentation! Bambuddy is a self-hosted print archive and management system for Bambu Lab 3D printers.
+
+## Quick Links
+
+| Getting Started | Features | Reference |
+|-----------------|----------|-----------|
+| [Installation](Installation) | [Print Archiving](Features-Print-Archiving) | [API Documentation](API-Reference) |
+| [Getting Started](Getting-Started) | [Real-time Monitoring](Features-Monitoring) | [Troubleshooting](Troubleshooting) |
+| [Adding Your First Printer](Getting-Started#adding-your-first-printer) | [Print Queue & Scheduling](Features-Print-Queue) | [Environment Variables](Installation#environment-variables) |
+
+## Feature Documentation
+
+### Core Features
+- **[Print Archiving](Features-Print-Archiving)** - Automatic 3MF archiving with metadata extraction
+- **[Real-time Monitoring](Features-Monitoring)** - Live printer status, temperatures, and progress
+- **[Statistics Dashboard](Features-Statistics)** - Print analytics, success rates, and cost tracking
+
+### Automation
+- **[Print Queue & Scheduling](Features-Print-Queue)** - Schedule prints with smart plug automation
+- **[Smart Plug Integration](Features-Smart-Plugs)** - Tasmota-based power control and monitoring
+- **[Push Notifications](Features-Notifications)** - Multi-provider alerts (WhatsApp, Telegram, Discord, etc.)
+
+### Integrations
+- **[Spoolman Integration](Features-Spoolman)** - Filament inventory sync
+- **[Cloud Profiles](Features-Cloud-Profiles)** - Bambu Cloud slicer preset management
+- **[K-Profiles](Features-K-Profiles)** - Pressure advance settings management
+
+### Maintenance & Management
+- **[Maintenance Tracker](Features-Maintenance)** - Schedule and track printer maintenance
+- **[File Manager](Features-File-Manager)** - Browse and manage printer SD card files
+- **[External Links](Features-External-Links)** - Add custom sidebar links to external tools
+
+## Supported Printers
+
+| Series | Models | Status |
+|--------|--------|--------|
+| H2 Series | H2C, H2D, H2S | Tested (H2D) |
+| X1 Series | X1, X1 Carbon | Tested (X1C) |
+| P1 Series | P1P, P1S | Needs Testing |
+| A1 Series | A1, A1 Mini | Needs Testing |
+
+> **Testers Needed!** If you have a printer model that needs testing, please help by reporting your experience in [GitHub Issues](https://github.com/maziggy/bambuddy/issues).
+
+## Requirements
+
+- **Python 3.10+** (3.11 or 3.12 recommended)
+- **Node.js 18+** (only for building frontend from source)
+- Bambu Lab printer with **LAN Mode** enabled
+- Printer and server on the same local network
+
+## Need Help?
+
+- Check the [Troubleshooting](Troubleshooting) guide
+- Search [existing issues](https://github.com/maziggy/bambuddy/issues)
+- Open a [new issue](https://github.com/maziggy/bambuddy/issues/new) if you're stuck

+ 236 - 0
docs/wiki/Installation.md

@@ -0,0 +1,236 @@
+# Installation
+
+This guide covers all methods for installing Bambuddy on your system.
+
+## Quick Install (Linux/macOS)
+
+```bash
+# Clone the repository
+git clone https://github.com/maziggy/bambuddy.git
+cd bambuddy
+
+# Create and activate virtual environment
+python3 -m venv venv
+source venv/bin/activate
+
+# Install Python dependencies
+pip install -r requirements.txt
+
+# Start the server
+uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
+```
+
+Open http://localhost:8000 in your browser.
+
+---
+
+## Detailed Installation
+
+### Step 1: Install Prerequisites
+
+#### macOS
+```bash
+# Install Homebrew if not installed
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+
+# Install Python and Node.js
+brew install python@3.12 node
+```
+
+#### Ubuntu/Debian
+```bash
+sudo apt update
+sudo apt install python3 python3-venv python3-pip nodejs npm git
+```
+
+#### Windows
+1. Download and install [Python 3.12](https://www.python.org/downloads/) (check "Add to PATH")
+2. Download and install [Node.js LTS](https://nodejs.org/)
+3. Download and install [Git](https://git-scm.com/download/win)
+
+### Step 2: Clone the Repository
+
+```bash
+git clone https://github.com/maziggy/bambuddy.git
+cd bambuddy
+```
+
+### Step 3: Set Up Python Environment
+
+#### Linux/macOS
+```bash
+python3 -m venv venv
+source venv/bin/activate
+pip install --upgrade pip
+pip install -r requirements.txt
+```
+
+#### Windows (PowerShell)
+```powershell
+python -m venv venv
+.\venv\Scripts\Activate.ps1
+pip install --upgrade pip
+pip install -r requirements.txt
+```
+
+#### Windows (Command Prompt)
+```cmd
+python -m venv venv
+venv\Scripts\activate.bat
+pip install --upgrade pip
+pip install -r requirements.txt
+```
+
+### Step 4: Build Frontend (Optional)
+
+The repository includes pre-built frontend files in `/static`. To build from source:
+
+```bash
+cd frontend
+npm install
+npm run build
+cd ..
+```
+
+### Step 5: Run the Application
+
+```bash
+uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
+```
+
+Open http://localhost:8000 in your browser.
+
+---
+
+## Running as a Service (Linux)
+
+Create a systemd service for automatic startup:
+
+```bash
+sudo nano /etc/systemd/system/bambuddy.service
+```
+
+Add the following content (adjust paths):
+
+```ini
+[Unit]
+Description=Bambuddy Print Archive
+After=network.target
+
+[Service]
+Type=simple
+User=YOUR_USERNAME
+WorkingDirectory=/home/YOUR_USERNAME/bambuddy
+Environment="PATH=/home/YOUR_USERNAME/bambuddy/venv/bin"
+ExecStart=/home/YOUR_USERNAME/bambuddy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+```
+
+Enable and start:
+
+```bash
+sudo systemctl daemon-reload
+sudo systemctl enable bambuddy
+sudo systemctl start bambuddy
+
+# Check status
+sudo systemctl status bambuddy
+
+# View logs
+sudo journalctl -u bambuddy -f
+```
+
+---
+
+## Docker Installation (Coming Soon)
+
+```bash
+docker run -d \
+  --name bambuddy \
+  -p 8000:8000 \
+  -v bambuddy_data:/app/data \
+  -v bambuddy_archive:/app/archive \
+  maziggy/bambuddy:latest
+```
+
+---
+
+## Environment Variables
+
+Configure Bambuddy using environment variables or a `.env` file:
+
+```bash
+cp .env.example .env
+```
+
+| Variable | Default | Description |
+|----------|---------|-------------|
+| `DEBUG` | `false` | Enable debug mode (verbose logging, SQL queries) |
+| `LOG_LEVEL` | `INFO` | Log level: `DEBUG`, `INFO`, `WARNING`, `ERROR` |
+| `LOG_TO_FILE` | `true` | Write logs to `logs/bambuddy.log` |
+
+### Production Settings (default)
+- INFO level logging
+- SQLAlchemy and HTTP library noise suppressed
+- Logs written to `logs/bambuddy.log` (5MB rotating, 3 backups)
+
+### Development Settings (`DEBUG=true`)
+- DEBUG level logging (verbose)
+- All SQL queries logged
+- Useful for troubleshooting printer connections
+
+Example `.env` for development:
+```bash
+DEBUG=true
+LOG_TO_FILE=true
+```
+
+---
+
+## Updating Bambuddy
+
+### Manual Update
+```bash
+cd bambuddy
+git pull origin main
+
+# Activate virtual environment
+source venv/bin/activate  # Linux/macOS
+# or: .\venv\Scripts\Activate.ps1  # Windows PowerShell
+
+# Update dependencies
+pip install -r requirements.txt
+
+# Rebuild frontend (if needed)
+cd frontend
+npm install
+npm run build
+cd ..
+
+# Restart the application
+```
+
+### Auto Updates
+Bambuddy includes automatic update checking. Go to **Settings** to check for updates and apply them with one click.
+
+---
+
+## Network Requirements
+
+| Port | Protocol | Purpose |
+|------|----------|---------|
+| 8000 | HTTP | Bambuddy web interface |
+| 8883 | MQTT/TLS | Printer communication |
+| 990 | FTPS | File transfers |
+
+Ensure your firewall allows these connections between Bambuddy and your printers.
+
+---
+
+## Next Steps
+
+Once installed, proceed to [Getting Started](Getting-Started) to add your first printer.

+ 392 - 0
docs/wiki/Troubleshooting.md

@@ -0,0 +1,392 @@
+# Troubleshooting
+
+Solutions to common issues with Bambuddy.
+
+## Printer Connection Issues
+
+### Printer Won't Connect
+
+**Check LAN Mode**
+1. On printer: **Settings** > **Network** > **LAN Mode**
+2. Ensure LAN Mode is **enabled**
+3. Note the **Access Code** (changes when toggled)
+
+**Verify Credentials**
+- **IP Address**: Correct local IP (not cloud address)
+- **Access Code**: 8-character code from LAN Mode screen
+- **Serial Number**: Found in **Settings** > **Device Info**
+
+**Network Issues**
+- Printer and Bambuddy must be on same network
+- Check printer can be pinged: `ping <printer-ip>`
+- Ensure ports 8883 (MQTT) and 990 (FTP) aren't blocked
+
+**Other Applications**
+- Only one MQTT connection allowed per printer
+- Close Bambu Studio or Bambu Handy
+- Disconnect other monitoring tools
+
+### "Connection Refused" Errors
+
+**Printer in Sleep Mode**
+- Wake the printer and try again
+- Sleep mode disconnects MQTT
+
+**Another Connection Active**
+- Close Bambu Studio
+- Close Bambu Handy
+- Wait 30 seconds and retry
+
+**Printer Restart**
+- Power cycle the printer
+- Wait for full boot
+- Try connecting again
+
+### Intermittent Disconnections
+
+**Network Stability**
+- Check WiFi signal strength at printer
+- Consider wired connection if available
+- Reduce network congestion
+
+**Printer Firmware**
+- Update to latest firmware
+- Some versions have MQTT bugs
+
+**Bambuddy Logs**
+- Check `logs/bambuddy.log` for errors
+- Enable DEBUG mode for more detail
+
+---
+
+## Archiving Issues
+
+### Prints Not Archiving Automatically
+
+**Check Connection**
+- Printer must show green (connected)
+- Verify real-time updates are working
+
+**Print Completion**
+- Only completed prints are archived
+- Cancelled prints may not archive
+- Check print actually finished
+
+**FTP Access**
+- Verify FTP connectivity
+- Check logs for FTP errors
+
+**View Logs**
+```bash
+tail -f logs/bambuddy.log
+```
+Look for archiving-related errors.
+
+### 3MF Download Fails
+
+**FTP Connection**
+- Port 990 must be accessible
+- Check firewall settings
+- Verify printer responds to FTP
+
+**File Still in Use**
+- Wait for print to fully complete
+- Printer may still be processing
+
+**Storage Full**
+- Check Bambuddy server disk space
+- Check `archive/` directory size
+
+### Missing Thumbnails
+
+**3MF Content**
+- Some 3MF files lack thumbnails
+- Manually sliced files may not have previews
+
+**Extraction Issue**
+- Check logs for thumbnail errors
+- Re-archive the print if needed
+
+---
+
+## Timelapse Issues
+
+### Timelapse Not Attaching Automatically
+
+**Printer Clock Issue** (Most Common)
+When printers run in LAN-only mode, they can't sync time via NTP. The internal clock drifts, causing timelapse matching to fail.
+
+**Symptoms:**
+- "No matching timelapse found"
+- Files exist on printer but don't attach
+- Printer shows wrong date/time
+
+**Workaround - Manual Selection:**
+1. Right-click archive > **Scan for Timelapse**
+2. If no auto-match, dialog shows available files
+3. Select the correct timelapse
+4. Click to attach
+
+**Permanent Fix:**
+1. Temporarily connect printer to internet
+2. Wait for NTP time sync
+3. Return to LAN-only mode
+4. Clock remains accurate until power cycle
+
+### Timelapse Recording Not Working
+
+**Enable in Printer Settings**
+1. On printer: **Settings** > **Camera**
+2. Enable **Timelapse Recording**
+
+**Storage Space**
+- Timelapses need SD card space
+- Clear old files if full
+
+---
+
+## Frontend Issues
+
+### Frontend Not Loading
+
+**Build the Frontend**
+```bash
+cd frontend
+npm install
+npm run build
+```
+
+**Verify Static Files**
+- Check `/static` folder exists
+- Contains `index.html` and `/assets`
+
+**Clear Browser Cache**
+- Hard refresh: Ctrl+Shift+R (Cmd+Shift+R on Mac)
+- Try incognito/private window
+
+### Blank Page or Errors
+
+**Browser Console**
+- Open DevTools (F12)
+- Check Console for errors
+- Look for failed network requests
+
+**API Connection**
+- Backend must be running
+- Check backend logs for errors
+- Verify port 8000 is accessible
+
+### WebSocket Not Connecting
+
+**Check Backend**
+- Backend must be running
+- WebSocket endpoint: `/api/v1/ws`
+
+**Firewall/Proxy**
+- WebSocket needs persistent connection
+- Some proxies block WebSocket
+- Check network configuration
+
+---
+
+## Database Issues
+
+### Database Errors
+
+**Backup and Reset**
+```bash
+# Backup current database
+mv bambuddy.db bambuddy.db.backup
+
+# Restart Bambuddy - creates new database
+uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
+```
+
+**Migration Issues**
+- New versions may change schema
+- Usually handled automatically
+- Check logs for migration errors
+
+### Data Not Persisting
+
+**File Permissions**
+- Bambuddy needs write access to:
+  - `bambuddy.db`
+  - `archive/` directory
+  - `logs/` directory
+
+**Disk Space**
+- Ensure adequate free space
+- SQLite needs space for transactions
+
+---
+
+## Smart Plug Issues
+
+### Plug Not Responding
+
+**Network**
+1. Verify IP address is correct
+2. Check plug is on same network
+3. Test directly: `http://<plug-ip>/cm?cmnd=Power`
+
+**Tasmota Web Interface**
+- Access `http://<plug-ip>`
+- Verify Tasmota is running
+- Check for firmware updates
+
+**Authentication**
+- If Tasmota has password, configure in Bambuddy
+- Check credentials are correct
+
+### Auto Power-Off Not Working
+
+**Configuration**
+1. Plug must be linked to printer
+2. Automation must be enabled
+3. Auto Off must be enabled
+
+**Temperature Mode**
+- Printer must stay connected
+- Bambuddy reads nozzle temp
+- Check temp threshold setting
+
+**Time Mode**
+- Verify delay value is set
+- Check logs for power-off attempts
+
+---
+
+## Scheduled Print Issues
+
+### Print Not Starting
+
+**Printer Not Ready**
+- Printer must be idle
+- No active prints
+- Printer must connect after power-on
+
+**Smart Plug**
+- If using auto power-on, plug must work
+- Verify plug automation is configured
+
+**Queue Status**
+- Check queue page for errors
+- Look for failed status
+
+### "Failed to Start" Error
+
+**Common Causes**
+- Printer not ready or connected
+- FTP upload failed
+- HMS errors preventing print
+
+**Check:**
+1. Printer HMS status (no errors)
+2. Printer is idle and connected
+3. FTP port 990 accessible
+4. File exists in archive
+
+---
+
+## Notification Issues
+
+### Not Receiving Notifications
+
+**Provider Configuration**
+- Verify credentials are correct
+- Use **Send Test** to verify
+- Check provider-specific requirements
+
+**Event Triggers**
+- Ensure desired events are enabled
+- Check per-printer filtering
+
+**Quiet Hours**
+- Notifications suppressed during quiet hours
+- Verify quiet hours settings
+
+### Test Works But Events Don't
+
+**Event Not Triggering**
+- Verify event type is enabled
+- Check printer filter settings
+- Look for errors in logs
+
+**Daily Digest**
+- If enabled, events are batched
+- Wait for digest time
+- Or disable digest for immediate notifications
+
+---
+
+## Performance Issues
+
+### Slow Interface
+
+**Browser**
+- Clear cache and cookies
+- Try different browser
+- Disable browser extensions
+
+**Backend**
+- Check server resources
+- Review logs for errors
+- Consider DEBUG=false for production
+
+### High Memory Usage
+
+**Large Archives**
+- Many archives increase memory
+- Consider archiving to external storage
+- Clean up old/unwanted archives
+
+**Multiple Printers**
+- Each printer uses MQTT connection
+- Normal for multi-printer setups
+
+---
+
+## Viewing Logs
+
+### Log File Location
+```bash
+# Default location
+logs/bambuddy.log
+
+# View live
+tail -f logs/bambuddy.log
+
+# Search for errors
+grep -i error logs/bambuddy.log
+```
+
+### Enable Debug Logging
+```bash
+DEBUG=true uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
+```
+
+### Systemd Service Logs
+```bash
+sudo journalctl -u bambuddy -f
+```
+
+---
+
+## Getting Help
+
+### Before Asking for Help
+1. Check this troubleshooting guide
+2. Review logs for error messages
+3. Search [existing issues](https://github.com/maziggy/bambuddy/issues)
+4. Enable DEBUG mode and reproduce the issue
+
+### Reporting Issues
+When opening an issue, include:
+- Bambuddy version
+- Printer model
+- Operating system
+- Relevant log snippets
+- Steps to reproduce
+
+[Open a new issue](https://github.com/maziggy/bambuddy/issues/new)

+ 22 - 0
docs/wiki/_Sidebar.md

@@ -0,0 +1,22 @@
+## Getting Started
+- [Home](Home)
+- [Installation](Installation)
+- [Getting Started](Getting-Started)
+
+## Features
+- [Print Archiving](Features-Print-Archiving)
+- [Real-time Monitoring](Features-Monitoring)
+- [Statistics Dashboard](Features-Statistics)
+- [Print Queue & Scheduling](Features-Print-Queue)
+- [Smart Plugs](Features-Smart-Plugs)
+- [Push Notifications](Features-Notifications)
+- [Spoolman Integration](Features-Spoolman)
+- [Cloud Profiles](Features-Cloud-Profiles)
+- [K-Profiles](Features-K-Profiles)
+- [Maintenance Tracker](Features-Maintenance)
+- [File Manager](Features-File-Manager)
+- [External Links](Features-External-Links)
+
+## Reference
+- [API Reference](API-Reference)
+- [Troubleshooting](Troubleshooting)