A snipet that sets the fan back to the same level it was before the pause would be cool.
So you could put the printer completely on standby during the pause if you paused the print and you are not at home.
I think someone just submitted a PR to support that.
OctoPrint:maintenance
β FedericoNembrini:record-last-fan-speed
opened 03:33PM - 28 May 22 UTC
#### What does this PR do and why is it necessary?
Implementation of #4040
Th⦠is PR adds last_fanspeed, pause_fanspeed and cancel_fanspeed, so we can pause and resume the fan directly from GCode scripts.
#### Task
* [x] Add self.last_fanspeed, self.pause_fanspeed, self.cancel_fanspeed to MachineCom object
* [x] Inject into
https://github.com/OctoPrint/OctoPrint/blob/5f7679b11baafc0bb58861c462b9e4568041080b/src/octoprint/util/comm.py#L1268-L1361
* [x] Record on pause/cancel in
https://github.com/OctoPrint/OctoPrint/blob/5f7679b11baafc0bb58861c462b9e4568041080b/src/octoprint/util/comm.py#L2516-L2528
* [x] Add _gcode_M106_sent to parse and set fan speed when sent to printer
* [x] Update docs
#### How was it tested? How can it be tested by the reviewer?
Tested with virtual printer, adding in pause and cancel GCode scripts:
`Fan speed when paused: {{ pause_fanspeed.fanspeed }}`
`Fan speed when canceled: {{ cancel_fanspeed.fanspeed }}`
#### What are the relevant tickets if any?
#4040
#### Further notes
In the settings, within Behaviour, there are the settings 'Log potision on pouse' and 'Log position on cancel'. Would it be appropriate to indicate that these settings are the same as those for the fan speed?
Ok that's a funny coincidence