<p>I'd like to force Klipper to perform power on (using <code>M80</code>) before homing. For this purpose I'm trying to override <code>G28</code>:</p>
<pre><code>[gcode_macro G28]
rename_existing: G28_BASE
gcode:
  M80
  G28_BASE { rawparams }
</code></pre>
<p>But for some reason this does not work, I'm getting the following error:</p>
<pre><code>G-Code macro rename of different types ('G28' vs 'G28_BASE')
</code></pre>
<p>Isn't <code>G28</code> overridable? Is there any other way to achieve the desired behavior?</p>

[{'answer_id': 19026, 'author': 'R.. GitHub STOP HELPING ICE', 'author_id': 11157, 'author_profile': 'https://3dprinting.stackexchange.com/users/11157', 'pm_score': 3, 'selected': True, 'text': '<p>Because of the way parameters work differently (<code>Sx</code> vs <code>NAME=x</code>) for gcode style commands vs Klipper extended ones, the rename has to be to the &quot;same type&quot; of command. <code>G28_BASE</code> does not fit the pattern to be considered a &quot;gcode style&quot; one. Use <code>G9028</code> or <code>G28.1</code> or something instead and it should work.</p>\n'}, {'answer_id': 19097, 'author': 'FarO', 'author_id': 2338, 'author_profile': 'https://3dprinting.stackexchange.com/users/2338', 'pm_score': 1, 'selected': False, 'text': '<p>Besides using a different macro, it is also possible to use <a href="https://www.klipper3d.org/Config_Reference.html#homing_override" rel="nofollow noreferrer">[homing_override]</a> which allows you to redefine the homing sequence.</p>\n<p>You can write a simple homing_override like (untested!)</p>\n<pre><code>[homing_override]\naxes: xyz\ngcode:\n  M80\n  G28\n</code></pre>\n<p>and you are done.</p>\n<p>Be aware that this very simple override will home all axes every time homing is called: &quot;G28 X0&quot; will home also Y and Z. You can put checks to home only what is requested, see <a href="https://github.com/zellneralex/klipper_config/blob/master/homing.cfg" rel="nofollow noreferrer">here</a> but it become more involved.</p>\n'}]
['https://3dprinting.stackexchange.com/questions/19025', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/5033/']