Skip to content

Conversation

@Hatles
Copy link

@Hatles Hatles commented Apr 16, 2025

WIP

image

@jbatonnet
Copy link
Owner

jbatonnet commented Apr 16, 2025

Oh yeah, I recently started looking at Happy Hare to evaluate the effort of adapting it to Rinkhals. Great job it's going to be nice :)

@Hatles
Copy link
Author

Hatles commented Apr 18, 2025

Done:

  • get ace status on moonraker startup (spools colors and materials)
  • edit ToolToGate mapping
  • start print using ToolToGate mapping to virtually change spools order

TODO:

  • listen to ace status changes
  • add edit of spools color, material, etc...
  • show status of current used filament
  • enable 2 ace at same time
  • document new gcodes
  • find a way to start/stop dryer
  • ...

@yungcheng
Copy link

thank you for the effort!

just a note, fluidd has happy-hare support merged and release in 1.34.0

it would be wonderful if you could update fluidd as part of this PR (or a follow-up) when the feature is ready!

@Hatles
Copy link
Author

Hatles commented Apr 22, 2025

@jbatonnet I rebased my work on top of master as develop is missing last fixes for the kobra s1 and last firmware versions.
What's the prefered workflow ? Should we make our pr targeting master or develop ?

@thecalamityjoe87
Copy link

Done:

* get ace status on moonraker startup (spools colors and materials)

* edit ToolToGate mapping

* start print using ToolToGate mapping to virtually change spools order

TODO:

* listen to ace status changes

* add edit of spools color, material, etc...

* show status of current used filament

* enable 2 ace at same time

* document new gcodes

* find a way to start/stop dryer

* ...

Would these notes help you?

https://gist.github.com/basvd/b78fee8771492824f324f3c255eae53d

@jbatonnet
Copy link
Owner

Add these maybe
ace_mqtt.md

@Hatles Sorry I was focusing on the last firmware updates in the past few days. I'm slowly preparing the switch from master to develop but it's not ready yet. You can target master for now

@jbatonnet
Copy link
Owner

And I just pushed Fluidd 1.34.x to master with MMU support

@Hatles Hatles changed the base branch from develop to master April 25, 2025 08:30
@Hatles
Copy link
Author

Hatles commented Apr 26, 2025

Done:

  • listen to ace status changes
  • add edit of spools color, material, etc...
  • add AnycubicSlicerNext as suported slicer
  • fix fluidd integration

image
image
image

@Felixoid
Copy link

Hello, it's a lovely feature!

Are there plans to continue working on it?

@Toolmaster30
Copy link

Hello, are there any plans as to whether and when this support will be extended to the ACE Pro in Rinkhals? Regards, Georg

@jayo38
Copy link

jayo38 commented Jul 19, 2025

God, this is amazing! Just one question: would this work to connect a custom MMU to the Kobra 3? It’s a project I’ve been trying to do for a while, but since I can’t install Happy Hare or Kiauh — mainly because it doesn’t work via SSH, or at least I don’t know how to use sudo apt-get — it says the command doesn’t exist due to a crappy Klipper version. Wow, how much it annoys me that the software is closed when it was literally created by the community and RepRap. Anyway, if by any chance you know of some info that could help me, I’d really appreciate it.

@obiwan51
Copy link

are there any plans to merge this anytime soon?

@rickrot97
Copy link

I would also like this to be merged

@jayo38
Copy link

jayo38 commented Oct 21, 2025

I don't think it will be added soon since programs like Happy Hare would have to be installed on the printer and it becomes complicated because of disabled functions. What I did in the end was change the board and adapt an M4P.

TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Implements dynamic flush_multiplier control (0.0-3.0) for ACE multi-material system to reduce filament waste by up to 90% when using Prime Towers or Flush into Objects.

