ACE2 #26

Manually merged
viewit merged 15 commits from gangoke/KX-Bridge-Release:ACE2 into master 2026-05-21 14:38:28 +02:00
Contributor

ACE2 Support

Automatic switching between 3 modes

  • Toolhead (No ACE units. Toolhead Slots 1-4)
  • ACE_DIRECT (Single ACE Unit direct connect to Toolhead Slots 1-4)
  • ACE_HUB (Up to 4 ACE Units connected to Slot 4 via hub)
    • Toolhead Slots 1-3 + ACE Slots.
    • ACE 1 First Slot treated as Slot 4
    • Support up to 19 Slots

ACE Auto Refill

  • Toggle On/Off

ACE Dryer

  • Temperature and Humity Monitor
    image.png
  • Dryer Control
  • Drying Presets System
    • Pre-configured Customizable drying profiles for common materials, plus additional slots:
    • Presets saved in config.ini
    [ace_dry_presets]
    
image.png

Index Mapping Reference

This section summarizes how ACE2 separates display labels, internal global indices, physical box/slot addresses, and print-facing AMS indices.

  • _global_to_box_slot() resolves an internal global index to (box_id, local_slot)
  • _box_local_to_global() converts a physical (box_id, local_slot) back to the internal global index
  • _slot_to_print_ams_index() converts the internal global index into the printer-facing ams_index
  • The frontend displays slot labels as global_index + 1, so the UI is one-based while backend mapping remains zero-based

Mode Detection

  • toolhead: only the toolhead box is present
  • ace_direct: ACE channels are exposed directly and only the first ACE box is used
  • ace_hub: toolhead channels are present and ACE boxes are mapped after them

Index Map: toolhead mode

UI Label Internal Global Index Physical Source Physical Address Print AMS Index
Slot 1 0 Toolhead tool 0 0
Slot 2 1 Toolhead tool 1 1
Slot 3 2 Toolhead tool 2 2
  • global_to_box_slot(1) -> (-1, 1)
  • slot_to_print_ams_index(1) -> 1

Index Map: ace_direct mode

UI Label Internal Global Index Physical Source Physical Address Print AMS Index
Slot 1 0 ACE box 0 (box_id=0, slot=0) 0
Slot 2 1 ACE box 0 (box_id=0, slot=1) 1
Slot 3 2 ACE box 0 (box_id=0, slot=2) 2
Slot 4 3 ACE box 0 (box_id=0, slot=3) 3
  • global_to_box_slot(2) -> (0, 2)
  • slot_to_print_ams_index(2) -> 2

Index Map: ace_hub mode

UI Label Internal Global Index Physical Source Physical Address Print AMS Index
Slot 1 0 Toolhead tool 0 n/a
Slot 2 1 Toolhead tool 1 n/a
Slot 3 2 Toolhead tool 2 n/a
Slot 4 3 ACE box 0 (box_id=0, slot=0) 4
Slot 5 4 ACE box 0 (box_id=0, slot=1) 5
Slot 6 5 ACE box 0 (box_id=0, slot=2) 6
Slot 7 6 ACE box 0 (box_id=0, slot=3) 7
Slot 8 7 ACE box 1 (box_id=1, slot=0) 8
Slot 9 8 ACE box 1 (box_id=1, slot=1) 9
  • In ace_hub, toolhead slots occupy internal indices 0..2
  • ACE box slots start at internal global index 3
  • global_to_box_slot(7) -> (1, 0) means displayed Slot 8 maps to ACE box 1, local slot 0
  • box_local_to_global(1, 0) -> 7
  • slot_to_print_ams_index(7) -> 8

UI Enhancements

Filament Section

  • Support for up to 19 Slots
  • Label displays Mode
  • Slot currently loaded outlined in green
  • Slot actively loading outlined in pulsing green
  • Slot actively unloading outline in pulsing red
    image.png
  • Unload/Load slot via Slot edit dialog
    image.png

gCode Color Mapping Dialog

  • ACE2 Support
  • Fixed inconsistency of pulling color from gcode.
  • Added notifier if color in gcode is present in the actual object(s)
  • Improved default mapping strategy
  • Works best when filament is synced in Orca
    image.png

