-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
execute G-Code after render finish #6
base: main
Are you sure you want to change the base?
Conversation
@@ -342,3 +346,21 @@ gcode: | |||
RESUME_BASE | |||
{% endif %} | |||
|
|||
[gcode_macro _done_shutdown] | |||
gcode: | |||
UPDATE_DELAYED_GCODE ID=_done_shutdown_timer DURATION=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE_DELAYED_GCODE ID=_done_shutdown_timer DURATION=0
my own code to delete delayed gcode on printeing finish on printer.cfg
{% else %} | ||
m117 spengo..... | ||
m118 spengo..... | ||
spegni_tutto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spegni_tutto
my own gcode to power off a tasmota switch to shutdown printer and raspberry
@pappicio Thanks for your suggestion but i don't think it's a good idea to have a "shutdown command" built in to the render method. We already have a working solution for all that like to shutdown there printers after a finished render. I still need to properly test and document it but that's what the render macro is for: Disable Autorender and add following to you print end gcode after heater are off etc.
|
Ok. Thanks a lot for that. I'll try to use your solution, I'll be able to shutdown all, also Raspberry, only when render Is finish3d and MP4 created. |
yes that what was the idea behind the render macro. Please give feedback when it works for you. |
it doesn't works like expected: 08:24:32 it starts countdown while render video, it could appen that the timer to shutdown is shorter to render all works, and printer could be turned off before I have the timelapse ready, |
and.... is it possible to add a variable: pause_while_render, cos pause_base gcode on rendering enable my alexa to advice that printer is in pause, maybe for filament change (I use also change filament color during print!), and false advices appens in this way, while if I can choice to pause or not, all could be works well, |
Sorry the Pause is needed to block further execution of the gcode. There is no other way i can achieve a "render and wait" in gcode other than the pause. We introduced the pause because before people would have to a very long G4 Dwell after starting the render to make sure the render is finished. I may consider to add a user configurable gcode execution after render is finished in future but i got other priorities at the moment.
edit
but be warned this will not block further gcode exectution and you will need to dwell enough time before shutting down your raspberry |
maybe some code is better than 1000 words: [gcode_macro END_PRINT] [delayed_gcode _done_shutdown_timer] #macro to shutdown tasmota switch on printer
{% endif %} [gcode_macro spegni_tutto] when print finish, I wait for extruder cools down at < 50 degree, then shutdown printer... and it take a while... maybe some minutes that are sufficient to save timelapse. |
in order to the pause command, it dowsn't block gcode execution, In my end_print gcode, stop all, shutdown termistor, and execute: while render is executed, also starts my colddown timer, not after, so, start render, execute other parts of my gcode, includinf printer shutdown and after stop timelapse_render, as you can see in belowe console output... [gcode_macro START_PRINT] [gcode_macro check_temp] [gcode_macro templedcolor_timer] only in this case, with a for cycle, I can wait looping into a gcode block and execute other macro to change led strip color according extruder temp, but main gmacro (STERT_PRINT), wait.... and continue only after for loop ends |
@pappicio sorry but i don't see to add a non pause variable to the macro to master. What i understand you need a timelapse render which is not blocking further gcode execution and like to make your own wait loop. If so, just overwrite the predefined macro with your own either make a copy of timelapse.cfg with a different name and include this instead ot just add your custom macro after [include timelapse.cfg] which will overwrite the existing one, but also doesn't change the macro file in the repo. So you still can update via updatemanager but can use your custom macro. But adding a "nopause" variable to master will confuse most people don't understand the concept around it, so i don't think it's smart to do so. Also from your PR i understand you need to run a custom gcode macro after the render is finished. As said that is something i can see as a feature in the master without adding confusion to most people. So when my other priorities are done i will add the possibility to run a gcode macro after render is finished. Would that satisfy your needs? |
yes, shurely, and thanks for your great work about, I'll use my shutdown timer joined |
@pappicio i will close it when i added gcode execution after finished render ;) |
moonraker How to post gcode wait to finish blocking call? |
that's the problem, klipper doesn't allow blocking gcode calls. That's the reason we use the pause macro to hold back further gcode execution. On the other hand if you use the upstream version of the code Are you using pappicio's fork or the upstream code? If the first please try changing to upstream it should be fixed there. If later please make a new issue with the title "render doesn't block further gcode execution" and add attach a moonraker.log with a failed print/timelapse in it, so i can investigate further |
add some python code and timelapse.cfg gmacro to time shutdown printer after collected mp4 from jpgs