Skip to content

Add M8213 LED On and M8212 LED Off macros for compatibility with the patched firmware gcode#130

Open
BertrandTheHealer wants to merge 3 commits into
OpenCentauri:mainfrom
BertrandTheHealer:patch-3
Open

Add M8213 LED On and M8212 LED Off macros for compatibility with the patched firmware gcode#130
BertrandTheHealer wants to merge 3 commits into
OpenCentauri:mainfrom
BertrandTheHealer:patch-3

Conversation

@BertrandTheHealer
Copy link
Copy Markdown

The modified start and end gcode at https://docs.opencentauri.cc/patched-firmware/modified_start_end_machine_gcode/ use M8213 and M8212 gcode for turning on and off the chamber light. Those are not currently implemented in COSMOS so users will see an error if they keep the same gcode they were using for the patched firmware.

This adds the commands back to macros.cfg as aliases to the SET_LED function for compatibility.

Add M8213 and M8212 macros to turn on and off the chamber light, for compatibility with the patched firmware.
@jamesturton
Copy link
Copy Markdown
Collaborator

The docs you linked specifically refer to the patched firmware, not cosmos. Reusing the same profile in orca slicer is not advised as you should be using the octo/klipper machine type and not elegoolink.

@BertrandTheHealer
Copy link
Copy Markdown
Author

BertrandTheHealer commented Apr 11, 2026

The docs you linked specifically refer to the patched firmware, not cosmos. Reusing the same profile in orca slicer is not advised as you should be using the octo/klipper machine type and not elegoolink.

I am using OrcaSlicer. I was previously using the patched firmware and when switching to COSMOS I did not change the printer profile, which contains the start gcode and machine parameters, only the "physical printer" profile which contains the connection settings and is located in a completely separate dialog. This seemed like the natural thing to do, and I would have lost or had to manually migrate other custom settings if I had switched to a completely different printer profile. Multiple people in the discord reported seeing errors in the print console that M8213 and M8212 are unknown commands after switching to COSMOS so I assume they did the same thing.

In my opinion this eliminates a potential pain point for users switching from patched firmware to COSMOS, and worst case doesn't hurt anything.

@RowanSkie
Copy link
Copy Markdown

I seem to remember some offhand comment that these two gcodes will be re-added in Cosmos.

@BertrandTheHealer
Copy link
Copy Markdown
Author

I seem to remember some offhand comment that these two gcodes will be re-added in Cosmos.

Ya that's what this PR does, if it's been done elsewhere let me know and I'll close it.

@jamesturton jamesturton requested a review from Atomique13 April 11, 2026 14:11
Copy link
Copy Markdown
Contributor

@suchmememanyskill suchmememanyskill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M8212/M8213 never set the hotend LED, only the case LED. Probably worth keeping that behaviour.

[gcode_macro M8213]
gcode:
SET_LED LED=case WHITE=1.00 SYNC=0 TRANSMIT=1
SET_LED LED=hotend WHITE=1.00 SYNC=0 TRANSMIT=1
Copy link
Copy Markdown
Contributor

@suchmememanyskill suchmememanyskill Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the hotend command: RUN_SHELL_COMMAND CMD=CAMERA_LIGHT_ON

[gcode_macro M8212]
gcode:
SET_LED LED=case WHITE=0.00 SYNC=0 TRANSMIT=1
SET_LED LED=hotend WHITE=1.00 SYNC=0 TRANSMIT=1
Copy link
Copy Markdown
Contributor

@suchmememanyskill suchmememanyskill Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the hotend command: RUN_SHELL_COMMAND CMD=CAMERA_LIGHT_OFF

@suchmememanyskill
Copy link
Copy Markdown
Contributor

suchmememanyskill commented Apr 11, 2026

One thing i'm unsure of, is it worth keeping the original gcode start/end script working?

Atom is working on a complete replacement for the start/end gcode, but this is not done get.

I guess it's not too much effort and works fine

@Atomique13
Copy link
Copy Markdown
Member

One thing i'm unsure of, is it worth keeping the original gcode start/end script working?

Atom is working on a complete replacement for the start/end gcode, but this is not done get.

I guess it's not too much effort and works fine

My opinion is that users should have to choose between 2 sets of macros, one for the old patched setup and one for the new Cosmos. Maintaining both would quickly become a headache. My two cents are that it is better to adapt to the new Cosmos, since it aligns more closely with Klipper.

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.

5 participants