Bug Fixes and Enhancements

  • Happy Hare now only syncs loaded slots and no longer adds a placeholder for an empty slot.
  • gCode Color mapping dialog no longer shows the previous file's gcode colors when opening via the Print Banner after upload.
# ACE2 Support ## Automatic switching between 3 modes - Toolhead (No ACE units. Toolhead Slots 1-4) - ACE_DIRECT (Single ACE Unit direct connect to Toolhead Slots 1-4) - ACE_HUB (Up to 4 ACE Units connected to Slot 4 via hub) - Toolhead Slots 1-3 + ACE Slots. - ACE 1 First Slot treated as Slot 4 - Support up to 19 Slots ## ACE Auto Refill - Toggle On/Off ## ACE Dryer - Temperature and Humity Monitor <img width="285" alt="image.png" src="attachments/85c326d7-abdd-4351-b003-77041db3906c"> - Dryer Control - Drying Presets System - Pre-configured Customizable drying profiles for common materials, plus additional slots: - Presets saved in config.ini ```ini [ace_dry_presets] ``` <img width="431" alt="image.png" src="attachments/9d05fe30-39a5-4fe4-bc86-eac657bd957b"> ## Index Mapping Reference This section summarizes how ACE2 separates display labels, internal global indices, physical box/slot addresses, and print-facing AMS indices. - `_global_to_box_slot()` resolves an internal global index to `(box_id, local_slot)` - `_box_local_to_global()` converts a physical `(box_id, local_slot)` back to the internal global index - `_slot_to_print_ams_index()` converts the internal global index into the printer-facing `ams_index` - The frontend displays slot labels as `global_index + 1`, so the UI is one-based while backend mapping remains zero-based ### Mode Detection - `toolhead`: only the toolhead box is present - `ace_direct`: ACE channels are exposed directly and only the first ACE box is used - `ace_hub`: toolhead channels are present and ACE boxes are mapped after them ### Index Map: toolhead mode | UI Label | Internal Global Index | Physical Source | Physical Address | Print AMS Index | |----------|------------------------|-----------------|------------------|-----------------| | Slot 1 | 0 | Toolhead | tool 0 | 0 | | Slot 2 | 1 | Toolhead | tool 1 | 1 | | Slot 3 | 2 | Toolhead | tool 2 | 2 | - `global_to_box_slot(1) -> (-1, 1)` - `slot_to_print_ams_index(1) -> 1` ### Index Map: ace_direct mode | UI Label | Internal Global Index | Physical Source | Physical Address | Print AMS Index | |----------|------------------------|-----------------|------------------|-----------------| | Slot 1 | 0 | ACE box 0 | `(box_id=0, slot=0)` | 0 | | Slot 2 | 1 | ACE box 0 | `(box_id=0, slot=1)` | 1 | | Slot 3 | 2 | ACE box 0 | `(box_id=0, slot=2)` | 2 | | Slot 4 | 3 | ACE box 0 | `(box_id=0, slot=3)` | 3 | - `global_to_box_slot(2) -> (0, 2)` - `slot_to_print_ams_index(2) -> 2` ### Index Map: ace_hub mode | UI Label | Internal Global Index | Physical Source | Physical Address | Print AMS Index | |----------|------------------------|-----------------|------------------|-----------------| | Slot 1 | 0 | Toolhead | tool 0 | n/a | | Slot 2 | 1 | Toolhead | tool 1 | n/a | | Slot 3 | 2 | Toolhead | tool 2 | n/a | | Slot 4 | 3 | ACE box 0 | `(box_id=0, slot=0)` | 4 | | Slot 5 | 4 | ACE box 0 | `(box_id=0, slot=1)` | 5 | | Slot 6 | 5 | ACE box 0 | `(box_id=0, slot=2)` | 6 | | Slot 7 | 6 | ACE box 0 | `(box_id=0, slot=3)` | 7 | | Slot 8 | 7 | ACE box 1 | `(box_id=1, slot=0)` | 8 | | Slot 9 | 8 | ACE box 1 | `(box_id=1, slot=1)` | 9 | - In `ace_hub`, toolhead slots occupy internal indices `0..2` - ACE box slots start at internal global index `3` - `global_to_box_slot(7) -> (1, 0)` means displayed Slot 8 maps to ACE box 1, local slot 0 - `box_local_to_global(1, 0) -> 7` - `slot_to_print_ams_index(7) -> 8` # UI Enhancements ## Filament Section - Support for up to 19 Slots - Label displays Mode - Slot currently loaded outlined in green - Slot actively loading outlined in pulsing green - Slot actively unloading outline in pulsing red <img width="802" alt="image.png" src="attachments/c4f267b8-b26d-43d0-b88a-7a8846b583c1"> - Unload/Load slot via Slot edit dialog <img width="402" alt="image.png" src="attachments/130a29e8-670b-47eb-afcd-6d0eca6f66ef"> ## gCode Color Mapping Dialog - ACE2 Support - Fixed inconsistency of pulling color from gcode. - Added notifier if color in gcode is present in the actual object(s) - Improved default mapping strategy - Works best when filament is synced in Orca <img width="291" alt="image.png" src="attachments/d3f1d39d-50be-4b75-8f5c-675c0ef5850a"> ## Bug Fixes and Enhancements - Happy Hare now only syncs loaded slots and no longer adds a placeholder for an empty slot. - Tested with [OrcaSlicer | PR #13372](https://github.com/OrcaSlicer/OrcaSlicer/pull/13372) - gCode Color mapping dialog no longer shows the previous file's gcode colors when opening via the Print Banner after upload.
gangoke added 12 commits 2026-05-19 15:24:18 +02:00
gangoke changed title from ACE2 to WIP: ACE2 2026-05-19 15:29:23 +02:00
Owner

