瀏覽代碼

Enable AMS drying support for H2S with firmware 01.02.00.00+ (#886)

  Move H2S from the drying-unsupported blocklist to the firmware-gated
  list, requiring minimum firmware 01.02.00.00 (released end of March
  2026). Both remote AMS drying and queue auto-drying now work on H2S.
maziggy 1 月之前
父節點
當前提交
3381f73e0f
共有 3 個文件被更改,包括 6 次插入2 次删除
  1. 1 0
      CHANGELOG.md
  2. 2 1
      backend/app/services/printer_manager.py
  3. 3 1
      backend/tests/unit/services/test_printer_manager.py

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **Database Engine Info on System Page** — The System Information page now shows the active database engine (SQLite or PostgreSQL) and its version in the Database section, making it easy to verify which backend is in use.
 - **Database Engine Info on System Page** — The System Information page now shows the active database engine (SQLite or PostgreSQL) and its version in the Database section, making it easy to verify which backend is in use.
 - **Plate Number in Printer View** ([#881](https://github.com/maziggy/bambuddy/issues/881)) — Printer cards and the stream overlay now show the plate number alongside the filename when printing plate 2+ of a multi-plate 3MF file (e.g. "MyModel — Plate 3"). Single-plate prints are unchanged.
 - **Plate Number in Printer View** ([#881](https://github.com/maziggy/bambuddy/issues/881)) — Printer cards and the stream overlay now show the plate number alongside the filename when printing plate 2+ of a multi-plate 3MF file (e.g. "MyModel — Plate 3"). Single-plate prints are unchanged.
 - **Printer Name in Queue for Model-Based Jobs** ([#881](https://github.com/maziggy/bambuddy/issues/881)) — Queue items assigned to a printer type ("Any P1S") now show the actual printer name once the scheduler assigns a specific printer, instead of continuing to display the generic model target while printing or in history.
 - **Printer Name in Queue for Model-Based Jobs** ([#881](https://github.com/maziggy/bambuddy/issues/881)) — Queue items assigned to a printer type ("Any P1S") now show the actual printer name once the scheduler assigns a specific printer, instead of continuing to display the generic model target while printing or in history.
+- **AMS Drying Support for H2S** ([#886](https://github.com/maziggy/bambuddy/issues/886)) — Remote AMS drying and queue auto-drying now work on H2S printers with firmware 01.02.00.00 or later.
 - **REST Smart Plug: Separate Power/Energy URLs and Unit Multipliers** ([#472](https://github.com/maziggy/bambuddy/issues/472)) — REST/Webhook smart plugs can now use individual URLs for power and energy data instead of requiring all values in a single status response. Each value falls back to the shared Status URL when no separate URL is configured, so existing setups work without changes. Added power and energy multipliers for unit conversion (e.g., set energy multiplier to `0.001` to convert Wh to kWh). Useful for platforms like ioBroker that expose each data point as a separate API endpoint.
 - **REST Smart Plug: Separate Power/Energy URLs and Unit Multipliers** ([#472](https://github.com/maziggy/bambuddy/issues/472)) — REST/Webhook smart plugs can now use individual URLs for power and energy data instead of requiring all values in a single status response. Each value falls back to the shared Status URL when no separate URL is configured, so existing setups work without changes. Added power and energy multipliers for unit conversion (e.g., set energy multiplier to `0.001` to convert Wh to kWh). Useful for platforms like ioBroker that expose each data point as a separate API endpoint.
 
 
 ### Fixed
 ### Fixed

+ 2 - 1
backend/app/services/printer_manager.py

@@ -100,6 +100,7 @@ def has_stg_cur_idle_bug(model: str | None) -> bool:
 # incorrectly gate X1E (matched by "X1") and H2D Pro (matched by "H2D").
 # incorrectly gate X1E (matched by "X1") and H2D Pro (matched by "H2D").
 _DRYING_MIN_FIRMWARE: dict[str, str] = {
 _DRYING_MIN_FIRMWARE: dict[str, str] = {
     "H2D": "01.02.30.00",
     "H2D": "01.02.30.00",
+    "H2S": "01.02.00.00",
     "X1": "01.09.00.00",
     "X1": "01.09.00.00",
     "X1C": "01.09.00.00",
     "X1C": "01.09.00.00",
     "P1P": "01.08.00.00",
     "P1P": "01.08.00.00",
@@ -107,7 +108,7 @@ _DRYING_MIN_FIRMWARE: dict[str, str] = {
 }
 }
 # Models that definitely don't support AMS drying (no AMS 2 Pro / AMS-HT compatibility)
 # Models that definitely don't support AMS drying (no AMS 2 Pro / AMS-HT compatibility)
 _DRYING_UNSUPPORTED_MODELS = frozenset(
 _DRYING_UNSUPPORTED_MODELS = frozenset(
-    {"P2S", "A1", "A1MINI", "A1-MINI", "A1 MINI", "H2S", "H2C", "N7", "O1C", "O1C2", "O1S", "N1", "N2S"}
+    {"P2S", "A1", "A1MINI", "A1-MINI", "A1 MINI", "H2C", "N7", "O1C", "O1C2", "O1S", "N1", "N2S"}
 )
 )
 
 
 
 

+ 3 - 1
backend/tests/unit/services/test_printer_manager.py

@@ -1069,11 +1069,13 @@ class TestSupportsDrying:
         assert supports_drying("X1C", "01.09.00.00") is True
         assert supports_drying("X1C", "01.09.00.00") is True
         assert supports_drying("P1S", "01.08.00.00") is True
         assert supports_drying("P1S", "01.08.00.00") is True
         assert supports_drying("H2D", "01.02.30.00") is True
         assert supports_drying("H2D", "01.02.30.00") is True
+        assert supports_drying("H2S", "01.02.00.00") is True
 
 
     def test_known_supported_old_firmware(self):
     def test_known_supported_old_firmware(self):
         """Verify known models with old firmware return False."""
         """Verify known models with old firmware return False."""
         assert supports_drying("X1C", "01.08.00.00") is False
         assert supports_drying("X1C", "01.08.00.00") is False
         assert supports_drying("P1S", "01.07.00.00") is False
         assert supports_drying("P1S", "01.07.00.00") is False
+        assert supports_drying("H2S", "01.01.00.00") is False
 
 
     def test_known_supported_no_firmware(self):
     def test_known_supported_no_firmware(self):
         """Verify known models with no firmware return False."""
         """Verify known models with no firmware return False."""
@@ -1081,7 +1083,7 @@ class TestSupportsDrying:
 
 
     def test_unsupported_models(self):
     def test_unsupported_models(self):
         """Verify models without AMS drying support return False regardless of firmware."""
         """Verify models without AMS drying support return False regardless of firmware."""
-        for model in ["P2S", "A1", "A1MINI", "A1-MINI", "H2S", "H2C", "N7", "N1", "N2S"]:
+        for model in ["P2S", "A1", "A1MINI", "A1-MINI", "H2C", "N7", "N1", "N2S"]:
             assert supports_drying(model, "99.99.99.99") is False, f"Expected False for {model}"
             assert supports_drying(model, "99.99.99.99") is False, f"Expected False for {model}"
 
 
     def test_unknown_models_allowed(self):
     def test_unknown_models_allowed(self):