Solution for stepper disabling on print pause

Hello,
I have found solution for disabling idle timeout on print pause, what leads to stepper and heater disable, lost kinematics position and potentially print from bed separation.
I wasn’t able to find good solution on any forum, so I have came with this:

[idle_timeout]
gcode: 
    HANDLE_TIMEOUT
timeout: 600

[gcode_macro HANDLE_TIMEOUT]
description: Called on idle timeout
gcode:
  {% if printer['print_stats'].state != "paused" %}
    TURN_OFF_HEATERS
    M84
  {% endif %}

I hope this would be helpful for semeone :slight_smile:

2 Likes

and where has to be placed? in printer.cfg?