Hi @gangoke — first off, huge thanks for this contribution. The auto-detection between toolhead / ace_direct / ace_hub plus the index-mapping helpers (_global_to_box_slot / _box_local_to_global / _slot_to_print_ams_index) are exactly the kind of clean abstraction this code needed for multi-box support. The Happy-Hare MMU change (only syncing populated slots) is also a nice catch and aligns with OrcaSlicer PR #13372.

A few notes / questions before we merge:

  1. PR is currently a Draft. Once you feel it's ready, please mark it "Ready for review" — that's our signal to merge.

  2. Test coverage. You mentioned 2–4 ACE units are theoretical and only Docker-tested. Could you confirm:

    • Does the bridge behave correctly on a plain Kobra X without any ACE (mode = toolhead, 4-slot stock filament box)? That's the configuration most users have, and I want to make sure auto-detection falls through cleanly.
    • Did skip/start + skip/query_obj (the part-skip feature from v0.9.10) still work in your Docker test? The new index mapping shouldn't touch that path, but worth a sanity check.
  3. Hardware on our side. We don't have ACE2 hardware here either, so merging this means releasing it on trust — that's fine, but we'll mark it experimental in the v0.9.11 CHANGELOG so users know.

  4. GPLv3 header. No action needed from you — the project went GPLv3 a few days ago, and our release.sh will add the standard header to the file automatically on the next release build. By submitting this PR you've already implicitly agreed to GPLv3 redistribution.

  5. Process. We'll merge into our dev repo first (not directly into release-repo master), run it on the real 4-slot Kobra X here, and then push to release-repo as v0.9.11. So once you flip this to Ready, there might be a short delay before it shows up as a release.

  6. Minor: The PR adds both config.ini.example (root) and config/config.ini.example with the same [ace_dry_presets] section. We can clean that duplication up separately — no change needed in this PR.

Again, really appreciate the work — the dryer presets and the per-slot pulsing UI feedback are great touches. Looking forward to flipping the switch on this.

