Selaa lähdekoodia

Panda Breath: show and control it on the printer card (#1466)

- Follow BIQU Panda Breath heaters (firmware 1.0.4+) on the MQTT relay
  broker, matched to their printer by the serial number they report
- Printer card tile with chamber temperature and target, on/off, mode
  and target temperature, also on the card of a printer that is off
- Settings > Network > MQTT Publishing: switch and the heaters found,
  printer names only within the caller's printer access
- Wiki, CHANGELOG, all locales
maziggy 1 viikko sitten
vanhempi
sitoutus
f23e80954e
100 muutettua tiedostoa jossa 1771 lisäystä ja 10 poistoa
  1. 1 0
      CHANGELOG.md
  2. 51 0
      backend/app/api/routes/printers.py
  3. 26 0
      backend/app/api/routes/settings.py
  4. 4 0
      backend/app/main.py
  5. 25 0
      backend/app/schemas/printer.py
  6. 4 0
      backend/app/schemas/settings.py
  7. 2 0
      backend/app/services/github_restore.py
  8. 13 0
      backend/app/services/mqtt_relay.py
  9. 375 0
      backend/app/services/panda_breath.py
  10. 19 0
      backend/app/services/printer_manager.py
  11. 165 0
      backend/tests/integration/test_panda_breath_api.py
  12. 265 0
      backend/tests/unit/test_panda_breath.py
  13. 173 0
      frontend/src/__tests__/pages/PrintersPagePandaBreath.test.tsx
  14. 126 0
      frontend/src/__tests__/pages/SettingsPagePandaBreath.test.tsx
  15. 37 0
      frontend/src/api/client.ts
  16. 18 0
      frontend/src/i18n/locales/de.ts
  17. 18 0
      frontend/src/i18n/locales/en.ts
  18. 18 0
      frontend/src/i18n/locales/es.ts
  19. 18 0
      frontend/src/i18n/locales/fr.ts
  20. 18 0
      frontend/src/i18n/locales/it.ts
  21. 18 0
      frontend/src/i18n/locales/ja.ts
  22. 18 0
      frontend/src/i18n/locales/ko.ts
  23. 18 0
      frontend/src/i18n/locales/nl.ts
  24. 18 0
      frontend/src/i18n/locales/pl.ts
  25. 18 0
      frontend/src/i18n/locales/pt-BR.ts
  26. 18 0
      frontend/src/i18n/locales/ru.ts
  27. 18 0
      frontend/src/i18n/locales/sv.ts
  28. 18 0
      frontend/src/i18n/locales/tr.ts
  29. 18 0
      frontend/src/i18n/locales/uk.ts
  30. 18 0
      frontend/src/i18n/locales/zh-CN.ts
  31. 18 0
      frontend/src/i18n/locales/zh-TW.ts
  32. 136 2
      frontend/src/pages/PrintersPage.tsx
  33. 51 0
      frontend/src/pages/SettingsPage.tsx
  34. 3 0
      frontend/src/utils/printer.ts
  35. 0 0
      static/assets/AdditionalSection-Kh61g0FJ.js
  36. 0 0
      static/assets/AmsUnitCard-CccJXgG8.js
  37. 0 0
      static/assets/ArchivesPage-DSbd4wlh.js
  38. 0 0
      static/assets/AreaChart-Ci1M30j4.js
  39. 0 0
      static/assets/AssignToAmsModal-ClMM3R_q.js
  40. 0 0
      static/assets/AuthContext-Dr8TxDCH.js
  41. 1 1
      static/assets/Button-YIEzmugF.js
  42. 0 0
      static/assets/CamWallPage-DTAkEcdC.js
  43. 0 0
      static/assets/CameraDiagnoseModal-BQ-hIZiU.js
  44. 0 0
      static/assets/CameraPage-DJ6mi_Rd.js
  45. 1 1
      static/assets/Card-K5nKN5mf.js
  46. 0 0
      static/assets/CartesianChart-BFVcatzk.js
  47. 0 0
      static/assets/ColumnConfigModal-DsU6XCrX.js
  48. 0 0
      static/assets/ConfigureAmsSlotModal-B3HIL_-h.js
  49. 0 0
      static/assets/ConfirmModal-BHaT4HcR.js
  50. 0 0
      static/assets/ConfirmOutcomeDialog-BEF_z9FB.js
  51. 0 0
      static/assets/ConnectAuthorizePage-CYyz53Xp.js
  52. 0 0
      static/assets/ConnectionDiagnostic-BrW1q6-W.js
  53. 0 0
      static/assets/ContextMenu-BltrxaUa.js
  54. 0 0
      static/assets/CopyButton-ByIj_5u0.js
  55. 0 0
      static/assets/EmbeddedCameraViewer-BtYVv_bb.js
  56. 0 0
      static/assets/ErrorBarContext-BD_aOrvD.js
  57. 0 0
      static/assets/ExternalLinkPage-FRv-h6qF.js
  58. 1 1
      static/assets/FilamentSwatch-DihBt9jq.js
  59. 0 1
      static/assets/FileManagerPage-DIia0J0V.js
  60. 0 0
      static/assets/FileUploadModal-euGteuPK.js
  61. 0 0
      static/assets/FinancePage-qY38HrUN.js
  62. 0 0
      static/assets/GCodeViewerPage-CKzHDX0S.js
  63. 0 0
      static/assets/GcodeToolpathViewer-CElN1IR6.js
  64. 0 0
      static/assets/GroupEditPage-VtpnnoF1.js
  65. 0 0
      static/assets/IconPicker-Pp4jmvM1.js
  66. 0 0
      static/assets/ImagePreviewModal-CqB88mVI.js
  67. 0 0
      static/assets/InventoryPage-CXDfhcsv.js
  68. 0 0
      static/assets/Layout-DU75Yw6s.js
  69. 0 0
      static/assets/Layout-Ds59PIJR.js
  70. 0 0
      static/assets/LibraryTrashPage-CgRyrHy9.js
  71. 0 0
      static/assets/LoginPage-DrnYydpj.js
  72. 0 0
      static/assets/MaintenancePage-Vts9i0Db.js
  73. 0 0
      static/assets/MergeDuplicatesModal-DtYf6eQM.js
  74. 0 0
      static/assets/ModelSourcesPage-Cbpetws7.js
  75. 0 0
      static/assets/NotificationsPage-Y4ZU283j.js
  76. 1 1
      static/assets/NumberInput-BxywI6iP.js
  77. 1 1
      static/assets/OverlayFrame-Dj1KIq5W.js
  78. 0 0
      static/assets/PdfPreviewModal-D6uYLWhA.js
  79. 0 0
      static/assets/PrintModal-1p6yELnO.js
  80. 0 0
      static/assets/PrinterLocationsPage-CoklKNa4.js
  81. 0 0
      static/assets/PrintersPage-BR3tAzcM.js
  82. 0 0
      static/assets/PrintersPage-Ud8iJx2c.js
  83. 0 0
      static/assets/ProfilesPage-BRJnjKRM.js
  84. 0 0
      static/assets/ProjectDetailPage-D23VQfOs.js
  85. 0 0
      static/assets/ProjectsPage-CvnGiqEp.js
  86. 0 0
      static/assets/QueryClientProvider-BxFZpAP-.js
  87. 0 0
      static/assets/QueuePage-Bob9DCOl.js
  88. 0 0
      static/assets/ReferenceLine-Bj9BZnhh.js
  89. 0 0
      static/assets/RichTextEditor-Drdo15tI.js
  90. 0 0
      static/assets/SettingsPage-n9wzB2Hh.js
  91. 0 0
      static/assets/SetupPage-BrWfvCUo.js
  92. 0 0
      static/assets/SkipObjectsModal-B9P-IS-F.js
  93. 0 0
      static/assets/SliceModal-Coy_jhzI.js
  94. 0 0
      static/assets/SpoolBuddyAmsPage-DMHK4deV.js
  95. 0 0
      static/assets/SpoolBuddyDashboard-T97xCNY6.js
  96. 0 0
      static/assets/SpoolBuddyInventoryPage-AqH6aQK6.js
  97. 1 1
      static/assets/SpoolBuddySettingsPage-h8ZK8unO.js
  98. 0 0
      static/assets/SpoolBuddyWriteTagPage-BINrcuuZ.js
  99. 1 1
      static/assets/SpoolIcon-BUMITbdZ.js
  100. 0 0
      static/assets/SpreadsheetPreviewModal-1Pt6Z5xn.js

+ 1 - 0
CHANGELOG.md

@@ -19,6 +19,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **The profile editor offers the material types of the preferred slicer (#2928, requested by @doncaruana, contributed by @Keybored02 in #3544)** — The **Filament Type** dropdown of a filament profile was one list kept in Bambuddy, with types a slicer does not know (and without ones it does), so a profile could be valid here and not in the slicer. It now offers the types of the slicer chosen under Settings → Slicer: Bambu Studio's or OrcaSlicer's, which differ (Orca has SBS and the PA11/PA12 families, Bambu Studio has TPU-AMS). A profile keeps the type it has, imported or cloud-synced, even if the list does not have it, and changing the preferred slicer changes no existing profile.
 - **The slicer sidecars can be published on one address only (suggested by @pleasantone)** — The sidecar compose file published the slicer ports on every network interface, and the sidecars have no login. The new `SIDECAR_BIND` setting in `slicer-api/.env` limits them to one address: `127.0.0.1` when Bambuddy runs on the same host with its default `network_mode: host`. Left unset, nothing changes, so Bambuddy in bridge mode or on another host still reaches the sidecars
 - **Choose which notifications get the camera photo (#2877, requested by @HappyPuppy21)** — **Attach Photo** on a notification provider sent the snapshot with every event that has one, so a channel that should show the finished print also got a photo at the start and at 25, 50 and 75 percent. With Attach Photo on, the provider's settings now list the photo events it sends, and unticking one sends that event without the photo. Every event keeps its photo until it is unticked, and the provider card names the events that go without one.
+- **BIQU Panda Breath on the printer card (#1466, requested by @embed-3d)** — A Panda Breath chamber heater with firmware 1.0.4 or later can connect to an MQTT broker, and Bambuddy now follows it there. Under **Settings > Network > MQTT Publishing**, turn on **BIQU Panda Breath**; it uses the broker set there, and lists each Panda Breath that reports with the printer it is bound to. The printer card of that printer gets a **Panda Breath** tile with the chamber temperature it reads and its target; clicking it turns the heater on or off, picks Auto, Always on or Drying, and sets a target from 0 to 60 °C. The tile stays on the card while the printer is switched off, since the heater keeps running. The device is matched by the printer serial number it reports, so it needs to be bound to its printer in its own web interface. Changes need the printer control permission for that printer. Not tested on a real device yet. Wiki updated.
 ### Changed
 - **A slice sent again from the slicer adds a print to its archive (#1634, requested by @d3nn3s08, contributed by @Keybored02 in #3508)** — A print from the File Manager or the queue already joined the archive of its file, but a print sent from Bambu Studio or OrcaSlicer, or started on the printer, always got a new archive: the slicer writes a new 3MF each time it sends, so the file never matched, and the archive's print count stayed at one. Bambuddy now also keeps the hash of each archive's G-code, and a print whose G-code matches an archive nobody owns, in no project and not from a File Manager file adds a run to that archive. The archive takes the new 3MF in place of its old one and keeps its photos, timelapses, notes, tags and earlier runs; a name set by hand stays, and a name taken from the file follows the new file. While another print of it is running, the archive keeps its file and only gets the run. A model sliced again with other settings gets an archive of its own. OrcaSlicer writes the slicing time into the G-code, so with it only the same slice sent again matches. Archives made before are read once in the background after the update. Wiki updated.
 - **SpoolBuddy writes OpenTag3D 2.004 on NTAG215 and NTAG216 tags (#3500, suggested by @pleasantone)** — SpoolBuddy wrote the first version of the OpenTag3D layout. The current version moved every field, so a reader that only knows it read the brand, colour, weight and temperatures from the wrong places. Tags with room for it now get version 2.004, with material, brand, colour name, up to four colours, minimum and maximum print temperature, net weight and empty spool weight. Version 2 no longer fits on an NTAG213, so those keep the first version. SpoolBuddy picks by the size the tag reports, and falls back to the first version if it can't read it; a SpoolBuddy that hasn't been updated keeps writing the first version. Bambuddy does not track density or bed temperature, so a version 2 tag leaves them unset. Wiki updated.

+ 51 - 0
backend/app/api/routes/printers.py

@@ -42,6 +42,8 @@ from backend.app.schemas.printer import (
     NextPause,
     NozzleInfoResponse,
     NozzleRackSlot,
+    PandaBreathCommand,
+    PandaBreathState,
     PrinterCreate,
     PrinterDiagnosticResult,
     PrinterFilesDownloadRequest,
@@ -71,6 +73,7 @@ from backend.app.services.bambu_ftp import (
     list_files_result_async,
 )
 from backend.app.services.hms_actions import HMSAction
+from backend.app.services.panda_breath import panda_breath_service
 from backend.app.services.pause_eta import next_pause
 from backend.app.services.print_storage import ftp_probe_paths, print_file_reachable_over_ftp
 from backend.app.services.printer_diagnostic import run_connection_diagnostic
@@ -722,6 +725,18 @@ async def get_printer_status(
     return await _printer_status(db, printer)
 
 
+def _panda_breath_state(printer: Printer) -> PandaBreathState | None:
+    """The Panda Breath bound to this printer, for the status response (#1466).
+
+    By the stored serial number, so a printer that is off or not connected
+    still shows the heater, which keeps running without it.
+    """
+    if not panda_breath_service.enabled:
+        return None
+    state = panda_breath_service.state_for_serial(printer.serial_number)
+    return PandaBreathState(**state) if state else None
+
+
 async def _printer_status(db: AsyncSession, printer: Printer) -> PrinterStatus:
     """The live status of *printer*, as the status endpoints report it."""
     printer_id = printer.id
@@ -737,6 +752,7 @@ async def _printer_status(db: AsyncSession, printer: Printer) -> PrinterStatus:
             name=printer.name,
             connected=False,
             awaiting_plate_clear=printer_manager.is_awaiting_plate_clear(printer_id),
+            panda_breath=_panda_breath_state(printer),
         )
 
     # Determine cover URL if there's an active print (including paused)
@@ -963,6 +979,7 @@ async def _printer_status(db: AsyncSession, printer: Printer) -> PrinterStatus:
         supports_chamber_heater=supports_chamber_heater(printer.model),
         current_archive_id=current_archive_id,
         current_plate_id=current_plate_id,
+        panda_breath=_panda_breath_state(printer),
         fila_switch=(
             FilaSwitchResponse(
                 installed=state.fila_switch.installed,
@@ -3900,6 +3917,40 @@ async def set_chamber_temperature(
     return {"success": True, "message": f"Chamber temperature set to {target}°C"}
 
 
+@router.post("/{printer_id}/panda-breath")
+async def send_panda_breath_command(
+    printer_id: int,
+    body: PandaBreathCommand,
+    _=RequirePrinterPermissionIfAuthEnabled(Permission.PRINTERS_CONTROL),
+    db: AsyncSession = Depends(get_db, scope="function"),
+):
+    """Change one setting of the Panda Breath bound to this printer (#1466).
+
+    The device is found by the printer's serial number, never by an id the
+    caller sends, so a user can only reach the heater of a printer they may
+    control.
+    """
+    changes = body.model_dump(exclude_none=True)
+    if len(changes) != 1:
+        raise HTTPException(400, "Send exactly one of work_on, mode, target_temp")
+
+    result = await db.execute(select(Printer).where(Printer.id == printer_id))
+    printer = result.scalar_one_or_none()
+    if not printer:
+        raise HTTPException(404, "Printer not found")
+
+    device = panda_breath_service.device_for_serial(printer.serial_number)
+    if not device:
+        raise HTTPException(404, "No Panda Breath is bound to this printer")
+
+    key, value = next(iter(changes.items()))
+    if key == "work_on":
+        value = "ON" if value else "OFF"
+    if not panda_breath_service.send_command(device.device_id, key, value):
+        raise HTTPException(503, "The MQTT broker is not connected")
+    return {"success": True}
+
+
 @router.post("/{printer_id}/fan-speed")
 async def set_fan_speed(
     printer_id: int,

+ 26 - 0
backend/app/api/routes/settings.py

@@ -193,6 +193,7 @@ _BOOL_SETTING_KEYS = frozenset(
         "ftp_retry_enabled",
         "mqtt_enabled",
         "mqtt_use_tls",
+        "panda_breath_enabled",
         "ha_enabled",
         "per_printer_mapping_expanded",
         "prometheus_enabled",
@@ -477,6 +478,7 @@ async def update_settings(
         "mqtt_password",
         "mqtt_topic_prefix",
         "mqtt_use_tls",
+        "panda_breath_enabled",
     }
     mqtt_updated = bool(mqtt_keys & set(update_data.keys()))
 
@@ -535,6 +537,7 @@ async def update_settings(
                 "mqtt_password": await get_setting(db, "mqtt_password") or "",
                 "mqtt_topic_prefix": await get_setting(db, "mqtt_topic_prefix") or "bambuddy",
                 "mqtt_use_tls": (await get_setting(db, "mqtt_use_tls") or "false") == "true",
+                "panda_breath_enabled": (await get_setting(db, "panda_breath_enabled") or "false") == "true",
             }
             await mqtt_relay.configure(mqtt_settings)
         except Exception:
@@ -1999,3 +2002,26 @@ async def get_mqtt_status(
     from backend.app.services.mqtt_relay import mqtt_relay
 
     return mqtt_relay.get_status()
+
+
+@router.get("/panda-breath/status")
+async def get_panda_breath_status(
+    _: User | None = RequirePermissionIfAuthEnabled(Permission.SETTINGS_READ),
+    printer_scope: PrinterScope = RequestPrinterScope,
+    db: AsyncSession = Depends(get_db, scope="function"),
+):
+    """Panda Breath heaters heard on the MQTT broker and their printers (#1466).
+
+    A heater bound to a printer outside the caller's scope is listed without
+    naming the printer.
+    """
+    from backend.app.models.printer import Printer
+    from backend.app.services.panda_breath import panda_breath_service
+
+    query = select(Printer.id, Printer.name, Printer.serial_number)
+    in_scope = printer_scope.where_strict(Printer.id)
+    if in_scope is not None:
+        query = query.where(in_scope)
+    rows = await db.execute(query)
+    printers = {(serial or "").strip().upper(): (pid, name) for pid, name, serial in rows.all() if serial}
+    return panda_breath_service.get_status(printers)

+ 4 - 0
backend/app/main.py

@@ -12599,6 +12599,7 @@ async def lifespan(app: FastAPI):
             "mqtt_password": await get_setting(db, "mqtt_password") or "",
             "mqtt_topic_prefix": await get_setting(db, "mqtt_topic_prefix") or "bambuddy",
             "mqtt_use_tls": (await get_setting(db, "mqtt_use_tls") or "false") == "true",
+            "panda_breath_enabled": (await get_setting(db, "panda_breath_enabled") or "false") == "true",
         }
         await mqtt_relay.configure(mqtt_settings)
 
@@ -12814,6 +12815,9 @@ async def lifespan(app: FastAPI):
     await virtual_printer_manager.stop_all()
 
     await mqtt_smart_plug_service.disconnect(timeout=2)
+    from backend.app.services.panda_breath import panda_breath_service
+
+    await panda_breath_service.disconnect(timeout=2)
 
     await mqtt_relay.disconnect(timeout=2)
 

+ 25 - 0
backend/app/schemas/printer.py

@@ -1,4 +1,5 @@
 from datetime import datetime
+from typing import Literal
 from urllib.parse import urlparse
 
 from pydantic import BaseModel, Field, field_serializer, field_validator, model_validator
@@ -450,6 +451,28 @@ class NextPause(BaseModel):
     minutes: int | None = None
 
 
+class PandaBreathState(BaseModel):
+    """What a Panda Breath reports, as the printer card shows it (#1466)."""
+
+    device_id: str
+    online: bool | None = None
+    chamber_temp: float | None = None
+    target_temp: float | None = None
+    work_on: bool | None = None
+    mode: str | None = None
+    filament_drying_mode: str | None = None
+    drying_running: bool | None = None
+    drying_remaining_min: float | None = None
+
+
+class PandaBreathCommand(BaseModel):
+    """One change for a printer's Panda Breath: exactly one field set."""
+
+    work_on: bool | None = None
+    mode: Literal["auto mode", "power on", "filament drying"] | None = None
+    target_temp: int | None = Field(default=None, ge=0, le=60)
+
+
 class PrinterStatus(BaseModel):
     id: int
     name: str
@@ -581,6 +604,8 @@ class PrinterStatus(BaseModel):
     # Set for every active print regardless of plate count; the frontend decides
     # whether to render it based on current_archive_id's is_multi_plate flag.
     current_plate_id: int | None = None
+    # BIQU Panda Breath bound to this printer (#1466), None without one.
+    panda_breath: PandaBreathState | None = None
 
 
 class DiagnosticCheck(BaseModel):

+ 4 - 0
backend/app/schemas/settings.py

@@ -269,6 +269,9 @@ class AppSettings(BaseModel):
     mqtt_password: str = Field(default="", description="MQTT password for authentication (optional)")
     mqtt_topic_prefix: str = Field(default="bambuddy", description="Topic prefix for all published messages")
     mqtt_use_tls: bool = Field(default=False, description="Use TLS/SSL encryption for MQTT connection")
+    panda_breath_enabled: bool = Field(
+        default=False, description="Follow BIQU Panda Breath heaters on the MQTT broker above (#1466)"
+    )
 
     # External URL for notifications
     external_url: str = Field(
@@ -821,6 +824,7 @@ class AppSettingsUpdate(BaseModel):
     mqtt_password: str | None = None
     mqtt_topic_prefix: str | None = None
     mqtt_use_tls: bool | None = None
+    panda_breath_enabled: bool | None = None
     external_url: str | None = None
     docker_compose_dir: str | None = None
     ha_enabled: bool | None = None

+ 2 - 0
backend/app/services/github_restore.py

@@ -103,6 +103,7 @@ _MQTT_SETTING_KEYS = {
     "mqtt_password",
     "mqtt_topic_prefix",
     "mqtt_use_tls",
+    "panda_breath_enabled",
 }
 
 # Keys that decide *who can reach the instance* rather than how it behaves. The
@@ -2426,6 +2427,7 @@ class GitHubRestoreService:
                     "mqtt_password": stored.get("mqtt_password") or "",
                     "mqtt_topic_prefix": stored.get("mqtt_topic_prefix") or "bambuddy",
                     "mqtt_use_tls": (stored.get("mqtt_use_tls") or "false") == "true",
+                    "panda_breath_enabled": (stored.get("panda_breath_enabled") or "false") == "true",
                 }
             )
         except Exception:

+ 13 - 0
backend/app/services/mqtt_relay.py

@@ -53,6 +53,10 @@ class MQTTRelayService:
         """
         self.enabled = settings.get("mqtt_enabled", False)
         self._settings = settings  # Store for smart plug service
+        # Panda Breath heaters (#1466) use this broker too; it decides on its own
+        # whether to connect, so it is told on every path below, including a
+        # broker that was cleared.
+        await self._configure_panda_breath(settings)
 
         if not self.enabled:
             await self.disconnect()
@@ -100,6 +104,15 @@ class MQTTRelayService:
         except Exception as e:
             logger.error("Failed to configure MQTT smart plug service: %s", e)
 
+    @staticmethod
+    async def _configure_panda_breath(settings: dict):
+        try:
+            from backend.app.services.panda_breath import panda_breath_service
+
+            await panda_breath_service.configure(settings)
+        except Exception as e:
+            logger.error("Failed to configure Panda Breath: %s", e)
+
     @property
     def smart_plug_service(self):
         """Get the MQTT smart plug service instance."""

+ 375 - 0
backend/app/services/panda_breath.py

@@ -0,0 +1,375 @@
+"""BIQU Panda Breath chamber heater over MQTT (#1466).
+
+Firmware 1.0.4 added a Home Assistant binding: the device connects to an MQTT
+broker and, for a device id ``<id>``, uses
+
+    panda_breath/<id>/state         JSON document with every value
+    panda_breath/<id>/availability  "online" / "offline"
+    panda_breath/<id>/command       JSON object with the one value to change
+
+The keys and values below are the ones the firmware's own Home Assistant
+discovery messages declare (read from the 1.0.4 image): ``work_on`` and
+``drying_running`` are "ON"/"OFF", ``mode`` is one of MODES, ``target_temp``
+is 0-60 °C. The device is bound to one printer and reports that printer's
+serial number as ``printer_sn``, which is how it is matched to a Bambuddy
+printer.
+
+Bambuddy reuses the broker of the MQTT relay settings, like MQTT smart plugs.
+"""
+
+from __future__ import annotations
+
+import asyncio
+import json
+import logging
+import ssl
+import threading
+from dataclasses import dataclass
+from datetime import datetime, timezone
+from typing import Any
+
+import paho.mqtt.client as mqtt
+from paho.mqtt.enums import CallbackAPIVersion
+
+from backend.app.utils.paho_teardown import retire_paho_client
+
+logger = logging.getLogger(__name__)
+
+TOPIC_PREFIX = "panda_breath"
+MODES = ("auto mode", "power on", "filament drying")
+DRYING_MODES = ("pla", "petg", "custom")
+MAX_TARGET_TEMP_C = 60
+
+
+@dataclass
+class PandaBreathDevice:
+    """The last values one device reported."""
+
+    device_id: str
+    online: bool | None = None
+    chamber_temp: float | None = None
+    target_temp: float | None = None
+    work_on: bool | None = None
+    mode: str | None = None
+    filament_drying_mode: str | None = None
+    drying_running: bool | None = None
+    drying_remaining_min: float | None = None
+    printer_sn: str | None = None
+    last_seen: datetime | None = None
+
+    def to_dict(self, broker_up: bool = True) -> dict[str, Any]:
+        """The values the printer card shows (no printer serial number).
+
+        Without a broker connection nothing can reach the device and its last
+        values are stale, so it counts as offline then.
+        """
+        return {
+            "device_id": self.device_id,
+            "online": self.online if broker_up else False,
+            "chamber_temp": self.chamber_temp,
+            "target_temp": self.target_temp,
+            "work_on": self.work_on,
+            "mode": self.mode,
+            "filament_drying_mode": self.filament_drying_mode,
+            "drying_running": self.drying_running,
+            "drying_remaining_min": self.drying_remaining_min,
+        }
+
+
+def _on_off(value: Any) -> bool | None:
+    if isinstance(value, bool):
+        return value
+    if value is None:
+        return None
+    text = str(value).strip().upper()
+    if text in ("ON", "TRUE", "1"):
+        return True
+    if text in ("OFF", "FALSE", "0"):
+        return False
+    return None
+
+
+def _number(value: Any) -> float | None:
+    if isinstance(value, bool) or value is None:
+        return None
+    try:
+        return float(value)
+    except (TypeError, ValueError):
+        return None
+
+
+def _text(value: Any) -> str | None:
+    if value is None:
+        return None
+    text = str(value).strip()
+    return text or None
+
+
+def _same_serial(a: str | None, b: str | None) -> bool:
+    return bool(a) and bool(b) and a.strip().upper() == b.strip().upper()
+
+
+class PandaBreathService:
+    """Follows Panda Breath devices on the shared broker and sends them commands."""
+
+    def __init__(self) -> None:
+        self.client: mqtt.Client | None = None
+        self.connected = False
+        self.enabled = False
+        self.devices: dict[str, PandaBreathDevice] = {}
+        self._lock = threading.Lock()
+        self._disconnection_event: threading.Event | None = None
+        self._broker = ""
+        self._port = 1883
+        self._username = ""
+        self._password = ""
+        self._use_tls = False
+
+    # -- connection -------------------------------------------------------
+
+    async def configure(self, settings: dict) -> None:
+        """Follow the relay's broker while both MQTT and Panda Breath are on."""
+        enabled = bool(settings.get("mqtt_enabled")) and bool(settings.get("panda_breath_enabled"))
+        broker = settings.get("mqtt_broker") or ""
+        if not enabled or not broker:
+            self.enabled = False
+            await self.disconnect()
+            self._forget_devices()
+            return
+
+        port = int(settings.get("mqtt_port") or 1883)
+        username = settings.get("mqtt_username") or ""
+        password = settings.get("mqtt_password") or ""
+        use_tls = bool(settings.get("mqtt_use_tls"))
+        changed = (broker, port, username, password, use_tls) != (
+            self._broker,
+            self._port,
+            self._username,
+            self._password,
+            self._use_tls,
+        )
+        self._broker, self._port, self._username, self._password, self._use_tls = (
+            broker,
+            port,
+            username,
+            password,
+            use_tls,
+        )
+        self.enabled = True
+        if changed and self.client:
+            await self.disconnect()
+            self._forget_devices()
+        if not self.client:
+            await self._connect()
+
+    def _forget_devices(self) -> None:
+        """Drop every device and refresh the cards that showed one."""
+        with self._lock:
+            serials = {d.printer_sn for d in self.devices.values() if d.printer_sn}
+            self.devices.clear()
+        self._broadcast(serials)
+
+    def _broadcast(self, serials: set[str]) -> None:
+        if not serials:
+            return
+        from backend.app.services.printer_manager import printer_manager
+
+        for serial in serials:
+            printer_id = printer_manager.printer_id_for_serial(serial)
+            if printer_id is not None:
+                printer_manager.schedule_status_broadcast(printer_id)
+
+    def _bound_serials(self) -> set[str]:
+        with self._lock:
+            return {d.printer_sn for d in self.devices.values() if d.printer_sn}
+
+    async def _connect(self) -> None:
+        try:
+            client = mqtt.Client(
+                callback_api_version=CallbackAPIVersion.VERSION2,
+                client_id=f"bambuddy-pandabreath-{id(self)}",
+                protocol=mqtt.MQTTv311,
+            )
+            client.on_connect = self._on_connect
+            client.on_disconnect = self._on_disconnect
+            client.on_message = self._on_message
+            if self._username:
+                client.username_pw_set(self._username, self._password)
+            if self._use_tls:
+                client.tls_set(cert_reqs=ssl.CERT_NONE)
+                client.tls_insecure_set(True)
+            self.client = client
+            try:
+                await asyncio.wait_for(
+                    asyncio.to_thread(client.connect_async, self._broker, self._port, 60),
+                    timeout=3.0,
+                )
+            except TimeoutError:
+                logger.warning("Panda Breath: connection to %s:%s timed out", self._broker, self._port)
+            client.loop_start()
+        except Exception as e:
+            logger.error("Panda Breath: MQTT connection failed: %s", e)
+            self.connected = False
+
+    def _on_connect(self, client, userdata, flags, reason_code, properties=None) -> None:
+        rc = reason_code if isinstance(reason_code, int) else reason_code.value
+        self.connected = rc == 0
+        if self.connected:
+            client.subscribe(f"{TOPIC_PREFIX}/+/state", qos=1)
+            client.subscribe(f"{TOPIC_PREFIX}/+/availability", qos=1)
+            logger.info("Panda Breath: listening on %s:%s", self._broker, self._port)
+        else:
+            logger.warning("Panda Breath: broker refused the connection: %s", reason_code)
+
+    def _on_disconnect(self, client, userdata, flags_or_rc, reason_code=None, properties=None) -> None:
+        was_connected = self.connected
+        self.connected = False
+        if self._disconnection_event:
+            self._disconnection_event.set()
+        if was_connected:
+            # The cards now show their devices offline.
+            self._broadcast(self._bound_serials())
+
+    async def disconnect(self, timeout: float = 0) -> None:
+        if not self.client:
+            return
+        try:
+            self._disconnection_event = threading.Event()
+            self.client.disconnect()
+            await asyncio.to_thread(self._disconnection_event.wait, timeout=timeout)
+            retire_paho_client(self.client, "panda-breath")
+        except Exception as e:
+            logger.debug("Panda Breath disconnect error (ignored): %s", e)
+        finally:
+            self.client = None
+            self.connected = False
+
+    # -- incoming ---------------------------------------------------------
+
+    def _on_message(self, client, userdata, msg) -> None:
+        try:
+            payload = msg.payload.decode("utf-8", errors="replace")
+        except Exception:
+            return
+        printer_ids = self.apply_message(msg.topic or "", payload)
+        if printer_ids:
+            from backend.app.services.printer_manager import printer_manager
+
+            for printer_id in printer_ids:
+                printer_manager.schedule_status_broadcast(printer_id)
+
+    def apply_message(self, topic: str, payload: str) -> set[int]:
+        """Take one message in; return the printers whose card changed."""
+        parts = topic.split("/")
+        if len(parts) != 3 or parts[0] != TOPIC_PREFIX or not parts[1]:
+            return set()
+        device_id, kind = parts[1], parts[2]
+        with self._lock:
+            device = self.devices.get(device_id) or PandaBreathDevice(device_id=device_id)
+            before = (device.to_dict(), device.printer_sn)
+            if kind == "availability":
+                device.online = payload.strip().lower() == "online"
+            elif kind == "state":
+                try:
+                    data = json.loads(payload)
+                except json.JSONDecodeError:
+                    return set()
+                if not isinstance(data, dict):
+                    return set()
+                self._apply_state(device, data)
+                device.online = True if device.online is None else device.online
+            else:
+                return set()
+            device.last_seen = datetime.now(timezone.utc)
+            self.devices[device_id] = device
+            if (device.to_dict(), device.printer_sn) == before:
+                return set()
+            serials = {s for s in (before[1], device.printer_sn) if s}
+        return {pid for pid in (self._printer_id_for_serial(s) for s in serials) if pid is not None}
+
+    @staticmethod
+    def _apply_state(device: PandaBreathDevice, data: dict) -> None:
+        if "chamber_temp" in data:
+            device.chamber_temp = _number(data["chamber_temp"])
+        if "target_temp" in data:
+            device.target_temp = _number(data["target_temp"])
+        if "work_on" in data:
+            device.work_on = _on_off(data["work_on"])
+        if "mode" in data:
+            device.mode = _text(data["mode"])
+        if "filament_drying_mode" in data:
+            device.filament_drying_mode = _text(data["filament_drying_mode"])
+        if "drying_running" in data:
+            device.drying_running = _on_off(data["drying_running"])
+        if "drying_remaining_min" in data:
+            device.drying_remaining_min = _number(data["drying_remaining_min"])
+        if "printer_sn" in data:
+            device.printer_sn = _text(data["printer_sn"])
+
+    @staticmethod
+    def _printer_id_for_serial(serial: str) -> int | None:
+        from backend.app.services.printer_manager import printer_manager
+
+        return printer_manager.printer_id_for_serial(serial)
+
+    # -- lookups ----------------------------------------------------------
+
+    def device_for_serial(self, serial: str | None) -> PandaBreathDevice | None:
+        """The device bound to the printer with this serial number."""
+        if not self.enabled or not serial:
+            return None
+        with self._lock:
+            matches = [d for d in self.devices.values() if _same_serial(d.printer_sn, serial)]
+        if not matches:
+            return None
+        # Two devices claiming one printer: the one heard from last.
+        return max(matches, key=lambda d: d.last_seen or datetime.min.replace(tzinfo=timezone.utc))
+
+    def state_for_serial(self, serial: str | None) -> dict[str, Any] | None:
+        """What the card of the printer with this serial shows, or None."""
+        device = self.device_for_serial(serial)
+        return device.to_dict(self.connected) if device else None
+
+    def state_for_printer(self, printer_id: int | None) -> dict[str, Any] | None:
+        """The same for a connected printer, known by id (WebSocket status)."""
+        if printer_id is None or not self.enabled:
+            return None
+        from backend.app.services.printer_manager import printer_manager
+
+        info = printer_manager.get_printer(printer_id)
+        return self.state_for_serial(info.serial_number if info else None)
+
+    def get_status(self, printers: dict[str, tuple[int, str]]) -> dict[str, Any]:
+        """For Settings: the connection and every device heard from.
+
+        ``printers`` maps an upper-case serial number to (id, name) for the
+        printers the caller may see; a device bound to any other printer is
+        listed without naming it.
+        """
+        with self._lock:
+            devices = list(self.devices.values())
+        rows = []
+        for device in sorted(devices, key=lambda d: d.device_id):
+            printer = printers.get((device.printer_sn or "").strip().upper())
+            rows.append(
+                {
+                    **device.to_dict(self.connected),
+                    "bound": bool(device.printer_sn),
+                    "printer_id": printer[0] if printer else None,
+                    "printer_name": printer[1] if printer else None,
+                }
+            )
+        return {"enabled": self.enabled, "connected": self.connected, "devices": rows}
+
+    # -- outgoing ---------------------------------------------------------
+
+    def send_command(self, device_id: str, key: str, value: Any) -> bool:
+        """Publish one value change; False when the broker is not reachable."""
+        if not self.client or not self.connected:
+            return False
+        topic = f"{TOPIC_PREFIX}/{device_id}/command"
+        info = self.client.publish(topic, json.dumps({key: value}), qos=1, retain=False)
+        return info.rc == mqtt.MQTT_ERR_SUCCESS
+
+
+panda_breath_service = PandaBreathService()

+ 19 - 0
backend/app/services/printer_manager.py

@@ -18,6 +18,7 @@ from backend.app.services.bambu_mqtt import (
     PrinterState,
     get_stage_name,
 )
+from backend.app.services.panda_breath import panda_breath_service
 from backend.app.services.pause_eta import next_pause
 from backend.app.utils.ams_humidity import ams_humidity_percent
 from backend.app.utils.kprofile_lookup import build_slot_k_resolver
@@ -448,6 +449,21 @@ class PrinterManager:
         """Get printer info by ID."""
         return self._printer_info.get(printer_id)
 
+    def printer_id_for_serial(self, serial: str) -> int | None:
+        """The printer with this serial number, ignoring case and blanks."""
+        wanted = (serial or "").strip().upper()
+        if not wanted:
+            return None
+        for printer_id, info in list(self._printer_info.items()):
+            if (info.serial_number or "").strip().upper() == wanted:
+                return printer_id
+        return None
+
+    def schedule_status_broadcast(self, printer_id: int) -> None:
+        """Push this printer's status from any thread, e.g. a Panda Breath update (#1466)."""
+        if self._loop and self._loop.is_running():
+            self._schedule_async(self._broadcast_status_change(printer_id))
+
     def set_current_print_user(self, printer_id: int, user_id: int, username: str, queue_item_id: int | None = None):
         """Track who started the current print (Issue #206), and for which queue item."""
         self._current_print_user[printer_id] = {
@@ -1887,6 +1903,9 @@ def printer_state_to_dict(
         # so surface it here — without this, WebSocket merges drop the flag and the
         # "Clear Plate" button only appears when the 30 s REST fallback poll runs.
         "awaiting_plate_clear": printer_manager.is_awaiting_plate_clear(printer_id) if printer_id else False,
+        # Panda Breath bound to this printer (#1466). Always present, None when
+        # there is none, so a WebSocket merge drops a device that went away.
+        "panda_breath": panda_breath_service.state_for_printer(printer_id),
     }
     # Add cover URL if there's an active print and printer_id is provided
     # Include PAUSE state so skip objects modal can show cover

+ 165 - 0
backend/tests/integration/test_panda_breath_api.py

@@ -0,0 +1,165 @@
+"""Panda Breath routes (#1466): the command goes to the heater bound to the
+printer in the path, found by its serial number, never by a caller's id."""
+
+import json
+from unittest.mock import MagicMock, patch
+
+import pytest
+from httpx import AsyncClient
+
+from backend.app.services.panda_breath import panda_breath_service
+
+
+@pytest.fixture
+def bound(printer_factory):
+    """A printer with a Panda Breath bound to it, on a connected broker."""
+    created = []
+
+    async def _make(**kwargs):
+        printer = await printer_factory(name="P", **kwargs)
+        created.append(printer)
+        with patch("backend.app.services.printer_manager.printer_manager") as pm:
+            pm.printer_id_for_serial.return_value = None
+            panda_breath_service.apply_message(
+                "panda_breath/AABBCC/state",
+                json.dumps({"chamber_temp": 40, "work_on": "ON", "printer_sn": printer.serial_number}),
+            )
+        return printer
+
+    client = MagicMock()
+    client.publish.return_value = MagicMock(rc=0)
+    saved = (panda_breath_service.enabled, panda_breath_service.client, panda_breath_service.connected)
+    panda_breath_service.enabled = True
+    panda_breath_service.client = client
+    panda_breath_service.connected = True
+    yield _make, client
+    panda_breath_service.enabled, panda_breath_service.client, panda_breath_service.connected = saved
+    panda_breath_service.devices.clear()
+
+
+class TestPandaBreathCommand:
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    @pytest.mark.parametrize(
+        ("body", "key", "value"),
+        [
+            ({"work_on": False}, "work_on", "OFF"),
+            ({"work_on": True}, "work_on", "ON"),
+            ({"mode": "filament drying"}, "mode", "filament drying"),
+            ({"target_temp": 55}, "target_temp", 55),
+        ],
+    )
+    async def test_sends_the_change_to_the_bound_device(self, async_client: AsyncClient, bound, body, key, value):
+        make, client = bound
+        printer = await make()
+
+        response = await async_client.post(f"/api/v1/printers/{printer.id}/panda-breath", json=body)
+
+        assert response.status_code == 200
+        client.publish.assert_called_once_with(
+            "panda_breath/AABBCC/command", json.dumps({key: value}), qos=1, retain=False
+        )
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    @pytest.mark.parametrize("body", [{}, {"work_on": True, "mode": "auto mode"}])
+    async def test_exactly_one_change(self, async_client: AsyncClient, bound, body):
+        make, client = bound
+        printer = await make()
+        response = await async_client.post(f"/api/v1/printers/{printer.id}/panda-breath", json=body)
+        assert response.status_code == 400
+        client.publish.assert_not_called()
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    @pytest.mark.parametrize("body", [{"mode": "turbo"}, {"target_temp": 61}, {"target_temp": -1}])
+    async def test_values_the_firmware_does_not_take_are_refused(self, async_client: AsyncClient, bound, body):
+        make, client = bound
+        printer = await make()
+        response = await async_client.post(f"/api/v1/printers/{printer.id}/panda-breath", json=body)
+        assert response.status_code == 422
+        client.publish.assert_not_called()
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_printer_without_a_device(self, async_client: AsyncClient, bound, printer_factory):
+        make, client = bound
+        await make()
+        other = await printer_factory(name="Other")
+        response = await async_client.post(f"/api/v1/printers/{other.id}/panda-breath", json={"work_on": False})
+        assert response.status_code == 404
+        client.publish.assert_not_called()
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_unknown_printer(self, async_client: AsyncClient, bound):
+        response = await async_client.post("/api/v1/printers/99999/panda-breath", json={"work_on": False})
+        assert response.status_code == 404
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_broker_down(self, async_client: AsyncClient, bound):
+        make, client = bound
+        printer = await make()
+        panda_breath_service.connected = False
+        response = await async_client.post(f"/api/v1/printers/{printer.id}/panda-breath", json={"work_on": False})
+        assert response.status_code == 503
+        client.publish.assert_not_called()
+
+
+class TestPandaBreathInStatus:
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_status_of_a_disconnected_printer_carries_it(self, async_client: AsyncClient, bound):
+        """The heater runs with the printer off, so the offline card still gets it,
+        matched by the stored serial number (the printer has no live connection)."""
+        make, _ = bound
+        printer = await make()
+        response = await async_client.get(f"/api/v1/printers/{printer.id}/status")
+
+        assert response.status_code == 200
+        body = response.json()
+        assert body["connected"] is False
+        assert body["panda_breath"]["device_id"] == "AABBCC"
+        assert body["panda_breath"]["chamber_temp"] == 40.0
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_settings_status_names_the_printer(self, async_client: AsyncClient, bound):
+        make, _ = bound
+        printer = await make()
+        response = await async_client.get("/api/v1/settings/panda-breath/status")
+        assert response.status_code == 200
+        [row] = response.json()["devices"]
+        assert (row["device_id"], row["printer_id"], row["printer_name"]) == ("AABBCC", printer.id, "P")
+
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_settings_status_hides_printers_out_of_scope(self, async_client: AsyncClient, bound):
+        from backend.app.core.auth import get_printer_scope_if_auth_enabled
+        from backend.app.core.printer_scope import PrinterScope
+        from backend.app.main import app
+
+        make, _ = bound
+        printer = await make()
+        app.dependency_overrides[get_printer_scope_if_auth_enabled] = lambda: PrinterScope(frozenset({printer.id + 1}))
+        try:
+            response = await async_client.get("/api/v1/settings/panda-breath/status")
+        finally:
+            app.dependency_overrides.pop(get_printer_scope_if_auth_enabled, None)
+
+        [row] = response.json()["devices"]
+        assert row["bound"] is True
+        assert row["printer_name"] is None
+
+
+class TestPandaBreathSetting:
+    @pytest.mark.asyncio
+    @pytest.mark.integration
+    async def test_saving_the_switch_reconfigures_the_service(self, async_client: AsyncClient):
+        with patch("backend.app.services.panda_breath.panda_breath_service.configure") as configure:
+            response = await async_client.put("/api/v1/settings/", json={"panda_breath_enabled": True})
+
+        assert response.status_code == 200
+        assert response.json()["panda_breath_enabled"] is True
+        assert configure.call_args.args[0]["panda_breath_enabled"] is True

+ 265 - 0
backend/tests/unit/test_panda_breath.py

@@ -0,0 +1,265 @@
+"""BIQU Panda Breath over MQTT (#1466).
+
+The payloads are the shape firmware 1.0.4 declares in its Home Assistant
+discovery messages: one JSON state document per device, "ON"/"OFF" switches,
+the three working modes as text, and the bound printer's serial number.
+"""
+
+import json
+from types import SimpleNamespace
+from unittest.mock import MagicMock, patch
+
+import pytest
+
+from backend.app.services.panda_breath import PandaBreathService
+
+STATE = {
+    "chamber_temp": 41.5,
+    "target_temp": 50,
+    "work_on": "ON",
+    "mode": "auto mode",
+    "filament_drying_mode": "pla",
+    "drying_running": "OFF",
+    "drying_remaining_min": 0,
+    "printer_sn": "01P00A123456789",
+    "printer_bind": "bind",
+    "filter_temp": 30,
+}
+
+
+def _service() -> PandaBreathService:
+    service = PandaBreathService()
+    service.enabled = True
+    service.connected = True
+    return service
+
+
+@pytest.fixture
+def printers():
+    """printer_manager knows printer 7 by its serial number, printer 8 by another."""
+    serials = {7: "01P00A123456789", 8: "01P00A999999999"}
+    pm = MagicMock()
+    pm.printer_id_for_serial.side_effect = lambda s: next(
+        (pid for pid, sn in serials.items() if sn.upper() == (s or "").strip().upper()), None
+    )
+    pm.get_printer.side_effect = lambda pid: (
+        SimpleNamespace(serial_number=serials[pid], name=f"P{pid}") if pid in serials else None
+    )
+    with patch("backend.app.services.printer_manager.printer_manager", pm):
+        yield pm
+
+
+class TestApplyMessage:
+    def test_state_document_is_read(self, printers):
+        service = _service()
+        changed = service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+
+        assert changed == {7}
+        assert service.state_for_printer(7) == {
+            "device_id": "AABBCC",
+            "online": True,
+            "chamber_temp": 41.5,
+            "target_temp": 50.0,
+            "work_on": True,
+            "mode": "auto mode",
+            "filament_drying_mode": "pla",
+            "drying_running": False,
+            "drying_remaining_min": 0.0,
+        }
+
+    def test_same_values_again_change_nothing(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        assert service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE)) == set()
+
+    def test_partial_document_keeps_the_other_values(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        service.apply_message("panda_breath/AABBCC/state", json.dumps({"work_on": "OFF"}))
+
+        state = service.state_for_printer(7)
+        assert state["work_on"] is False
+        assert state["chamber_temp"] == 41.5
+
+    def test_availability_marks_offline(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        assert service.apply_message("panda_breath/AABBCC/availability", "offline") == {7}
+        assert service.state_for_printer(7)["online"] is False
+
+    def test_rebinding_updates_both_printers(self, printers):
+        """Moved to another printer: the old card loses it, the new one gains it."""
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        changed = service.apply_message("panda_breath/AABBCC/state", json.dumps({"printer_sn": "01P00A999999999"}))
+
+        assert changed == {7, 8}
+        assert service.state_for_printer(7) is None
+        assert service.state_for_printer(8)["device_id"] == "AABBCC"
+
+    @pytest.mark.parametrize(
+        ("topic", "payload"),
+        [
+            ("panda_breath/AABBCC/state", "not json"),
+            ("panda_breath/AABBCC/state", "[1, 2]"),
+            ("panda_breath/AABBCC/command", json.dumps({"work_on": "ON"})),
+            ("other/AABBCC/state", json.dumps(STATE)),
+            ("panda_breath/state", json.dumps(STATE)),
+        ],
+    )
+    def test_other_messages_are_ignored(self, printers, topic, payload):
+        service = _service()
+        assert service.apply_message(topic, payload) == set()
+        assert service.devices == {}
+
+    def test_unbound_device_reaches_no_printer(self, printers):
+        service = _service()
+        state = {**STATE, "printer_sn": ""}
+        assert service.apply_message("panda_breath/AABBCC/state", json.dumps(state)) == set()
+        assert service.state_for_printer(7) is None
+        assert service.get_status({})["devices"][0]["bound"] is False
+
+    def test_serial_matches_regardless_of_case(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps({**STATE, "printer_sn": " 01p00a123456789 "}))
+        assert service.state_for_printer(7)["device_id"] == "AABBCC"
+
+    def test_disabled_service_shows_nothing(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        service.enabled = False
+        assert service.state_for_printer(7) is None
+        # The command route and the status of an offline printer look up by serial.
+        assert service.device_for_serial("01P00A123456789") is None
+        assert service.state_for_serial("01P00A123456789") is None
+
+
+class TestStatus:
+    def test_lists_devices_with_their_printer(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        status = service.get_status({"01P00A123456789": (7, "P7")})
+
+        assert status["enabled"] is True
+        [row] = status["devices"]
+        assert row["device_id"] == "AABBCC"
+        assert row["printer_id"] == 7
+        assert row["printer_name"] == "P7"
+        assert "printer_sn" not in row
+
+    def test_printer_the_caller_may_not_see_is_not_named(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        [row] = service.get_status({"01P00A999999999": (8, "P8")})["devices"]
+
+        assert row["bound"] is True
+        assert row["printer_id"] is None
+        assert row["printer_name"] is None
+
+
+class TestLostBroker:
+    def test_devices_count_as_offline_without_the_broker(self, printers):
+        """Nothing reaches the device then, so its last values are stale."""
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        service._on_disconnect(None, None, 0)
+
+        assert service.state_for_printer(7)["online"] is False
+        printers.schedule_status_broadcast.assert_called_with(7)
+
+    @pytest.mark.asyncio
+    async def test_switching_off_refreshes_the_cards(self, printers):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        printers.schedule_status_broadcast.reset_mock()
+
+        await service.configure({"mqtt_enabled": True, "panda_breath_enabled": False, "mqtt_broker": "b"})
+
+        printers.schedule_status_broadcast.assert_called_once_with(7)
+        assert service.state_for_printer(7) is None
+
+
+class TestConfigure:
+    @pytest.mark.asyncio
+    @pytest.mark.parametrize(
+        "settings",
+        [
+            {"mqtt_enabled": False, "panda_breath_enabled": True, "mqtt_broker": "b"},
+            {"mqtt_enabled": True, "panda_breath_enabled": False, "mqtt_broker": "b"},
+            {"mqtt_enabled": True, "panda_breath_enabled": True, "mqtt_broker": ""},
+        ],
+    )
+    async def test_off_unless_mqtt_and_panda_breath_are_on(self, printers, settings):
+        service = _service()
+        service.apply_message("panda_breath/AABBCC/state", json.dumps(STATE))
+        with patch.object(service, "_connect") as connect:
+            await service.configure(settings)
+
+        connect.assert_not_called()
+        assert service.enabled is False
+        assert service.devices == {}
+
+    @pytest.mark.asyncio
+    async def test_on_connects_to_the_relay_broker(self):
+        service = PandaBreathService()
+        with patch.object(service, "_connect") as connect:
+            await service.configure(
+                {"mqtt_enabled": True, "panda_breath_enabled": True, "mqtt_broker": "broker", "mqtt_port": 1884}
+            )
+
+        connect.assert_called_once()
+        assert service.enabled is True
+        assert (service._broker, service._port) == ("broker", 1884)
+
+    def test_subscribes_to_state_and_availability(self):
+        service = PandaBreathService()
+        client = MagicMock()
+        service._on_connect(client, None, {}, 0)
+
+        topics = [c.args[0] for c in client.subscribe.call_args_list]
+        assert topics == ["panda_breath/+/state", "panda_breath/+/availability"]
+
+
+class TestSendCommand:
+    def test_publishes_one_value_on_the_device_command_topic(self):
+        service = _service()
+        service.client = MagicMock()
+        service.client.publish.return_value = MagicMock(rc=0)
+        service.connected = True
+
+        assert service.send_command("AABBCC", "mode", "filament drying") is True
+        service.client.publish.assert_called_once_with(
+            "panda_breath/AABBCC/command", json.dumps({"mode": "filament drying"}), qos=1, retain=False
+        )
+
+    def test_not_connected_sends_nothing(self):
+        service = _service()
+        service.client = MagicMock()
+        service.connected = False
+
+        assert service.send_command("AABBCC", "work_on", "OFF") is False
+        service.client.publish.assert_not_called()
+
+
+class TestStatusBroadcast:
+    def test_a_change_pushes_the_printer_status(self, printers):
+        service = _service()
+        msg = MagicMock(topic="panda_breath/AABBCC/state", payload=json.dumps(STATE).encode())
+        service._on_message(None, None, msg)
+
+        printers.schedule_status_broadcast.assert_called_once_with(7)
+
+
+class TestWebSocketStatus:
+    def test_printer_status_payload_carries_the_device(self):
+        """The card is fed over the WebSocket; without the key there a merge
+        would keep a device that has gone away."""
+        from backend.app.services.bambu_mqtt import PrinterState
+        from backend.app.services.printer_manager import printer_state_to_dict
+
+        with patch("backend.app.services.printer_manager.panda_breath_service") as service:
+            service.state_for_printer.return_value = {"device_id": "AABBCC"}
+            assert printer_state_to_dict(PrinterState(), 7)["panda_breath"] == {"device_id": "AABBCC"}
+            service.state_for_printer.return_value = None
+            assert printer_state_to_dict(PrinterState(), 7)["panda_breath"] is None
+        service.state_for_printer.assert_called_with(7)

+ 173 - 0
frontend/src/__tests__/pages/PrintersPagePandaBreath.test.tsx

@@ -0,0 +1,173 @@
+/**
+ * BIQU Panda Breath on the printer card (#1466): the tile shows the heater
+ * bound to the printer, and its popover sends one change per click to that
+ * printer's panda-breath route.
+ */
+import { describe, it, expect, vi, beforeEach } from 'vitest';
+import { screen, waitFor, within } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import { http, HttpResponse } from 'msw';
+import { server } from '../mocks/server';
+
+const permissions = { denied: new Set<string>() };
+
+const mockUseAuth = {
+  user: { id: 1, username: 'operator', permissions: [] as string[] },
+  authEnabled: true,
+  loading: false,
+  isAdmin: false,
+  login: vi.fn(),
+  loginWithToken: vi.fn(),
+  logout: vi.fn(),
+  refreshAuth: vi.fn(),
+  hasPermission: vi.fn((permission: string) => !permissions.denied.has(permission)),
+  hasAnyPermission: vi.fn(() => true),
+  canModify: vi.fn(() => true),
+};
+
+vi.mock('../../contexts/AuthContext', async (importOriginal) => {
+  const actual = await importOriginal<typeof import('../../contexts/AuthContext')>();
+  return { ...actual, useAuth: () => mockUseAuth };
+});
+
+import { render } from '../utils';
+import { PrintersPage } from '../../pages/PrintersPage';
+
+const PRINTER_ID = 3;
+
+const panda = (extra: Record<string, unknown> = {}) => ({
+  device_id: 'AABBCC',
+  online: true,
+  chamber_temp: 41.4,
+  target_temp: 50,
+  work_on: true,
+  mode: 'auto mode',
+  filament_drying_mode: 'pla',
+  drying_running: false,
+  drying_remaining_min: 0,
+  ...extra,
+});
+
+function setup(pandaBreath: Record<string, unknown> | null, connected = true) {
+  const sent: unknown[] = [];
+  server.use(
+    http.get('/api/v1/printers/', () =>
+      HttpResponse.json([
+        {
+          id: PRINTER_ID,
+          name: 'Test X1C',
+          ip_address: '192.0.2.103',
+          serial_number: '00M09A350100003',
+          access_code: '12345678',
+          model: 'X1C',
+          enabled: true,
+          nozzle_diameter: 0.4,
+          nozzle_type: 'hardened_steel',
+          auto_archive: true,
+          created_at: '2024-01-01T00:00:00Z',
+          updated_at: '2024-01-01T00:00:00Z',
+        },
+      ])
+    ),
+    http.get('/api/v1/queue/', () => HttpResponse.json([])),
+    http.get('/api/v1/printers/:id/status', () =>
+      HttpResponse.json({
+        connected,
+        state: connected ? 'IDLE' : null,
+        progress: 0,
+        temperatures: { nozzle: 25, bed: 25, chamber: 25 },
+        vt_tray: [],
+        ams: [],
+        panda_breath: pandaBreath,
+      })
+    ),
+    http.post('/api/v1/printers/:id/panda-breath', async ({ request, params }) => {
+      sent.push({ printer: Number(params.id), body: await request.json() });
+      return HttpResponse.json({ success: true });
+    })
+  );
+  render(<PrintersPage />);
+  return sent;
+}
+
+async function openPopover(user: ReturnType<typeof userEvent.setup>) {
+  await user.click(await screen.findByTestId('panda-breath-tile'));
+  return (await screen.findAllByText('Panda Breath')).map((el) => el.parentElement as HTMLElement).at(-1)!;
+}
+
+describe('PrintersPage: Panda Breath tile', () => {
+  beforeEach(() => {
+    permissions.denied = new Set();
+  });
+
+  it('shows the chamber reading and target of the bound heater', async () => {
+    setup(panda());
+    const tile = await screen.findByTestId('panda-breath-tile');
+    expect(tile).toHaveTextContent('41°C / 50°');
+  });
+
+  it('no tile without a bound heater', async () => {
+    setup(null);
+    await screen.findByText('Test X1C');
+    expect(screen.queryByTestId('panda-breath-tile')).not.toBeInTheDocument();
+  });
+
+  it('an offline heater says so and opens no controls', async () => {
+    const user = userEvent.setup();
+    setup(panda({ online: false }));
+    const tile = await screen.findByTestId('panda-breath-tile');
+    expect(tile).toHaveTextContent('Offline');
+    await user.click(tile);
+    expect(screen.queryByText('Target temperature (0-60 °C):')).not.toBeInTheDocument();
+  });
+
+  it('turning off sends work_on=false for this printer', async () => {
+    const user = userEvent.setup();
+    const sent = setup(panda());
+    const pop = await openPopover(user);
+    await user.click(within(pop).getByRole('button', { name: 'Turn off' }));
+    await waitFor(() => expect(sent).toEqual([{ printer: PRINTER_ID, body: { work_on: false } }]));
+  });
+
+  it('a mode button sends that mode', async () => {
+    const user = userEvent.setup();
+    const sent = setup(panda());
+    const pop = await openPopover(user);
+    expect(within(pop).getByRole('button', { name: 'Auto' })).toHaveAttribute('aria-pressed', 'true');
+    await user.click(within(pop).getByRole('button', { name: 'Drying' }));
+    await waitFor(() => expect(sent).toEqual([{ printer: PRINTER_ID, body: { mode: 'filament drying' } }]));
+  });
+
+  it('a custom target sends target_temp', async () => {
+    const user = userEvent.setup();
+    const sent = setup(panda());
+    const pop = await openPopover(user);
+    await user.type(within(pop).getByPlaceholderText('Custom'), '55');
+    await user.click(within(pop).getByRole('button', { name: 'Set' }));
+    await waitFor(() => expect(sent).toEqual([{ printer: PRINTER_ID, body: { target_temp: 55 } }]));
+  });
+
+  it('without the control right the tile opens nothing', async () => {
+    const user = userEvent.setup();
+    permissions.denied = new Set(['printers:control']);
+    setup(panda());
+    await user.click(await screen.findByTestId('panda-breath-tile'));
+    expect(screen.queryByText('Target temperature (0-60 °C):')).not.toBeInTheDocument();
+  });
+
+  it('stays on the card of a printer that is off, where the heater keeps running', async () => {
+    const user = userEvent.setup();
+    const sent = setup(panda({ mode: 'filament drying' }), false);
+    const pop = await openPopover(user);
+    await user.click(within(pop).getByRole('button', { name: 'Turn off' }));
+    await waitFor(() => expect(sent).toEqual([{ printer: PRINTER_ID, body: { work_on: false } }]));
+  });
+
+  it('on the card of a printer that is off, too, only the control right opens it', async () => {
+    const user = userEvent.setup();
+    permissions.denied = new Set(['printers:control']);
+    setup(panda(), false);
+    await user.click(await screen.findByTestId('panda-breath-tile'));
+    expect(screen.queryByText('Target temperature (0-60 °C):')).not.toBeInTheDocument();
+  });
+});

+ 126 - 0
frontend/src/__tests__/pages/SettingsPagePandaBreath.test.tsx

@@ -0,0 +1,126 @@
+/**
+ * The BIQU Panda Breath switch under MQTT (#1466): it saves with the other
+ * MQTT settings, and once on, lists each heater with the printer it is bound to.
+ */
+
+import { describe, it, expect, beforeEach, vi } from 'vitest';
+import { screen, waitFor } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import { http, HttpResponse } from 'msw';
+import { render } from '../utils';
+import { server } from '../mocks/server';
+import { SettingsPage } from '../../pages/SettingsPage';
+import { setAuthToken } from '../../api/client';
+
+const baseSettings = {
+  auto_archive: true,
+  save_thumbnails: true,
+  capture_finish_photo: true,
+  default_filament_cost: 25.0,
+  currency: 'USD',
+  time_format: 'system',
+  date_format: 'system',
+  mqtt_enabled: true,
+  mqtt_broker: 'broker.example',
+  mqtt_port: 1883,
+  mqtt_username: '',
+  mqtt_password: '',
+  mqtt_topic_prefix: 'bambuddy',
+  mqtt_use_tls: false,
+  ha_enabled: false,
+  ha_url: '',
+  ha_token: '',
+  check_updates: false,
+  check_printer_firmware: false,
+};
+
+describe('SettingsPage: Panda Breath', () => {
+  let saves: Record<string, unknown>[];
+
+  function serve(panda_breath_enabled: boolean) {
+    const settings = { ...baseSettings, panda_breath_enabled };
+    server.use(
+      http.get('/api/v1/settings/', () => HttpResponse.json(settings)),
+      http.put('/api/v1/settings/', async ({ request }) => {
+        const body = (await request.json()) as Record<string, unknown>;
+        saves.push(body);
+        return HttpResponse.json({ ...settings, ...body });
+      }),
+      http.get('/api/v1/settings/panda-breath/status', () =>
+        HttpResponse.json({
+          enabled: true,
+          connected: true,
+          devices: [
+            { device_id: 'AABBCC', online: true, bound: true, printer_id: 3, printer_name: 'Workshop X1C' },
+            { device_id: 'DDEEFF', online: false, bound: false, printer_id: null, printer_name: null },
+          ],
+        })
+      ),
+    );
+  }
+
+  beforeEach(() => {
+    window.history.replaceState({}, '', '/');
+    vi.mocked(localStorage.getItem).mockReset();
+    localStorage.clear();
+    setAuthToken(null);
+    saves = [];
+    server.use(
+      http.get('/api/v1/printers/', () => HttpResponse.json([])),
+      http.get('/api/v1/smart-plugs/', () => HttpResponse.json([])),
+      http.get('/api/v1/notifications/', () => HttpResponse.json([])),
+      http.get('/api/v1/api-keys/', () => HttpResponse.json([])),
+      http.get('/api/v1/virtual-printer/status', () => HttpResponse.json({ running: false })),
+      http.get('/api/v1/auth/status', () => HttpResponse.json({ auth_enabled: false, requires_setup: false })),
+      http.get('/api/v1/external-links/', () => HttpResponse.json([])),
+    );
+  });
+
+  async function openNetwork() {
+    const user = userEvent.setup();
+    render(<SettingsPage />);
+    await screen.findByText('Date Format');
+    await user.click(screen.getByText('Network'));
+    await screen.findByText('MQTT Publishing');
+    // The page suppresses auto-save right after the settings load.
+    await new Promise((resolve) => setTimeout(resolve, 200));
+    return user;
+  }
+
+  it('switching it on saves panda_breath_enabled', async () => {
+    serve(false);
+    const user = await openNetwork();
+
+    await user.click(screen.getByRole('checkbox', { name: 'BIQU Panda Breath' }));
+
+    await waitFor(() => expect(saves.length).toBeGreaterThan(0), { timeout: 3000 });
+    expect(saves.at(-1)).toMatchObject({ panda_breath_enabled: true });
+  });
+
+  it('lists each heater with the printer it is bound to', async () => {
+    serve(true);
+    await openNetwork();
+
+    expect(await screen.findByText('AABBCC')).toBeInTheDocument();
+    expect(screen.getByText('bound to Workshop X1C')).toBeInTheDocument();
+    expect(screen.getByText('not bound to a printer')).toBeInTheDocument();
+  });
+
+  it('switched off, it lists nothing', async () => {
+    serve(false);
+    await openNetwork();
+
+    expect(screen.getByRole('checkbox', { name: 'BIQU Panda Breath' })).not.toBeChecked();
+    expect(screen.queryByText('AABBCC')).not.toBeInTheDocument();
+  });
+
+  it('switching it off hides the list', async () => {
+    serve(true);
+    const user = await openNetwork();
+    await screen.findByText('AABBCC');
+
+    await user.click(screen.getByRole('checkbox', { name: 'BIQU Panda Breath' }));
+
+    await waitFor(() => expect(screen.queryByText('AABBCC')).not.toBeInTheDocument(), { timeout: 3000 });
+  });
+});

+ 37 - 0
frontend/src/api/client.ts

@@ -801,6 +801,34 @@ export interface PrinterStatus {
   drying_screen_only?: boolean;
   // Active chamber heater (responds to M141). True only for H2C/H2D/H2DPro/H2S/X2D.
   supports_chamber_heater?: boolean;
+  // BIQU Panda Breath bound to this printer (#1466), null without one.
+  panda_breath?: PandaBreathState | null;
+}
+
+export type PandaBreathMode = 'auto mode' | 'power on' | 'filament drying';
+
+export interface PandaBreathState {
+  device_id: string;
+  online: boolean | null;
+  chamber_temp: number | null;
+  target_temp: number | null;
+  work_on: boolean | null;
+  mode: string | null;
+  filament_drying_mode: string | null;
+  drying_running: boolean | null;
+  drying_remaining_min: number | null;
+}
+
+export interface PandaBreathCommand {
+  work_on?: boolean;
+  mode?: PandaBreathMode;
+  target_temp?: number;
+}
+
+export interface PandaBreathStatus {
+  enabled: boolean;
+  connected: boolean;
+  devices: (PandaBreathState & { bound: boolean; printer_id: number | null; printer_name: string | null })[];
 }
 
 export interface PrinterCreate {
@@ -1566,6 +1594,8 @@ export interface AppSettings {
   mqtt_password: string;
   mqtt_topic_prefix: string;
   mqtt_use_tls: boolean;
+  // BIQU Panda Breath heaters on the same broker (#1466)
+  panda_breath_enabled: boolean;
   // External URL for notifications
   external_url: string;
   // Directory holding docker-compose.yml, shown in the update instructions (#2664)
@@ -5556,6 +5586,12 @@ export const api = {
       method: 'POST',
     }),
 
+  sendPandaBreathCommand: (printerId: number, command: PandaBreathCommand) =>
+    request<{ success: boolean }>(`/printers/${printerId}/panda-breath`, {
+      method: 'POST',
+      body: JSON.stringify(command),
+    }),
+
   setFanSpeed: (printerId: number, fan: 'part' | 'aux' | 'aux2' | 'chamber', speed: number) =>
     request<{ success: boolean; message: string }>(`/printers/${printerId}/fan-speed?fan=${fan}&speed=${speed}`, {
       method: 'POST',
@@ -6571,6 +6607,7 @@ export const api = {
       body: JSON.stringify(data),
     }),
   getMQTTStatus: () => request<MQTTStatus>('/settings/mqtt/status'),
+  getPandaBreathStatus: () => request<PandaBreathStatus>('/settings/panda-breath/status'),
   exportBackup: async (): Promise<{ blob: Blob; filename: string }> => {
     // New simplified backup - complete database + all files
     const url = `${API_BASE}/settings/backup`;

+ 18 - 0
frontend/src/i18n/locales/de.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Drucker wird automatisch referenziert…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'An den Panda Breath gesendet',
+      offline: 'Offline',
+      turnOn: 'Einschalten',
+      turnOff: 'Ausschalten',
+      modeAuto: 'Auto',
+      modeOn: 'Dauerhaft an',
+      modeDrying: 'Trocknen',
+      dryingLeft: 'Trocknet, noch {{minutes}} Min.',
+      targetHint: 'Zieltemperatur (0-60 °C):',
+    },
     permission: {
       noAdd: 'Sie haben keine Berechtigung, Drucker hinzuzufügen',
       noEdit: 'Sie haben keine Berechtigung, Drucker zu bearbeiten',
@@ -2388,6 +2399,13 @@ export default {
     urlFromEnvReadOnly: 'Wert wird über HA_URL Umgebungsvariable gesetzt (schreibgeschützt)',
     tokenFromEnvReadOnly: 'Wert wird über HA_TOKEN Umgebungsvariable gesetzt (schreibgeschützt)',
     // MQTT
+    pandaBreath: {
+      hint: 'Panda-Breath-Heizungen anzeigen und steuern, die diesen Broker nutzen (Firmware 1.0.4 oder neuer, Home-Assistant-Anbindung). Jede erscheint bei dem Drucker, an den sie gebunden ist.',
+      noDevices: 'Noch hat sich kein Panda Breath gemeldet.',
+      boundTo: 'gebunden an {{printer}}',
+      unknownPrinter: 'an einen hier nicht angezeigten Drucker gebunden',
+      notBound: 'an keinen Drucker gebunden',
+    },
     mqttConnectedTo: 'Verbunden mit',
     // Prometheus
     prometheusDescription: 'Druckerdaten im Prometheus-Format bereitstellen',

+ 18 - 0
frontend/src/i18n/locales/en.ts

@@ -634,6 +634,17 @@ export default {
       homingStarted: 'Auto-homing printer…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Sent to the Panda Breath',
+      offline: 'Offline',
+      turnOn: 'Turn on',
+      turnOff: 'Turn off',
+      modeAuto: 'Auto',
+      modeOn: 'Always on',
+      modeDrying: 'Drying',
+      dryingLeft: 'Drying, {{minutes}} min left',
+      targetHint: 'Target temperature (0-60 °C):',
+    },
     permission: {
       noAdd: 'You do not have permission to add printers',
       noEdit: 'You do not have permission to edit printers',
@@ -2410,6 +2421,13 @@ export default {
     urlFromEnvReadOnly: 'Value set by HA_URL environment variable (read-only)',
     tokenFromEnvReadOnly: 'Value set by HA_TOKEN environment variable (read-only)',
     // MQTT
+    pandaBreath: {
+      hint: 'Show and control Panda Breath heaters that use this broker (firmware 1.0.4 or later, Home Assistant binding). Each one appears on the printer it is bound to.',
+      noDevices: 'No Panda Breath has reported yet.',
+      boundTo: 'bound to {{printer}}',
+      unknownPrinter: 'bound to a printer not shown here',
+      notBound: 'not bound to a printer',
+    },
     mqttConnectedTo: 'Connected to',
     // Prometheus
     prometheusDescription: 'Expose printer data in Prometheus format',

+ 18 - 0
frontend/src/i18n/locales/es.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Llevando la impresora al origen…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Enviado al Panda Breath',
+      offline: 'Sin conexión',
+      turnOn: 'Encender',
+      turnOff: 'Apagar',
+      modeAuto: 'Automático',
+      modeOn: 'Siempre encendido',
+      modeDrying: 'Secado',
+      dryingLeft: 'Secando, quedan {{minutes}} min',
+      targetHint: 'Temperatura objetivo (0-60 °C):',
+    },
     permission: {
       noAdd: 'No tiene permiso para añadir impresoras',
       noEdit: 'No tiene permiso para editar impresoras',
@@ -2391,6 +2402,13 @@ export default {
     urlFromEnvReadOnly: 'Valor establecido por la variable de entorno HA_URL (solo lectura)',
     tokenFromEnvReadOnly: 'Valor establecido por la variable de entorno HA_TOKEN (solo lectura)',
     // MQTT
+    pandaBreath: {
+      hint: 'Muestra y controla los calefactores Panda Breath que usan este broker (firmware 1.0.4 o posterior, vinculación con Home Assistant). Cada uno aparece en la impresora a la que está vinculado.',
+      noDevices: 'Ningún Panda Breath ha informado todavía.',
+      boundTo: 'vinculado a {{printer}}',
+      unknownPrinter: 'vinculado a una impresora que no se muestra aquí',
+      notBound: 'no vinculado a ninguna impresora',
+    },
     mqttConnectedTo: 'Conectado a',
     // Prometheus
     prometheusDescription: 'Exponer los datos de la impresora en formato Prometheus',

+ 18 - 0
frontend/src/i18n/locales/fr.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Référencement automatique en cours…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Envoyé au Panda Breath',
+      offline: 'Hors ligne',
+      turnOn: 'Allumer',
+      turnOff: 'Éteindre',
+      modeAuto: 'Auto',
+      modeOn: 'Toujours allumé',
+      modeDrying: 'Séchage',
+      dryingLeft: 'Séchage, encore {{minutes}} min',
+      targetHint: 'Température cible (0-60 °C) :',
+    },
     permission: {
       noAdd: 'Pas d\'autorisation pour ajouter',
       noEdit: 'Pas d\'autorisation pour modifier',
@@ -2343,6 +2354,13 @@ export default {
     urlFromEnvReadOnly: 'Valeur HA_URL (lecture seule)',
     tokenFromEnvReadOnly: 'Valeur HA_TOKEN (lecture seule)',
     // MQTT
+    pandaBreath: {
+      hint: 'Afficher et piloter les chauffages Panda Breath qui utilisent ce broker (firmware 1.0.4 ou plus récent, liaison Home Assistant). Chacun apparaît sur l\'imprimante à laquelle il est lié.',
+      noDevices: 'Aucun Panda Breath ne s\'est encore signalé.',
+      boundTo: 'lié à {{printer}}',
+      unknownPrinter: 'lié à une imprimante non affichée ici',
+      notBound: 'lié à aucune imprimante',
+    },
     mqttConnectedTo: 'Connecté à',
     // Prometheus
     prometheusDescription: 'Exposer les données au format Prometheus',

+ 18 - 0
frontend/src/i18n/locales/it.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Azzeramento automatico in corso…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Inviato al Panda Breath',
+      offline: 'Offline',
+      turnOn: 'Accendi',
+      turnOff: 'Spegni',
+      modeAuto: 'Auto',
+      modeOn: 'Sempre acceso',
+      modeDrying: 'Essiccazione',
+      dryingLeft: 'Essiccazione, mancano {{minutes}} min',
+      targetHint: 'Temperatura obiettivo (0-60 °C):',
+    },
     permission: {
       noAdd: 'Non hai il permesso di aggiungere stampanti',
       noEdit: 'Non hai il permesso di modificare stampanti',
@@ -2343,6 +2354,13 @@ export default {
     urlFromEnvReadOnly: 'Valore impostato dalla variabile d\'ambiente HA_URL (sola lettura)',
     tokenFromEnvReadOnly: 'Valore impostato dalla variabile d\'ambiente HA_TOKEN (sola lettura)',
     // MQTT
+    pandaBreath: {
+      hint: 'Mostra e controlla i riscaldatori Panda Breath che usano questo broker (firmware 1.0.4 o successivo, collegamento Home Assistant). Ognuno appare sulla stampante a cui è collegato.',
+      noDevices: 'Nessun Panda Breath si è ancora segnalato.',
+      boundTo: 'collegato a {{printer}}',
+      unknownPrinter: 'collegato a una stampante non mostrata qui',
+      notBound: 'non collegato a nessuna stampante',
+    },
     mqttConnectedTo: 'Connesso a',
     // Prometheus
     prometheusDescription: 'Esponi dati stampante in formato Prometheus',

+ 18 - 0
frontend/src/i18n/locales/ja.ts

@@ -628,6 +628,17 @@ export default {
       homingStarted: 'プリンターをオートホーミング中…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Panda Breath に送信しました',
+      offline: 'オフライン',
+      turnOn: 'オンにする',
+      turnOff: 'オフにする',
+      modeAuto: '自動',
+      modeOn: '常時オン',
+      modeDrying: '乾燥',
+      dryingLeft: '乾燥中、残り {{minutes}} 分',
+      targetHint: '目標温度 (0-60 °C):',
+    },
     permission: {
       noAdd: 'プリンターを追加する権限がありません',
       noEdit: 'プリンターを編集する権限がありません',
@@ -2387,6 +2398,13 @@ export default {
     urlFromEnvReadOnly: 'HA_URL環境変数で設定された値(読み取り専用)',
     tokenFromEnvReadOnly: 'HA_TOKEN環境変数で設定された値(読み取り専用)',
     // MQTT
+    pandaBreath: {
+      hint: 'このブローカーを使う Panda Breath ヒーターを表示・操作します(ファームウェア 1.0.4 以降、Home Assistant 連携)。各ヒーターは紐付けられたプリンターに表示されます。',
+      noDevices: 'まだ Panda Breath から報告がありません。',
+      boundTo: '{{printer}} に紐付け',
+      unknownPrinter: 'ここに表示されていないプリンターに紐付け',
+      notBound: 'プリンター未紐付け',
+    },
     mqttConnectedTo: '接続先:',
     // Prometheus
     prometheusDescription: 'プリンターデータをPrometheus形式で公開',

+ 18 - 0
frontend/src/i18n/locales/ko.ts

@@ -597,6 +597,17 @@ export default {
       moveAnyway: '그냥 이동',
       homingStarted: '프린터 자동 홈 설정 중…'
     },
+    pandaBreath: {
+      sent: 'Panda Breath로 전송했습니다',
+      offline: '오프라인',
+      turnOn: '켜기',
+      turnOff: '끄기',
+      modeAuto: '자동',
+      modeOn: '항상 켜짐',
+      modeDrying: '건조',
+      dryingLeft: '건조 중, {{minutes}}분 남음',
+      targetHint: '목표 온도 (0-60 °C):',
+    },
     permission: {
       noAdd: '프린터를 추가할 권한이 없습니다',
       noEdit: '프린터를 편집할 권한이 없습니다',
@@ -2283,6 +2294,13 @@ export default {
     autoEnabledViaEnv: '환경 변수를 통해 자동 활성화됨',
     urlFromEnvReadOnly: 'HA_URL 환경 변수에서 값 설정됨 (읽기 전용)',
     tokenFromEnvReadOnly: 'HA_TOKEN 환경 변수에서 값 설정됨 (읽기 전용)',
+    pandaBreath: {
+      hint: '이 브로커를 사용하는 Panda Breath 히터를 표시하고 제어합니다(펌웨어 1.0.4 이상, Home Assistant 연동). 각 히터는 연결된 프린터에 표시됩니다.',
+      noDevices: '아직 보고한 Panda Breath가 없습니다.',
+      boundTo: '{{printer}}에 연결됨',
+      unknownPrinter: '여기에 표시되지 않은 프린터에 연결됨',
+      notBound: '프린터에 연결되지 않음',
+    },
     mqttConnectedTo: '연결됨',
     prometheusDescription: 'Prometheus 형식으로 프린터 데이터 노출',
     noSmartPlugsTitle: '설정된 스마트 플러그 없음',

+ 18 - 0
frontend/src/i18n/locales/nl.ts

@@ -632,6 +632,17 @@ export default {
       homingStarted: 'Printer automatisch homen…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Naar de Panda Breath gestuurd',
+      offline: 'Offline',
+      turnOn: 'Aanzetten',
+      turnOff: 'Uitzetten',
+      modeAuto: 'Auto',
+      modeOn: 'Altijd aan',
+      modeDrying: 'Drogen',
+      dryingLeft: 'Droogt, nog {{minutes}} min',
+      targetHint: 'Doeltemperatuur (0-60 °C):',
+    },
     permission: {
       noAdd: 'Je hebt geen toestemming om printers toe te voegen',
       noEdit: 'Je hebt geen toestemming om printers te bewerken',
@@ -2408,6 +2419,13 @@ export default {
     urlFromEnvReadOnly: 'Waarde ingesteld door omgevingsvariabele HA_URL (alleen-lezen)',
     tokenFromEnvReadOnly: 'Waarde ingesteld door omgevingsvariabele HA_TOKEN (alleen-lezen)',
     // MQTT
+    pandaBreath: {
+      hint: 'Panda Breath-verwarmers tonen en bedienen die deze broker gebruiken (firmware 1.0.4 of nieuwer, Home Assistant-koppeling). Elke verschijnt bij de printer waaraan hij gekoppeld is.',
+      noDevices: 'Er heeft zich nog geen Panda Breath gemeld.',
+      boundTo: 'gekoppeld aan {{printer}}',
+      unknownPrinter: 'gekoppeld aan een printer die hier niet wordt getoond',
+      notBound: 'niet aan een printer gekoppeld',
+    },
     mqttConnectedTo: 'Verbonden met',
     // Prometheus
     prometheusDescription: 'Printergegevens beschikbaar stellen in Prometheus-formaat',

+ 18 - 0
frontend/src/i18n/locales/pl.ts

@@ -634,6 +634,17 @@ export default {
       homingStarted: 'Automatyczne bazowanie drukarki…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Wysłano do Panda Breath',
+      offline: 'Offline',
+      turnOn: 'Włącz',
+      turnOff: 'Wyłącz',
+      modeAuto: 'Auto',
+      modeOn: 'Zawsze włączony',
+      modeDrying: 'Suszenie',
+      dryingLeft: 'Suszenie, zostało {{minutes}} min',
+      targetHint: 'Temperatura docelowa (0-60 °C):',
+    },
     permission: {
       noAdd: 'Nie masz uprawnień do dodawania drukarek',
       noEdit: 'Nie masz uprawnień do edytowania drukarek',
@@ -2410,6 +2421,13 @@ export default {
     urlFromEnvReadOnly: 'Wartość ustawiona przez zmienną środowiskową HA_URL (tylko do odczytu)',
     tokenFromEnvReadOnly: 'Wartość ustawiona przez zmienną środowiskową HA_TOKEN (tylko do odczytu)',
     // MQTT
+    pandaBreath: {
+      hint: 'Pokazuj i steruj grzejnikami Panda Breath korzystającymi z tego brokera (firmware 1.0.4 lub nowszy, powiązanie z Home Assistant). Każdy pojawia się przy drukarce, z którą jest powiązany.',
+      noDevices: 'Żaden Panda Breath jeszcze się nie zgłosił.',
+      boundTo: 'powiązany z {{printer}}',
+      unknownPrinter: 'powiązany z drukarką niewidoczną tutaj',
+      notBound: 'niepowiązany z drukarką',
+    },
     mqttConnectedTo: 'Połączono z',
     // Prometheus
     prometheusDescription: 'Udostępniaj dane drukarek w formacie Prometheus',

+ 18 - 0
frontend/src/i18n/locales/pt-BR.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Referenciando impressora automaticamente…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Enviado ao Panda Breath',
+      offline: 'Offline',
+      turnOn: 'Ligar',
+      turnOff: 'Desligar',
+      modeAuto: 'Auto',
+      modeOn: 'Sempre ligado',
+      modeDrying: 'Secagem',
+      dryingLeft: 'Secando, faltam {{minutes}} min',
+      targetHint: 'Temperatura alvo (0-60 °C):',
+    },
     permission: {
       noAdd: 'Você não tem permissão para adicionar impressoras',
       noEdit: 'Você não tem permissão para editar impressoras',
@@ -2343,6 +2354,13 @@ export default {
     urlFromEnvReadOnly: 'Valor definido pela variável de ambiente HA_URL (somente leitura)',
     tokenFromEnvReadOnly: 'Valor definido pela variável de ambiente HA_TOKEN (somente leitura)',
     // MQTT
+    pandaBreath: {
+      hint: 'Mostra e controla os aquecedores Panda Breath que usam este broker (firmware 1.0.4 ou mais recente, vinculação com o Home Assistant). Cada um aparece na impressora à qual está vinculado.',
+      noDevices: 'Nenhum Panda Breath se reportou ainda.',
+      boundTo: 'vinculado a {{printer}}',
+      unknownPrinter: 'vinculado a uma impressora que não aparece aqui',
+      notBound: 'não vinculado a nenhuma impressora',
+    },
     mqttConnectedTo: 'Conectado a',
     // Prometheus
     prometheusDescription: 'Expor dados da impressora no formato Prometheus',

+ 18 - 0
frontend/src/i18n/locales/ru.ts

@@ -602,6 +602,17 @@ export default {
       moveAnyway: "Всё равно переместить",
       homingStarted: "Выполняется автопарковка…",
     },
+    pandaBreath: {
+      sent: 'Отправлено на Panda Breath',
+      offline: 'Не в сети',
+      turnOn: 'Включить',
+      turnOff: 'Выключить',
+      modeAuto: 'Авто',
+      modeOn: 'Всегда включён',
+      modeDrying: 'Сушка',
+      dryingLeft: 'Сушка, осталось {{minutes}} мин',
+      targetHint: 'Целевая температура (0-60 °C):',
+    },
     permission: {
       noAdd: "У вас нет разрешения на добавление принтеров",
       noEdit: "У вас нет разрешения на изменение принтеров",
@@ -2280,6 +2291,13 @@ export default {
     autoEnabledViaEnv: "Автоматически включено переменными окружения",
     urlFromEnvReadOnly: "Значение задано переменной окружения HA_URL (только чтение)",
     tokenFromEnvReadOnly: "Значение задано переменной окружения HA_TOKEN (только чтение)",
+    pandaBreath: {
+      hint: 'Показывать и управлять обогревателями Panda Breath, использующими этот брокер (прошивка 1.0.4 или новее, привязка Home Assistant). Каждый отображается на принтере, к которому он привязан.',
+      noDevices: 'Ни один Panda Breath ещё не отозвался.',
+      boundTo: 'привязан к {{printer}}',
+      unknownPrinter: 'привязан к принтеру, который здесь не показан',
+      notBound: 'не привязан к принтеру',
+    },
     mqttConnectedTo: "Подключено к",
     prometheusDescription: "Экспортировать данные принтеров в формате Prometheus",
     noSmartPlugsTitle: "Умные розетки не настроены",

+ 18 - 0
frontend/src/i18n/locales/sv.ts

@@ -632,6 +632,17 @@ export default {
       homingStarted: 'Auto-riktning pågår…',
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Skickat till Panda Breath',
+      offline: 'Offline',
+      turnOn: 'Slå på',
+      turnOff: 'Stäng av',
+      modeAuto: 'Auto',
+      modeOn: 'Alltid på',
+      modeDrying: 'Torkning',
+      dryingLeft: 'Torkar, {{minutes}} min kvar',
+      targetHint: 'Måltemperatur (0-60 °C):',
+    },
     permission: {
       noAdd: 'Du har inte behörighet att lägga till skrivare',
       noEdit: 'Du har inte behörighet att redigera skrivare',
@@ -2440,6 +2451,13 @@ export default {
     urlFromEnvReadOnly: 'Värde inställt av HA_URL-miljövariabel (skrivskyddad)',
     tokenFromEnvReadOnly: 'Värde inställt av HA_TOKEN-miljövariabel (skrivskyddad)',
     // MQTT
+    pandaBreath: {
+      hint: 'Visa och styr Panda Breath-värmare som använder den här brokern (firmware 1.0.4 eller senare, Home Assistant-koppling). Var och en visas på skrivaren den är kopplad till.',
+      noDevices: 'Ingen Panda Breath har rapporterat än.',
+      boundTo: 'kopplad till {{printer}}',
+      unknownPrinter: 'kopplad till en skrivare som inte visas här',
+      notBound: 'inte kopplad till någon skrivare',
+    },
     mqttConnectedTo: 'Ansluten till',
     // Prometheus
     prometheusDescription: 'Exponera skrivardata i Prometheus-format',

+ 18 - 0
frontend/src/i18n/locales/tr.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: 'Yazıcı otomatik sıfırlanıyor…',
     },
     // İzinler
+    pandaBreath: {
+      sent: 'Panda Breath\'e gönderildi',
+      offline: 'Çevrimdışı',
+      turnOn: 'Aç',
+      turnOff: 'Kapat',
+      modeAuto: 'Otomatik',
+      modeOn: 'Sürekli açık',
+      modeDrying: 'Kurutma',
+      dryingLeft: 'Kurutuluyor, {{minutes}} dk kaldı',
+      targetHint: 'Hedef sıcaklık (0-60 °C):',
+    },
     permission: {
       noAdd: 'Yazıcı eklemek için izniniz yok',
       noEdit: 'Yazıcıları düzenlemek için izniniz yok',
@@ -2392,6 +2403,13 @@ export default {
     urlFromEnvReadOnly: 'Değer HA_URL ortam değişkeniyle ayarlandı (salt okunur)',
     tokenFromEnvReadOnly: 'Değer HA_TOKEN ortam değişkeniyle ayarlandı (salt okunur)',
     // MQTT
+    pandaBreath: {
+      hint: 'Bu broker\'ı kullanan Panda Breath ısıtıcılarını göster ve kontrol et (ürün yazılımı 1.0.4 veya üstü, Home Assistant bağlantısı). Her biri bağlı olduğu yazıcıda görünür.',
+      noDevices: 'Henüz hiçbir Panda Breath bildirimde bulunmadı.',
+      boundTo: '{{printer}} yazıcısına bağlı',
+      unknownPrinter: 'burada gösterilmeyen bir yazıcıya bağlı',
+      notBound: 'bir yazıcıya bağlı değil',
+    },
     mqttConnectedTo: 'Bağlı',
     // Prometheus
     prometheusDescription: 'Yazıcı verisini Prometheus formatında sun',

+ 18 - 0
frontend/src/i18n/locales/uk.ts

@@ -632,6 +632,17 @@ export default {
       homingStarted: "Виконується автопозиціювання принтера…",
     },
     // Permissions
+    pandaBreath: {
+      sent: 'Надіслано на Panda Breath',
+      offline: 'Не в мережі',
+      turnOn: 'Увімкнути',
+      turnOff: 'Вимкнути',
+      modeAuto: 'Авто',
+      modeOn: 'Завжди увімкнено',
+      modeDrying: 'Сушіння',
+      dryingLeft: 'Сушіння, залишилось {{minutes}} хв',
+      targetHint: 'Цільова температура (0-60 °C):',
+    },
     permission: {
       noAdd: "Ви не маєте дозволу додавати принтери",
       noEdit: "Ви не маєте дозволу редагувати принтери",
@@ -2406,6 +2417,13 @@ export default {
     urlFromEnvReadOnly: "Значення, встановлене змінною середовища HA_URL (лише читання)",
     tokenFromEnvReadOnly: "Значення, установлене змінною середовища HA_TOKEN (лише читання)",
     // MQTT
+    pandaBreath: {
+      hint: 'Показувати та керувати обігрівачами Panda Breath, що використовують цей брокер (прошивка 1.0.4 або новіша, прив\'язка Home Assistant). Кожен з\'являється на принтері, до якого він прив\'язаний.',
+      noDevices: 'Жоден Panda Breath ще не відгукнувся.',
+      boundTo: 'прив\'язано до {{printer}}',
+      unknownPrinter: 'прив\'язано до принтера, який тут не показано',
+      notBound: 'не прив\'язано до принтера',
+    },
     mqttConnectedTo: "Підключено до",
     // Prometheus
     prometheusDescription: "Надавати дані принтерів у форматі Prometheus",

+ 18 - 0
frontend/src/i18n/locales/zh-CN.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: '打印机自动归零中…',
     },
     // Permissions
+    pandaBreath: {
+      sent: '已发送到 Panda Breath',
+      offline: '离线',
+      turnOn: '开启',
+      turnOff: '关闭',
+      modeAuto: '自动',
+      modeOn: '常开',
+      modeDrying: '烘干',
+      dryingLeft: '烘干中,剩余 {{minutes}} 分钟',
+      targetHint: '目标温度 (0-60 °C):',
+    },
     permission: {
       noAdd: '您没有添加打印机的权限',
       noEdit: '您没有编辑打印机的权限',
@@ -2388,6 +2399,13 @@ export default {
     urlFromEnvReadOnly: '值由 HA_URL 环境变量设置(只读)',
     tokenFromEnvReadOnly: '值由 HA_TOKEN 环境变量设置(只读)',
     // MQTT
+    pandaBreath: {
+      hint: '显示并控制使用此代理的 Panda Breath 加热器(固件 1.0.4 或更高版本,Home Assistant 绑定)。每台会显示在其绑定的打印机上。',
+      noDevices: '尚无 Panda Breath 上报。',
+      boundTo: '已绑定到 {{printer}}',
+      unknownPrinter: '已绑定到此处未显示的打印机',
+      notBound: '未绑定打印机',
+    },
     mqttConnectedTo: '已连接到',
     // Prometheus
     prometheusDescription: '以 Prometheus 格式暴露打印机数据',

+ 18 - 0
frontend/src/i18n/locales/zh-TW.ts

@@ -629,6 +629,17 @@ export default {
       homingStarted: '印表機自動歸零中…',
     },
     // Permissions
+    pandaBreath: {
+      sent: '已傳送到 Panda Breath',
+      offline: '離線',
+      turnOn: '開啟',
+      turnOff: '關閉',
+      modeAuto: '自動',
+      modeOn: '常開',
+      modeDrying: '烘乾',
+      dryingLeft: '烘乾中,剩餘 {{minutes}} 分鐘',
+      targetHint: '目標溫度 (0-60 °C):',
+    },
     permission: {
       noAdd: '您沒有新增印表機的權限',
       noEdit: '您沒有編輯印表機的權限',
@@ -2388,6 +2399,13 @@ export default {
     urlFromEnvReadOnly: '值由 HA_URL 環境變數設定(只讀)',
     tokenFromEnvReadOnly: '值由 HA_TOKEN 環境變數設定(只讀)',
     // MQTT
+    pandaBreath: {
+      hint: '顯示並控制使用此代理的 Panda Breath 加熱器(韌體 1.0.4 或更新版本,Home Assistant 綁定)。每台會顯示在其綁定的印表機上。',
+      noDevices: '尚無 Panda Breath 回報。',
+      boundTo: '已綁定到 {{printer}}',
+      unknownPrinter: '已綁定到此處未顯示的印表機',
+      notBound: '未綁定印表機',
+    },
     mqttConnectedTo: '已連線到',
     // Prometheus
     prometheusDescription: '以 Prometheus 格式暴露印表機資料',

+ 136 - 2
frontend/src/pages/PrintersPage.tsx

@@ -166,7 +166,7 @@ import { ConfirmOutcomeDialog } from '../components/ConfirmOutcomeDialog';
 import { Link as RouterLink, useNavigate } from 'react-router-dom';
 import { api, discoveryApi, firmwareApi, withMediaToken, ApiError } from '../api/client';
 import { formatDateOnly, formatDateTime, formatETA, formatDuration, formatDurationFromHours, parseUTCDate } from '../utils/date';
-import type { Printer, PrinterCreate, PrinterStatus, AMSUnit, AMSTray, DiscoveredPrinter, FirmwareUpdateInfo, FirmwareUploadStatus, LinkedSpoolInfo, SpoolAssignment, HMSError, InventorySpool, SmartPlug, PrinterDiagnosticResult } from '../api/client';
+import type { Printer, PrinterCreate, PrinterStatus, PandaBreathCommand, PandaBreathMode, PandaBreathState, AMSUnit, AMSTray, DiscoveredPrinter, FirmwareUpdateInfo, FirmwareUploadStatus, LinkedSpoolInfo, SpoolAssignment, HMSError, InventorySpool, SmartPlug, PrinterDiagnosticResult } from '../api/client';
 import { Card, CardContent } from '../components/Card';
 import { Button } from '../components/Button';
 import { ConfirmModal } from '../components/ConfirmModal';
@@ -201,7 +201,7 @@ import { FeedDirectionModal } from '../components/FeedDirectionModal';
 import { plateCheckFailureText } from '../utils/plateCheck';
 import { ams3hDryerGridColumns, ams3hSlotGridPlacement, amsUnitSlotCount, isAms3hUnit, rackExternalLabel, amsHasLoadedTray, getAmsLabel, getEmptySlotKind, getGlobalTrayId, getFillBarColor, getSpoolmanFillLevel, getFallbackSpoolTag, installedNozzleDiameters, isAmsHtUnit, isBambuLabSpool, trayForSlot, resolveSlotNozzleDiameter, resolveSlotExtruder, formatSlotLabel, slotPresetDescribesTray, FTS_INLET_SIDE } from '../utils/amsHelpers';
 import { RACK_SLOT_COUNT, externalHotend, externalSlotIndex, isExternalTray, layoutAmsType, locateTray, trayLayoutOf } from '../utils/trayIds';
-import { MAX_CHAMBER_TEMP_C, getPrinterImage, getWifiStrength, filterCompatibleQueueItems, isPrinterCurrentlyDispatchable, IDLE_PRINTER_STATES } from '../utils/printer';
+import { MAX_CHAMBER_TEMP_C, PANDA_BREATH_MAX_TARGET_C, getPrinterImage, getWifiStrength, filterCompatibleQueueItems, isPrinterCurrentlyDispatchable, IDLE_PRINTER_STATES } from '../utils/printer';
 import { FilamentSlotCircle } from '../components/FilamentSlotCircle';
 import { Collapsible } from '../components/Collapsible';
 import { ConnectionDiagnosticModal, DiagnosticChecklist } from '../components/ConnectionDiagnostic';
@@ -1610,6 +1610,106 @@ function IndicatorControlPopover({
   );
 }
 
+/**
+ * BIQU Panda Breath bound to the printer (#1466): its chamber reading, and a
+ * popover to switch it, pick its mode and set its target. It works without
+ * the printer, so only the control right and the device being online gate it.
+ */
+function PandaBreathTile({
+  panda,
+  canControl,
+  open,
+  onOpenChange,
+  isPending,
+  onCommand,
+}: {
+  panda: PandaBreathState;
+  canControl: boolean;
+  open: boolean;
+  onOpenChange: (open: boolean) => void;
+  isPending: boolean;
+  onCommand: (command: PandaBreathCommand) => void;
+}) {
+  const { t } = useTranslation();
+  const usable = canControl && panda.online !== false;
+  const modeLabels: Record<PandaBreathMode, string> = {
+    'auto mode': t('printers.pandaBreath.modeAuto'),
+    'power on': t('printers.pandaBreath.modeOn'),
+    'filament drying': t('printers.pandaBreath.modeDrying'),
+  };
+  const modeLabel = panda.mode && panda.mode in modeLabels ? modeLabels[panda.mode as PandaBreathMode] : panda.mode;
+  const title = panda.online === false
+    ? t('printers.pandaBreath.offline')
+    : !canControl
+      ? t('printers.permission.noControl')
+      : [modeLabel, panda.drying_running && panda.drying_remaining_min != null
+        ? t('printers.pandaBreath.dryingLeft', { minutes: Math.round(panda.drying_remaining_min) })
+        : null].filter(Boolean).join(' · ') || undefined;
+  return (
+    <div
+      className={usable
+        ? 'relative text-center px-2 py-1.5 bg-bambu-dark rounded-lg flex-1 flex flex-col justify-center items-center transition-colors cursor-pointer hover:bg-bambu-dark-tertiary'
+        : 'relative text-center px-2 py-1.5 bg-bambu-dark rounded-lg flex-1 flex flex-col justify-center items-center opacity-80'}
+      title={title}
+      onClick={() => usable && onOpenChange(!open)}
+      data-testid="panda-breath-tile"
+    >
+      <HeaterThermometer className="w-[var(--pc-i35,0.875rem)] h-[var(--pc-i35,0.875rem)] mb-0.5" color="text-green-400" isHeating={panda.work_on === true} />
+      <p className="text-[length:var(--pc-t9,9px)] text-bambu-gray">Panda Breath</p>
+      <p className="text-[length:var(--pc-t11,11px)] text-white">
+        {panda.online === false
+          ? t('printers.pandaBreath.offline')
+          : <>
+              {panda.chamber_temp != null ? `${Math.round(panda.chamber_temp)}°C` : '—'}
+              {panda.work_on && panda.target_temp != null ? ` / ${Math.round(panda.target_temp)}°` : ''}
+            </>}
+      </p>
+      {usable && open && (
+        <IndicatorControlPopover
+          title="Panda Breath"
+          unit="°C"
+          customMin={0}
+          customMax={PANDA_BREATH_MAX_TARGET_C}
+          popoverHeight={260}
+          isPending={isPending}
+          onClose={() => onOpenChange(false)}
+          onSubmit={(target) => onCommand({ target_temp: target })}
+        >
+          <div className="px-3 py-2.5 space-y-1.5">
+            <button
+              type="button"
+              disabled={isPending}
+              onClick={() => onCommand({ work_on: !panda.work_on })}
+              className="h-8 w-full rounded-lg border border-bambu-dark-tertiary bg-bambu-dark px-2 text-xs font-medium text-white transition-colors hover:bg-bambu-dark-tertiary disabled:cursor-not-allowed disabled:opacity-50"
+            >
+              {panda.work_on ? t('printers.pandaBreath.turnOff') : t('printers.pandaBreath.turnOn')}
+            </button>
+            <div className="grid grid-cols-3 gap-1.5">
+              {(Object.keys(modeLabels) as PandaBreathMode[]).map((mode) => (
+                <button
+                  key={mode}
+                  type="button"
+                  disabled={isPending}
+                  aria-pressed={panda.mode === mode}
+                  onClick={() => onCommand({ mode })}
+                  className={`h-8 rounded-lg border px-1 text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
+                    panda.mode === mode
+                      ? 'border-bambu-green bg-bambu-green/20 text-white'
+                      : 'border-bambu-dark-tertiary bg-bambu-dark text-white hover:bg-bambu-dark-tertiary'
+                  }`}
+                >
+                  {modeLabels[mode]}
+                </button>
+              ))}
+            </div>
+            <p className="pt-1 text-[11px] text-bambu-gray">{t('printers.pandaBreath.targetHint')}</p>
+          </div>
+        </IndicatorControlPopover>
+      )}
+    </div>
+  );
+}
+
 const NOZZLE_TEMPERATURE_OPTIONS = buildPresetOptions(NOZZLE_TEMP_DEFAULTS, 'C');
 
 function NozzleTemperatureControlBox({
@@ -3022,6 +3122,15 @@ function PrinterCard({
     onError: (error: Error) => showToast(error.message || t('printers.toast.failedToSendCommand'), 'error'),
   });
 
+  const pandaBreathMutation = useMutation({
+    mutationFn: (command: PandaBreathCommand) => api.sendPandaBreathCommand(printer.id, command),
+    onSuccess: () => {
+      setStatusControlMenu(null);
+      showToast(t('printers.pandaBreath.sent'));
+    },
+    onError: (error: Error) => showToast(error.message || t('printers.toast.failedToSendCommand'), 'error'),
+  });
+
   const fanSpeedMutation = useMutation({
     mutationFn: ({ fan, speed }: { fan: 'part' | 'aux' | 'aux2' | 'chamber'; speed: number }) =>
       api.setFanSpeed(printer.id, fan, speed),
@@ -4908,6 +5017,16 @@ function PrinterCard({
                         </div>
                       );
                     })()}
+                    {status.panda_breath && (
+                      <PandaBreathTile
+                        panda={status.panda_breath}
+                        canControl={hasPermission('printers:control')}
+                        open={statusControlMenu === 'panda-breath'}
+                        onOpenChange={(open) => setStatusControlMenu(open ? 'panda-breath' : null)}
+                        isPending={pandaBreathMutation.isPending}
+                        onCommand={(command) => pandaBreathMutation.mutate(command)}
+                      />
+                    )}
                     {/* Active nozzle indicator for dual-nozzle printers */}
                     {isDualNozzle && (
                       <DualNozzleHoverCard
@@ -6747,6 +6866,21 @@ function PrinterCard({
           expandedClearPlateButton
         )}
 
+        {/* The Panda Breath keeps running with the printer off, so its tile
+            stays reachable on an offline card (#1466). */}
+        {!status?.connected && viewMode === 'expanded' && status?.panda_breath && (
+          <div className="flex items-stretch gap-1.5 mt-3">
+            <PandaBreathTile
+              panda={status.panda_breath}
+              canControl={hasPermission('printers:control')}
+              open={statusControlMenu === 'panda-breath'}
+              onOpenChange={(open) => setStatusControlMenu(open ? 'panda-breath' : null)}
+              isPending={pandaBreathMutation.isPending}
+              onCommand={(command) => pandaBreathMutation.mutate(command)}
+            />
+          </div>
+        )}
+
         {/* Bottom block (power row + action bar). Wrapped together so the
             power row hugs the action bar at the card bottom instead of
             floating up when there's less filament content above. */}

+ 51 - 0
frontend/src/pages/SettingsPage.tsx

@@ -832,6 +832,14 @@ export function SettingsPage() {
     refetchInterval: activeTab === 'network' ? 5000 : false, // Poll every 5s when on Network tab
   });
 
+  const pandaBreathOn = activeTab === 'network' && settings?.mqtt_enabled === true && settings?.panda_breath_enabled === true;
+  const { data: pandaBreathStatus } = useQuery({
+    queryKey: ['panda-breath-status'],
+    queryFn: api.getPandaBreathStatus,
+    enabled: pandaBreathOn,
+    refetchInterval: pandaBreathOn ? 5000 : false,
+  });
+
   // GitHub backup status for Backup tab indicator
   const { data: githubBackupStatus } = useQuery<GitHubBackupStatus>({
     queryKey: ['github-backup-status'],
@@ -1329,6 +1337,7 @@ export function SettingsPage() {
       baseline.mqtt_password !== localSettings.mqtt_password ||
       baseline.mqtt_topic_prefix !== localSettings.mqtt_topic_prefix ||
       baseline.mqtt_use_tls !== localSettings.mqtt_use_tls ||
+      baseline.panda_breath_enabled !== localSettings.panda_breath_enabled ||
       baseline.external_url !== localSettings.external_url ||
       baseline.ha_enabled !== localSettings.ha_enabled ||
       baseline.ha_url !== localSettings.ha_url ||
@@ -1459,6 +1468,7 @@ export function SettingsPage() {
         mqtt_password: localSettings.mqtt_password,
         mqtt_topic_prefix: localSettings.mqtt_topic_prefix,
         mqtt_use_tls: localSettings.mqtt_use_tls,
+        panda_breath_enabled: localSettings.panda_breath_enabled,
         external_url: localSettings.external_url,
         ha_enabled: localSettings.ha_enabled,
         ha_url: localSettings.ha_url,
@@ -3517,6 +3527,47 @@ export function SettingsPage() {
                       </div>
                     </div>
                   )}
+
+                  {/* BIQU Panda Breath heaters on this broker (#1466) */}
+                  <div className="pt-3 mt-3 border-t border-bambu-dark-tertiary space-y-2">
+                    <div className="flex items-center justify-between gap-3">
+                      <div>
+                        <p className="text-white text-sm">BIQU Panda Breath</p>
+                        <p className="text-xs text-bambu-gray">{t('settings.pandaBreath.hint')}</p>
+                      </div>
+                      <label className="relative inline-flex items-center cursor-pointer shrink-0">
+                        <input
+                          type="checkbox"
+                          aria-label="BIQU Panda Breath"
+                          checked={localSettings.panda_breath_enabled ?? false}
+                          onChange={(e) => updateSetting('panda_breath_enabled', e.target.checked)}
+                          className="sr-only peer"
+                        />
+                        <div className="w-11 h-6 bg-bambu-dark-tertiary peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-bambu-green"></div>
+                      </label>
+                    </div>
+                    {pandaBreathOn && pandaBreathStatus && (
+                      pandaBreathStatus.devices.length === 0 ? (
+                        <p className="text-xs text-bambu-gray">{t('settings.pandaBreath.noDevices')}</p>
+                      ) : (
+                        <ul className="space-y-1">
+                          {pandaBreathStatus.devices.map((device) => (
+                            <li key={device.device_id} className="flex items-center gap-2 text-xs">
+                              <span className={`w-2 h-2 rounded-full shrink-0 ${device.online === false ? 'bg-red-400' : 'bg-green-400'}`} />
+                              <span className="text-white font-mono">{device.device_id}</span>
+                              <span className="text-bambu-gray truncate">
+                                {device.printer_name
+                                  ? t('settings.pandaBreath.boundTo', { printer: device.printer_name })
+                                  : device.bound
+                                    ? t('settings.pandaBreath.unknownPrinter')
+                                    : t('settings.pandaBreath.notBound')}
+                              </span>
+                            </li>
+                          ))}
+                        </ul>
+                      )
+                    )}
+                  </div>
                 </div>
               )}
             </CardContent>

+ 3 - 0
frontend/src/utils/printer.ts

@@ -28,6 +28,9 @@ export function getPrinterImage(model: string | null | undefined): string {
 // at 60 and its firmware clamps anything higher.
 export const MAX_CHAMBER_TEMP_C = 65;
 
+/** Highest target a BIQU Panda Breath takes, from its firmware (#1466). */
+export const PANDA_BREATH_MAX_TARGET_C = 60;
+
 // G-code interchange families (#2578). Mirrors backend GCODE_COMPAT_FAMILIES
 // in backend/app/utils/printer_models.py — keep the two in sync. A sliced 3MF
 // may target a different model ONLY within its family; everything else is

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/AdditionalSection-Kh61g0FJ.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/AmsUnitCard-CccJXgG8.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ArchivesPage-DSbd4wlh.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/AreaChart-Ci1M30j4.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/AssignToAmsModal-ClMM3R_q.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/AuthContext-Dr8TxDCH.js


+ 1 - 1
static/assets/Button-D7wJJlop.js → static/assets/Button-YIEzmugF.js

@@ -1 +1 @@
-import{w as e}from"./client-Bol9xAus.js";var t=e();function n({variant:e=`primary`,size:n=`md`,className:r=``,children:i,...a}){return(0,t.jsx)(`button`,{className:`inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-bambu-dark disabled:opacity-50 disabled:cursor-not-allowed ${{primary:`bg-bambu-green hover:bg-bambu-green-light text-white focus:ring-bambu-green`,secondary:`bg-bambu-dark-tertiary hover:bg-bambu-gray-dark text-white focus:ring-bambu-gray`,danger:`bg-red-600 hover:bg-red-700 text-white focus:ring-red-500`,ghost:`bg-transparent hover:bg-bambu-dark-tertiary text-bambu-gray-light hover:text-white`}[e]} ${{sm:`px-3 py-1.5 text-sm gap-1.5 min-h-[44px] md:min-h-0`,md:`px-4 py-2 text-sm gap-2 min-h-[44px] md:min-h-0`,lg:`px-6 py-3 text-base gap-2 min-h-[48px] md:min-h-0`}[n]} ${r}`,...a,children:i})}export{n as t};
+import{w as e}from"./client-B7BjJc1_.js";var t=e();function n({variant:e=`primary`,size:n=`md`,className:r=``,children:i,...a}){return(0,t.jsx)(`button`,{className:`inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-bambu-dark disabled:opacity-50 disabled:cursor-not-allowed ${{primary:`bg-bambu-green hover:bg-bambu-green-light text-white focus:ring-bambu-green`,secondary:`bg-bambu-dark-tertiary hover:bg-bambu-gray-dark text-white focus:ring-bambu-gray`,danger:`bg-red-600 hover:bg-red-700 text-white focus:ring-red-500`,ghost:`bg-transparent hover:bg-bambu-dark-tertiary text-bambu-gray-light hover:text-white`}[e]} ${{sm:`px-3 py-1.5 text-sm gap-1.5 min-h-[44px] md:min-h-0`,md:`px-4 py-2 text-sm gap-2 min-h-[44px] md:min-h-0`,lg:`px-6 py-3 text-base gap-2 min-h-[48px] md:min-h-0`}[n]} ${r}`,...a,children:i})}export{n as t};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/CamWallPage-DTAkEcdC.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/CameraDiagnoseModal-BQ-hIZiU.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/CameraPage-DJ6mi_Rd.js


+ 1 - 1
static/assets/Card-CsobaR0C.js → static/assets/Card-K5nKN5mf.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-Bol9xAus.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(`normal`);function o({density:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s({children:e,className:t=``,onClick:n,onContextMenu:r,...a}){return(0,i.jsx)(`div`,{className:`bg-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary card-shadow ${n?`cursor-pointer`:``} ${t}`,onClick:n,onContextMenu:r,...a,children:e})}function c({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`px-4 py-2.5`:`px-6 py-4`} border-b border-bambu-dark-tertiary ${t}`,children:e})}function l({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`p-4`:`p-6`} ${t}`,children:e})}export{c as i,l as n,o as r,s as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-B7BjJc1_.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(`normal`);function o({density:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s({children:e,className:t=``,onClick:n,onContextMenu:r,...a}){return(0,i.jsx)(`div`,{className:`bg-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary card-shadow ${n?`cursor-pointer`:``} ${t}`,onClick:n,onContextMenu:r,...a,children:e})}function c({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`px-4 py-2.5`:`px-6 py-4`} border-b border-bambu-dark-tertiary ${t}`,children:e})}function l({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`p-4`:`p-6`} ${t}`,children:e})}export{c as i,l as n,o as r,s as t};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/CartesianChart-BFVcatzk.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ColumnConfigModal-DsU6XCrX.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ConfigureAmsSlotModal-B3HIL_-h.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ConfirmModal-BHaT4HcR.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ConfirmOutcomeDialog-BEF_z9FB.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ConnectAuthorizePage-CYyz53Xp.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ConnectionDiagnostic-BrW1q6-W.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ContextMenu-BltrxaUa.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/CopyButton-ByIj_5u0.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/EmbeddedCameraViewer-BtYVv_bb.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ErrorBarContext-BD_aOrvD.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ExternalLinkPage-FRv-h6qF.js


+ 1 - 1
static/assets/FilamentSwatch-DPXw7nIu.js → static/assets/FilamentSwatch-DihBt9jq.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-Bol9xAus.js";import{n as r,r as i}from"./filamentSwatchHelpers-C3r5m07g.js";var a=e(t(),1),o=n();function s({rgba:e,extraColors:t,effectType:n,subtype:s,className:c=`w-5 h-5`,shape:l=`circle`,style:u,title:d,effectSize:f}){let p=(0,a.useMemo)(()=>i(t),[t]),m=(0,a.useMemo)(()=>r({effectSize:f,rgba:e,extraColors:t,effectType:n,subtype:s}),[f,e,t,n,s]),h=m.backgroundImage,g=m.backgroundSize,_=l===`circle`||l===`pill`?`rounded-full`:`rounded`,v=(()=>{if(!e)return;let t=e.replace(/^#/,``);return t.length>=8&&t.substring(6,8).toLowerCase()!==`ff`?`#${t.substring(0,8)}`:`#${t.substring(0,6)}`})(),y=d??(p.length>0?p.join(`, `):v);return(0,o.jsx)(`span`,{"data-testid":`filament-swatch`,className:`${c} ${_} border border-black/20 inline-block flex-shrink-0`,style:{backgroundImage:h,backgroundSize:g,...u},title:y})}export{s as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-B7BjJc1_.js";import{n as r,r as i}from"./filamentSwatchHelpers-C3r5m07g.js";var a=e(t(),1),o=n();function s({rgba:e,extraColors:t,effectType:n,subtype:s,className:c=`w-5 h-5`,shape:l=`circle`,style:u,title:d,effectSize:f}){let p=(0,a.useMemo)(()=>i(t),[t]),m=(0,a.useMemo)(()=>r({effectSize:f,rgba:e,extraColors:t,effectType:n,subtype:s}),[f,e,t,n,s]),h=m.backgroundImage,g=m.backgroundSize,_=l===`circle`||l===`pill`?`rounded-full`:`rounded`,v=(()=>{if(!e)return;let t=e.replace(/^#/,``);return t.length>=8&&t.substring(6,8).toLowerCase()!==`ff`?`#${t.substring(0,8)}`:`#${t.substring(0,6)}`})(),y=d??(p.length>0?p.join(`, `):v);return(0,o.jsx)(`span`,{"data-testid":`filament-swatch`,className:`${c} ${_} border border-black/20 inline-block flex-shrink-0`,style:{backgroundImage:h,backgroundSize:g,...u},title:y})}export{s as t};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
static/assets/FileManagerPage-DIia0J0V.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/FileUploadModal-euGteuPK.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/FinancePage-qY38HrUN.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/GCodeViewerPage-CKzHDX0S.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/GcodeToolpathViewer-CElN1IR6.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/GroupEditPage-VtpnnoF1.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/IconPicker-Pp4jmvM1.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ImagePreviewModal-CqB88mVI.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/InventoryPage-CXDfhcsv.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/Layout-DU75Yw6s.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/Layout-Ds59PIJR.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/LibraryTrashPage-CgRyrHy9.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/LoginPage-DrnYydpj.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/MaintenancePage-Vts9i0Db.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/MergeDuplicatesModal-DtYf6eQM.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ModelSourcesPage-Cbpetws7.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/NotificationsPage-Y4ZU283j.js


+ 1 - 1
static/assets/NumberInput-BuS_39vU.js → static/assets/NumberInput-BxywI6iP.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-Bol9xAus.js";var r=e(t(),1),i=n();function a({value:e,onChange:t,min:n,max:a,integer:o=!0,fallback:s,onBlur:c,...l}){let[u,d]=(0,r.useState)(null),f=e=>o?parseInt(e,10):parseFloat(e),p=e=>(n===void 0||e>=n)&&(a===void 0||e<=a),m=e=>Math.min(a??1/0,Math.max(n??-1/0,e));return(0,i.jsx)(`input`,{...l,type:`number`,min:n,max:a,value:u??e??``,onChange:n=>{let r=n.target.value;d(r);let i=f(r);!Number.isNaN(i)&&p(i)&&i!==e&&t(i)},onBlur:n=>{if(u!==null){let n=f(u),r=Number.isNaN(n)?s:n;r!==void 0&&m(r)!==e&&t(m(r)),d(null)}c?.(n)}})}export{a as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-B7BjJc1_.js";var r=e(t(),1),i=n();function a({value:e,onChange:t,min:n,max:a,integer:o=!0,fallback:s,onBlur:c,...l}){let[u,d]=(0,r.useState)(null),f=e=>o?parseInt(e,10):parseFloat(e),p=e=>(n===void 0||e>=n)&&(a===void 0||e<=a),m=e=>Math.min(a??1/0,Math.max(n??-1/0,e));return(0,i.jsx)(`input`,{...l,type:`number`,min:n,max:a,value:u??e??``,onChange:n=>{let r=n.target.value;d(r);let i=f(r);!Number.isNaN(i)&&p(i)&&i!==e&&t(i)},onBlur:n=>{if(u!==null){let n=f(u),r=Number.isNaN(n)?s:n;r!==void 0&&m(r)!==e&&t(m(r)),d(null)}c?.(n)}})}export{a as t};

+ 1 - 1
static/assets/OverlayFrame-taEGRB2T.js → static/assets/OverlayFrame-Dj1KIq5W.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,k as n,w as r}from"./client-Bol9xAus.js";var i=e(n(),1);function a(e,n=null,r=0){let[a,o]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(!e)return;let i=new AbortController,a;return t.getOverlayLogo(n,i.signal).then(e=>{i.signal.aborted||(e?(a=URL.createObjectURL(e),o({url:a,token:n,revision:r})):o(null))}).catch(()=>{i.signal.aborted||o(null)}),()=>{i.abort(),a&&URL.revokeObjectURL(a)}},[e,n,r]),e&&a?.token===n&&a.revision===r?a.url:null}var o={logo:!1,logoRevision:0,from:``,to:``};function s(e){return/^#[0-9a-f]{6}$/i.test(e)}function c(e,t){return e&&t&&s(e)&&s(t)?`linear-gradient(to right, ${e}, ${t})`:void 0}function l(e){if(e)return{backgroundImage:e,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`}}var u={landscape:{width:1920,height:1080},portrait:{width:1080,height:1920}},d=r();function f({layout:e,preview:t=!1,children:n}){let r=(0,i.useRef)(null),[a,o]=(0,i.useState)(0),{width:s,height:c}=u[e];(0,i.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>o(Math.min(e.clientWidth/s,e.clientHeight/c));if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[s,c]);let l={width:s,height:c,"--overlay-vmin":`10.8px`,"--overlay-height":`${c}px`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(${a})`,transformOrigin:`center`};return(0,d.jsx)(`div`,{ref:r,className:t?`relative w-full overflow-hidden`:`fixed inset-0 overflow-hidden`,style:t?{aspectRatio:`${s} / ${c}`}:void 0,children:(0,d.jsx)(`div`,{style:l,children:n})})}export{c as a,s as i,u as n,l as o,o as r,a as s,f as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,k as n,w as r}from"./client-B7BjJc1_.js";var i=e(n(),1);function a(e,n=null,r=0){let[a,o]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(!e)return;let i=new AbortController,a;return t.getOverlayLogo(n,i.signal).then(e=>{i.signal.aborted||(e?(a=URL.createObjectURL(e),o({url:a,token:n,revision:r})):o(null))}).catch(()=>{i.signal.aborted||o(null)}),()=>{i.abort(),a&&URL.revokeObjectURL(a)}},[e,n,r]),e&&a?.token===n&&a.revision===r?a.url:null}var o={logo:!1,logoRevision:0,from:``,to:``};function s(e){return/^#[0-9a-f]{6}$/i.test(e)}function c(e,t){return e&&t&&s(e)&&s(t)?`linear-gradient(to right, ${e}, ${t})`:void 0}function l(e){if(e)return{backgroundImage:e,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`}}var u={landscape:{width:1920,height:1080},portrait:{width:1080,height:1920}},d=r();function f({layout:e,preview:t=!1,children:n}){let r=(0,i.useRef)(null),[a,o]=(0,i.useState)(0),{width:s,height:c}=u[e];(0,i.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>o(Math.min(e.clientWidth/s,e.clientHeight/c));if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[s,c]);let l={width:s,height:c,"--overlay-vmin":`10.8px`,"--overlay-height":`${c}px`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(${a})`,transformOrigin:`center`};return(0,d.jsx)(`div`,{ref:r,className:t?`relative w-full overflow-hidden`:`fixed inset-0 overflow-hidden`,style:t?{aspectRatio:`${s} / ${c}`}:void 0,children:(0,d.jsx)(`div`,{style:l,children:n})})}export{c as a,s as i,u as n,l as o,o as r,a as s,f as t};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/PdfPreviewModal-D6uYLWhA.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/PrintModal-1p6yELnO.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/PrinterLocationsPage-CoklKNa4.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/PrintersPage-BR3tAzcM.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/PrintersPage-Ud8iJx2c.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ProfilesPage-BRJnjKRM.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ProjectDetailPage-D23VQfOs.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ProjectsPage-CvnGiqEp.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/QueryClientProvider-BxFZpAP-.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/QueuePage-Bob9DCOl.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/ReferenceLine-Bj9BZnhh.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/RichTextEditor-Drdo15tI.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SettingsPage-n9wzB2Hh.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SetupPage-BrWfvCUo.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SkipObjectsModal-B9P-IS-F.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SliceModal-Coy_jhzI.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SpoolBuddyAmsPage-DMHK4deV.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SpoolBuddyDashboard-T97xCNY6.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SpoolBuddyInventoryPage-AqH6aQK6.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
static/assets/SpoolBuddySettingsPage-h8ZK8unO.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SpoolBuddyWriteTagPage-BINrcuuZ.js


+ 1 - 1
static/assets/SpoolIcon-C89ruPSX.js → static/assets/SpoolIcon-BUMITbdZ.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-Bol9xAus.js";import{n as r}from"./filamentSwatchHelpers-C3r5m07g.js";import{t as i}from"./spoolPaint-Imx_KAjK.js";var a=e(t(),1),o=n();function s({spool:e,inset:t,size:n,border:i}){let s=n>=80?`card`:`preview`,c=(0,a.useMemo)(()=>r({effectSize:s,rgba:e.rgba,extraColors:e.extra_colors,effectType:e.effect_type,subtype:e.subtype}),[s,e.rgba,e.extra_colors,e.effect_type,e.subtype]),l=`${t*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-paint`,className:`absolute rounded-full box-border`,style:{top:l,left:l,right:l,bottom:l,...c,backgroundPosition:`center`,border:i}})}function c({inset:e}){let t=`${e*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-shade`,className:`absolute rounded-full`,style:{top:t,left:t,right:t,bottom:t,backgroundColor:`rgba(0, 0, 0, 0.15)`}})}function l({color:e,isEmpty:t,size:n=32,spool:r}){return t?(0,o.jsx)(`div`,{className:`rounded-full border-2 border-dashed border-zinc-500 flex items-center justify-center`,style:{width:n,height:n},children:(0,o.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-zinc-600`})}):i(r)?(0,o.jsxs)(`div`,{className:`relative shrink-0`,style:{width:n,height:n},children:[(0,o.jsx)(s,{spool:r,size:n,inset:2/32,border:`${1.5*n/32}px solid rgba(255, 255, 255, 0.7)`}),(0,o.jsx)(c,{inset:5/32})]}):(0,o.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 32 32`,children:[(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:e,stroke:`white`,strokeWidth:`1.5`,strokeOpacity:`0.7`}),(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`11`,fill:e,style:{filter:`brightness(0.85)`}})]})}export{s as n,c as r,l as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-B7BjJc1_.js";import{n as r}from"./filamentSwatchHelpers-C3r5m07g.js";import{t as i}from"./spoolPaint-Imx_KAjK.js";var a=e(t(),1),o=n();function s({spool:e,inset:t,size:n,border:i}){let s=n>=80?`card`:`preview`,c=(0,a.useMemo)(()=>r({effectSize:s,rgba:e.rgba,extraColors:e.extra_colors,effectType:e.effect_type,subtype:e.subtype}),[s,e.rgba,e.extra_colors,e.effect_type,e.subtype]),l=`${t*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-paint`,className:`absolute rounded-full box-border`,style:{top:l,left:l,right:l,bottom:l,...c,backgroundPosition:`center`,border:i}})}function c({inset:e}){let t=`${e*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-shade`,className:`absolute rounded-full`,style:{top:t,left:t,right:t,bottom:t,backgroundColor:`rgba(0, 0, 0, 0.15)`}})}function l({color:e,isEmpty:t,size:n=32,spool:r}){return t?(0,o.jsx)(`div`,{className:`rounded-full border-2 border-dashed border-zinc-500 flex items-center justify-center`,style:{width:n,height:n},children:(0,o.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-zinc-600`})}):i(r)?(0,o.jsxs)(`div`,{className:`relative shrink-0`,style:{width:n,height:n},children:[(0,o.jsx)(s,{spool:r,size:n,inset:2/32,border:`${1.5*n/32}px solid rgba(255, 255, 255, 0.7)`}),(0,o.jsx)(c,{inset:5/32})]}):(0,o.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 32 32`,children:[(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:e,stroke:`white`,strokeWidth:`1.5`,strokeOpacity:`0.7`}),(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`11`,fill:e,style:{filter:`brightness(0.85)`}})]})}export{s as n,c as r,l as t};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/assets/SpreadsheetPreviewModal-1Pt6Z5xn.js


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä