My script is below. It works the first time. HOWEVER, if i do not run @gpio Kobra off (This turns printer off) after the job it will not try to run @gpio Kobra on again for the next job. I have added @gpio kobra off to the end gcode but the problem is that if a job does not finish properly, is cancelled, power outage to printer, etc. this gcode does not run so I think repetier server things the gpio pin is still powering the printer (I think sending pin high) and it's on. is there a way to ensure that the command is run w/o doing an logic test to see if the gpio pin is already sent high/low?
@func startFirstInQueue
@startNextPrintInQueue
@endfunc
@func enableAndStart
@gpio Kobra on
@echo "Powering on Kobra Max"
@timedCall startQueue 10000 startFirstInQueue
@echo "10 second delay to start print"
@endfunc
@callOnEvent "printJobAdded" enableAndStart
Thanks
Dave