Hi @gangoke — first off, **huge thanks** for this contribution. The auto-detection between `toolhead` / `ace_direct` / `ace_hub` plus the index-mapping helpers (`_global_to_box_slot` / `_box_local_to_global` / `_slot_to_print_ams_index`) are exactly the kind of clean abstraction this code needed for multi-box support. The Happy-Hare MMU change (only syncing populated slots) is also a nice catch and aligns with OrcaSlicer PR #13372. A few notes / questions before we merge: 1. **PR is currently a Draft.** Once you feel it's ready, please mark it "Ready for review" — that's our signal to merge. 2. **Test coverage.** You mentioned 2–4 ACE units are theoretical and only Docker-tested. Could you confirm: - Does the bridge behave correctly on a plain Kobra X **without any ACE** (mode = `toolhead`, 4-slot stock filament box)? That's the configuration most users have, and I want to make sure auto-detection falls through cleanly. - Did `skip/start` + `skip/query_obj` (the part-skip feature from v0.9.10) still work in your Docker test? The new index mapping shouldn't touch that path, but worth a sanity check. 3. **Hardware on our side.** We don't have ACE2 hardware here either, so merging this means releasing it on trust — that's fine, but we'll mark it **experimental** in the v0.9.11 CHANGELOG so users know. 4. **GPLv3 header.** No action needed from you — the project went GPLv3 a few days ago, and our `release.sh` will add the standard header to the file automatically on the next release build. By submitting this PR you've already implicitly agreed to GPLv3 redistribution. 5. **Process.** We'll merge into our dev repo first (not directly into release-repo master), run it on the real 4-slot Kobra X here, and then push to release-repo as v0.9.11. So once you flip this to Ready, there might be a short delay before it shows up as a release. 6. **Minor:** The PR adds both `config.ini.example` (root) and `config/config.ini.example` with the same `[ace_dry_presets]` section. We can clean that duplication up separately — no change needed in this PR. Again, really appreciate the work — the dryer presets and the per-slot pulsing UI feedback are great touches. Looking forward to flipping the switch on this.
Author
Contributor

@viewit thanks for the feedback.

I ran out of time testing before I had to go to work, but I wanted to get something out there. Most testing I was able to get through was done in Ace_hub mode. Plan for today is focus on toolhead mode testing. Once I validate toolhead mode is solid I'll open this pr for review. I'll add skip part feature to my tests.

@viewit thanks for the feedback. I ran out of time testing before I had to go to work, but I wanted to get something out there. Most testing I was able to get through was done in Ace_hub mode. Plan for today is focus on toolhead mode testing. Once I validate toolhead mode is solid I'll open this pr for review. I'll add skip part feature to my tests.
gangoke added 1 commit 2026-05-20 03:11:17 +02:00
gangoke changed title from WIP: ACE2 to ACE2 2026-05-20 06:54:51 +02:00
gangoke added 1 commit 2026-05-20 07:26:09 +02:00
gangoke added 1 commit 2026-05-20 07:26:24 +02:00
Author
Contributor
  1. PR is currently a Draft. Once you feel it's ready, please mark it "Ready for review" — that's our signal to merge.

Ready!

  1. Test coverage. You mentioned 2–4 ACE units are theoretical and only Docker-tested. Could you confirm:
    • Does the bridge behave correctly on a plain Kobra X without any ACE (mode = toolhead, 4-slot stock filament box)? That's the configuration most users have, and I want to make sure auto-detection falls through cleanly.
    • Did skip/start + skip/query_obj (the part-skip feature from v0.9.10) still work in your Docker test? The new index mapping shouldn't touch that path, but worth a sanity check.

All current features tested for all 3 modes (limited to 1 ACE2): PASS

  1. GPLv3 header. No action needed from you — the project went GPLv3 a few days ago, and our release.sh will add the standard header to the file automatically on the next release build. By submitting this PR you've already implicitly agreed to GPLv3 redistribution.

❤️

  1. Process. We'll merge into our dev repo first (not directly into release-repo master), run it on the real 4-slot Kobra X here, and then push to release-repo as v0.9.11. So once you flip this to Ready, there might be a short delay before it shows up as a release.

👍

Again, really appreciate the work — the dryer presets and the per-slot pulsing UI feedback are great touches. Looking forward to flipping the switch on this.

Glad to put in the work. I'm a huge advocate of breaking free of cloud reliance. Thank you for laying a foundation.

