@timedCall paused when connection to printer is lost
I'm currently trying to implement a reset Button for my printer. It is supposed to shutdown the printer and restart it after x seconds.
When the printer gets shut down and looses connection, the timed call to restart my printer is halted until the connection is reestablished.
The restart sequence is working but the timed call is not calling the restart function.
Are timed and monitored calls automatically stopped and is there a way to change this behaviour?
When the printer gets shut down and looses connection, the timed call to restart my printer is halted until the connection is reestablished.
The restart sequence is working but the timed call is not calling the restart function.
Are timed and monitored calls automatically stopped and is there a way to change this behaviour?
Comments
M80 and M81 are being replaced by a custom power on and off sequence, so the server is able to turn on power.
The regex is matching M80\b so i tried replacing the M80 command with @echo "M80" but the command still won't be send after the printer is powerd off.
Before Power off:
After manually restarting the printer via M80:
Note the time difference.
When I decrease the delay it works as expected, but the printer wont reset because the BTT relay I'm using comes with it's own 10s delay to turn off:
Quickcommand Reset:
@set global.reset_delay_ms 5000
@func turnOn
@echo "M80"
@echo "Restarting printer"
@endfunc
@func reset
M81 ; Turn off printer
@echo "Turning off printer, restart after {{global.reset_delay_ms/1000}}s"
@timedCall resetCall {{global.reset_delay_ms}} turnOn
@endfunc
@dialogStart "Power off printer and restart after {{global.reset_delay_ms/1000}}s" "Reset Printer?"
@dialogButton "OK" "@call reset"
@dialogButton "Cancel"
@dialogShow
Formatting was weird.
When I start the script while the printer is turned off, M80 will never be printed.
Until then you can use sleep and a normal call to get the same result.
Is there an integrated sleep function for the server commands?
I could use a lua script but I wanted to stick to g-code for printer specific tasks.
So if you want to wait 3 seconds, this is what you want:
@setTimer 3000