External commands question. Run a gpio command after print job finished/idle for x amount of mins?
I've already created an extcommands.xml file and use it to power on/off my printer but I'd love to automate it to shut down after idle a certain amount of time. In the extcommands.xml file i created a line <execute name="idleoff" allowParams="false">/var/lib/Repetier-Server/idleoff.sh</execute>
the idleoff.sh file runs the gpio write to send the pin low and it works as designed. DO I just add and end script of @execute idleoff
??
Thanks
Dave
the idleoff.sh file runs the gpio write to send the pin low and it works as designed. DO I just add and end script of @execute idleoff
??
Thanks
Dave
Comments
You need your own control logic that queries if printer is idle and after some time shuts down printer. You can do this as external software that uses server web api to query printer state or as a lua module inside, also that might get hard. You could attach it to a timer call and store state in a global state variable you define. For most option 1 will be easiest solution.
Dave
G4 P1
and then your shutdown script. YOu might want to wait maybe a bit longer if fans need to cool down extruders first. In that case add one more G4 at the beginning
G4 Sseconds
Dave
Dave
I personally would add it to the scripts end code so you can change it later without needing to upload new sliced gcodes.
From what I see adding to scripts is a global script for that printer vs. a slicer by slicer gcode addtion right?
Dave
Difference is in deed is that that script is printer related and will run after EVERY print (except you abort it).
Dave
Dave
G4 S300
before the fast G4 commands. Remember the last one do not get executed because you disable the printer.
The copy server configs copies the printer dimension and shape to host.
So end code looks like this
G4 P1 (x30)
G4 S300
@execute printeroff
Should it dwell 300 seconds after the 30 1ms dwells?
Also that copy server config does not copy the scripts tab from server does it? Or is that scripts tab in host different than printer settings | G codes | Event Dependent on Server?
Dave
Firmware buffers commands and therefor server does not know what is already executed. So we fill it with commands we do not care about to be sure the wanted commands were executed.
Dave