Macro that reacts to a thermistor temperature?

Basic Information:

Printer Model: RatRig Vcore 3.2h
MCU / Printerboard: Octopus max ez
Host / SBC: rpi4
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

hi,

not an issue…

It’s summer where I live, and the overtemperature problems have returned…

I finally installed thermistors on the drivers, which give me real-time temperature information. I know the temperature the sensors read is NOT the driver’s temperature, but it’s valuable information nonetheless.

and I can see it in real time in FluidD.

I was wondering if it would be possible to add a macro, or something similar, so that when the sensor temperature reaches a certain value, either the motor current decreases, or the speed factor changes, for example, to 40%. Even if the temperature drops, it could at least increase again, but at least bring it down.

Could this be done with Klipper? A macro that runs if a temperature sensor reaches a certain value?

It’s almost certainly possible. But I don’t believe that that is the correct approach.

This is from a thread when I was trying to understand overtemp warnings when I first encountered them, and if you look at his final point, the current will remain the same even if speed factor is reduced, so that’s out as a solution.

As far as adjusting current midprint, maybe that could work, but because using hold current ‘might’( TMC drivers - Klipper documentation ) introduce motor movement, I would expect that approach ‘might’ as well and you may lose accuracy in your prints.

I would think the best approach to solving this issue would be to add additional cooling for the drivers, or simply find a lower run current you can be satisfied with.