> > 1. **PR is currently a Draft.** Once you feel it's ready, please mark it "Ready for review" — that's our signal to merge. > Ready! > > 2. **Test coverage.** You mentioned 2–4 ACE units are theoretical and only Docker-tested. Could you confirm: > - Does the bridge behave correctly on a plain Kobra X **without any ACE** (mode = `toolhead`, 4-slot stock filament box)? That's the configuration most users have, and I want to make sure auto-detection falls through cleanly. > - Did `skip/start` + `skip/query_obj` (the part-skip feature from v0.9.10) still work in your Docker test? The new index mapping shouldn't touch that path, but worth a sanity check. > All current features tested for all 3 modes (limited to 1 ACE2): PASS > > 4. **GPLv3 header.** No action needed from you — the project went GPLv3 a few days ago, and our `release.sh` will add the standard header to the file automatically on the next release build. By submitting this PR you've already implicitly agreed to GPLv3 redistribution. > ❤️ > > 5. **Process.** We'll merge into our dev repo first (not directly into release-repo master), run it on the real 4-slot Kobra X here, and then push to release-repo as v0.9.11. So once you flip this to Ready, there might be a short delay before it shows up as a release. > 👍 > > Again, really appreciate the work — the dryer presets and the per-slot pulsing UI feedback are great touches. Looking forward to flipping the switch on this. > Glad to put in the work. I'm a huge advocate of breaking free of cloud reliance. Thank you for laying a foundation.
Owner

🎉 Released as v0.9.11!https://gitea.it-drui.de/viewit/KX-Bridge-Release/releases/tag/v0.9.11

@gangoke thank you again for this. Here's how it went on our side:

  • Pulled your branch into our dev repo, verified the toolhead (no-ACE) path live against a real 4-slot Kobra X: auto-detection correctly reports filament_mode=toolhead, all 4 slots render with their colors, and the v0.9.10 skip-objects feature + multi-printer setup are untouched.
  • One tiny fix on the way in: the /printer{num:\d+} route string is now a raw string (was emitting a SyntaxWarning on newer Python).
  • Your duplicate-config.ini.example cleanup and the dryer-visibility fix from your follow-up commits are included.

I'm closing this PR rather than merging it through Gitea for a purely mechanical reason: our public release repo is generated from a separate dev repo (that's where the GPLv3 header gets stamped on by release.sh), so the code lands here as a build commit rather than via the PR's own history. That means Gitea can't mark it "merged" even though your work is 100% in the v0.9.11 release. Not a reflection on the contribution — you're credited by name in the CHANGELOG.

ACE Pro 2 support is shipped as experimental (single-unit tested by you, multi-unit hub untested on real hardware, and we don't have ACE2 hardware here either) — so if multi-ACE users hit anything, it'll come back as issues and we'll iterate.

Really appreciate you pushing the cloud-free cause forward. 🙏 Door's open for the next one.

🎉 **Released as v0.9.11!** — https://gitea.it-drui.de/viewit/KX-Bridge-Release/releases/tag/v0.9.11 @gangoke thank you again for this. Here's how it went on our side: - Pulled your branch into our dev repo, verified the `toolhead` (no-ACE) path **live against a real 4-slot Kobra X**: auto-detection correctly reports `filament_mode=toolhead`, all 4 slots render with their colors, and the v0.9.10 skip-objects feature + multi-printer setup are untouched. ✅ - One tiny fix on the way in: the `/printer{num:\d+}` route string is now a raw string (was emitting a `SyntaxWarning` on newer Python). - Your duplicate-`config.ini.example` cleanup and the dryer-visibility fix from your follow-up commits are included. I'm **closing this PR rather than merging it through Gitea** for a purely mechanical reason: our public release repo is generated from a separate dev repo (that's where the GPLv3 header gets stamped on by `release.sh`), so the code lands here as a build commit rather than via the PR's own history. That means Gitea can't mark it "merged" even though your work is 100% in the v0.9.11 release. Not a reflection on the contribution — you're credited by name in the [CHANGELOG](https://gitea.it-drui.de/viewit/KX-Bridge-Release/src/branch/master/CHANGELOG.md). ACE Pro 2 support is shipped as **experimental** (single-unit tested by you, multi-unit hub untested on real hardware, and we don't have ACE2 hardware here either) — so if multi-ACE users hit anything, it'll come back as issues and we'll iterate. Really appreciate you pushing the cloud-free cause forward. 🙏 Door's open for the next one.
viewit closed this pull request 2026-05-20 11:19:57 +02:00
viewit reopened this pull request 2026-05-21 14:38:26 +02:00
viewit manually merged commit fe1ed4b096 into master 2026-05-21 14:38:28 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: viewit/KX-Bridge-Release#26
No description provided.