Features:
- Add patch_ace_flush_control() method to kobra.py
- G-Code commands: ACE_FLUSH_MINIMAL, ACE_FLUSH_NORMAL, ACE_FLUSH_MAXIMUM
- Custom value command: SET_ACE_FLUSH_MULTIPLIER VALUE=X
- Query command: GET_ACE_FLUSH_MULTIPLIER
- HTTP API integration: /printer/filament_hub/set_config
- Instant runtime updates (no FIRMWARE_RESTART required)

Technical Details:
- Intercepts G-Code commands via KlippyConnection.request wrapper
- Validates flush_multiplier range (0.0-3.0)
- Updates both /userdata/app/gk/config/ams_config.cfg and runtime value
- Sends gcode_response events to Mainsail/Fluidd

Benefits:
- 10 tool changes: 300mm → 30mm (90% reduction)
- 50 tool changes: 1500mm → 150mm (20g material saved)
- Real-world: 31.5g saved on multi-color vase (26% less waste)

Excludes MMU integration components (those are from PR jbatonnet#139 by Hatles)
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Adds ams_settings to MQTT print payload to enable basic multi-material
printing functionality with ACE system.

Features:
- Add ams_settings with standard tool mapping [0,1,2,3]
- Enable multi-material prints without MMU GUI
- Kobra 3 only (model code check)
- Minimal implementation (~10 lines)

Technical Details:
- Adds ams_settings to MQTT payload in mqtt_print_file()
- Standard mapping: T0→Gate0, T1→Gate1, T2→Gate2, T3→Gate3
- Works independently of PR jbatonnet#139 (MMU GUI by @Hatles)
- Can be extended by PR jbatonnet#139 for advanced features

Benefits:
- Multi-material prints work "out of the box"
- No manual ams_settings configuration needed
- Compatible with ACE Flush Control (PR jbatonnet#1)
- Foundation for future MMU features

Note: This is minimal implementation. Advanced features like
dynamic tool mapping and material detection are in PR jbatonnet#139.
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Adds ams_settings to MQTT print payload for multi-material support,
with automatic detection of ACE hardware availability.

Features:
- Add ams_settings with standard tool mapping [0,1,2,3]
- Add is_ace_available() method for ACE hardware detection
- Only add metadata when ACE is actually connected
- Kobra 3 only (model code check)

Technical Details:
- Detects ACE via /userdata/app/gk/config/ams_config.cfg presence
- Prevents errors on printers without ACE hardware
- Standard mapping: T0→Gate0, T1→Gate1, T2→Gate2, T3→Gate3
- Works independently of PR jbatonnet#139 (MMU GUI by @Hatles)

Benefits:
- Multi-material prints work "out of the box" when ACE present
- No errors on printers without ACE
- Compatible with ACE Flush Control (PR jbatonnet#1)
- Foundation for future MMU features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Implements dynamic flush_multiplier control (0.0-3.0) for ACE multi-material
system to reduce filament waste by up to 90% when using Prime Towers or
Flush into Objects.

Features:
- ACE_FLUSH_MINIMAL command (0.1 = 10% hardware purge)
- ACE_FLUSH_NORMAL command (1.0 = 100% standard)
- ACE_FLUSH_MAXIMUM command (3.0 = 300% for difficult materials)
- SET_ACE_FLUSH_MULTIPLIER VALUE=X (custom 0.0-3.0)
- GET_ACE_FLUSH_MULTIPLIER (query current value)
- HTTP API integration: /printer/filament_hub/set_config
- Instant runtime updates (no FIRMWARE_RESTART required)

Technical Details:
- Intercepts G-Code commands via KlippyConnection.request wrapper
- Validates flush_multiplier range (0.0-3.0)
- Updates both /userdata/app/gk/config/ams_config.cfg and runtime value
- Sends gcode_response events to Mainsail/Fluidd console

Benefits:
- 10 tool changes: 300mm → 30mm hardware purge (90% reduction)
- 50 tool changes: 1500mm → 150mm (20g material saved)
- Real-world: 31.5g saved on multi-color vase (26% less waste)

Usage in OrcaSlicer Machine Start G-Code:
  G9111 bedTemp=[...] extruderTemp=[...]
  {if enable_prime_tower or flush_into_objects}
    ACE_FLUSH_MINIMAL
  {else}
    ACE_FLUSH_NORMAL
  {endif}

Fixes: jbatonnet#273
Related: jbatonnet#139 (MMU GUI by @Hatles)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Adds ams_settings to MQTT print payload for multi-material support,
with automatic detection of ACE hardware availability.

Features:
- Add ams_settings with standard tool mapping [0,1,2,3]
- Add is_ace_available() method for ACE hardware detection
- Only add metadata when ACE is actually connected
- Kobra 3 only (model code check)

Technical Details:
- Detects ACE via /userdata/app/gk/config/ams_config.cfg presence
- Prevents errors on printers without ACE hardware
- Standard mapping: T0→Gate0, T1→Gate1, T2→Gate2, T3→Gate3
- Works independently of PR jbatonnet#139 (MMU GUI by @Hatles)

Benefits:
- Multi-material prints work "out of the box" when ACE present
- No errors on printers without ACE
- Compatible with ACE Flush Control (PR jbatonnet#1)
- Foundation for future MMU features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Implements dynamic flush_multiplier control (0.0-3.0) for ACE multi-material
system to reduce filament waste by up to 90% when using Prime Towers or
Flush into Objects.

Features:
- ACE_FLUSH_MINIMAL command (0.1 = 10% hardware purge)
- ACE_FLUSH_NORMAL command (1.0 = 100% standard)
- ACE_FLUSH_MAXIMUM command (3.0 = 300% for difficult materials)
- SET_ACE_FLUSH_MULTIPLIER VALUE=X (custom 0.0-3.0)
- GET_ACE_FLUSH_MULTIPLIER (query current value)
- HTTP API integration: /printer/filament_hub/set_config
- Instant runtime updates (no FIRMWARE_RESTART required)

Technical Details:
- Intercepts G-Code commands via KlippyConnection.request wrapper
- Validates flush_multiplier range (0.0-3.0)
- Updates both /userdata/app/gk/config/ams_config.cfg and runtime value
- Sends gcode_response events to Mainsail/Fluidd console

Benefits:
- 10 tool changes: 300mm → 30mm hardware purge (90% reduction)
- 50 tool changes: 1500mm → 150mm (20g material saved)
- Real-world: 31.5g saved on multi-color vase (26% less waste)

Usage in OrcaSlicer Machine Start G-Code:
  G9111 bedTemp=[...] extruderTemp=[...]
  {if enable_prime_tower or flush_into_objects}
    ACE_FLUSH_MINIMAL
  {else}
    ACE_FLUSH_NORMAL
  {endif}

Fixes: jbatonnet#273
Related: jbatonnet#139 (MMU GUI by @Hatles)
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 24, 2025
Adds ams_settings to MQTT print payload for multi-material support,
with automatic detection of ACE hardware availability.

Features:
- Add ams_settings with standard tool mapping [0,1,2,3]
- Add is_ace_available() method for ACE hardware detection
- Only add metadata when ACE is actually connected
- Kobra 3 only (model code check)

Technical Details:
- Detects ACE via /userdata/app/gk/config/ams_config.cfg presence
- Prevents errors on printers without ACE hardware
- Standard mapping: T0→Gate0, T1→Gate1, T2→Gate2, T3→Gate3
- Works independently of PR jbatonnet#139 (MMU GUI by @Hatles)

Benefits:
- Multi-material prints work "out of the box" when ACE present
- No errors on printers without ACE
- Compatible with ACE Flush Control (PR jbatonnet#1)
- Foundation for future MMU features
TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 25, 2025
Critical fixes for PR jbatonnet#139 to ensure production readiness:

1. MQTT Payload Format Fix (kobra.py):
   - Add missing 'filepath' field (required by Anycubic Cloud API)
   - Fix 'taskid' from invalid '-1' to unique random ID
   - Add 'task_mode' field (1 = local print)
   - Prevents Error 10110 'json is Invalid'
   - Based on validated format from kobra-unleashed project

2. Status Update Throttling (mmu_ace.py):
   - Add _last_status_update timestamp tracking
   - Implement throttling in _handle_status_update() method
   - Add force parameter for critical updates
   - Apply force=True to 4 user-initiated actions:
     * set_ace() - initial ACE load
     * _load_ace() - after config load
     * ACE config build completion
     * update_ttg_map() - TTG map updates
   - Prevents UI lag while maintaining responsive gate selection

These fixes ensure PR jbatonnet#139 works correctly in production without
Error 10110 and with responsive UI updates.

Reference: Based on fixes from PR jbatonnet#332 (MQTT) and performance
analysis showing need for immediate status updates on user actions.
@TheBlackPitcher
Copy link

TheBlackPitcher commented Nov 25, 2025

TheBlackPitcher added a commit to TheBlackPitcher/Rinkhals that referenced this pull request Nov 25, 2025
…, endless spool, 2-unit support

Extends PR jbatonnet#139 with critical production features for Anycubic Color Engine integration:

## Critical Fixes (from PR jbatonnet#334)
- MQTT payload: Add missing filepath, task_mode fields (prevent Error 10110)
- Status throttling: Implement force/throttle/debounce modes (prevent UI lag)

## New Production Features
1. Multi-Command G-code Parser
   - Handle Fluidd multi-command lines (e.g., "CMD1 ARG1=X CMD2 ARG2=Y")
   - Detect registered handlers, split and execute sequentially
   - Fixes MMU_SLICER_TOOL_MAP SKIP_AUTOMAP and similar edge cases

2. TTG Map Reset with Cooldown Protection
   - Implement MMU_TTG_MAP RESET=1 command
   - 2-second cooldown blocks subsequent MAP updates
   - Prevents Fluidd race condition (RESET followed by old MAP)

3. Endless Spool / Backup Roll Integration
   - Map endless spool groups to ACE backup roll functionality
   - Multiple ams_box_mapping entries with same paint_index (tool)
   - Automatic gate switching when RFID detects empty spool
   - Works for Fluidd-initiated prints via MQTT

4. Gate Editing with RFID Protection
   - Allow editing gates without RFID tags (rfid=1)
   - Block editing RFID-locked gates (rfid=2)
   - Race condition fix: 100ms delay before status update
   - Immediate UI updates without page reload

5. 2-Unit Support (8 gates total)
   - Global gate indexing across multiple ACE units
   - Tool 0-3 = Unit 0, Tool 4-7 = Unit 1
   - TTG mapping works seamlessly across units
   - All features support multi-unit configuration

## Bug Fixes
- Empty string parsing in MMU_ENDLESS_SPOOL GROUPS=,,0
- SLICER_TOOL_MAP control command without TOOL parameter
- Incorrect method reference in update_gate() causing crashes
- SKU parsing for Anycubic RFID tags (vendor, series, color)

## Files Changed
- kobra.py: Multi-command parser (+25 lines)
- mmu_ace.py: All features above (+918 lines)

## Testing Status
- All features tested in UI and basic operations
- Multi-color print validation pending
- 2-unit hardware testing pending

This completes all TODO items from PR jbatonnet#139 and makes MMU ACE production-ready.
@ViperRNMC
Copy link

also found this OrcaSlicer/OrcaSlicer#10725

@DerDoubleD
Copy link

Dort sind nicht alle Parameter korrekt.
Im meinem issuse sind sie alle korrekt und getestet> Additional information.

https://github.com/ANYCUBIC-3D/Kobra3/blob/91d9771204b00242668a02586cf317a58a1aa26f/klipper-go/docs/N033%E6%96%99%E7%9B%92%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.