In the Process configuration window's scripts tab, there already exists a post-processing feature to execute a terminal/command after g-code generation has completed. Can this functionality be replicated for two more states?
I would like to invoke a command/terminal executable just prior to starting the print. For example, I wish to call cURL.exe or similar with arguments that tells a home automation device to turn on the mains power to my printer PSU, and perhaps also to turn on an exhaust fan.
I would also like to invoke a command/terminal executable immediately after the print has terminated. If S3D is aware of the termination mode, it would be awesome if that could be passed in via environmental variable (for example, it would be useful to know if the print has successfully completed, versus an abnormal termination due to filament depletion, thermistor problem, printer unresponsiveness, etc.). For example, I wish to call cURL.exe or similar with arguments that tells a home automation device to evaluate some other factors and possibly turn off the mains power to my printer PSU after the print terminates, depending on the termination mode.
EDIT: For those not using home automation, this sort of script could also be used with your favorite command utilities to start a camera stream at the beginning of a print, and play a sound or send an email/text message when your print has finished.
Last edited by neveroddoreven
on Sat Jun 06, 2015 7:14 pm, edited 1 time in total.