jneilliii / OctoPrint-Tasmota

62 stars 16 forks source link

using GCODE for shutdown in .gcode files fails #198

Closed ruedli closed 1 year ago

ruedli commented 1 year ago

Very strange, must be something simple...

I configured a tasmota plug, the check shows it "works", se e my config and check:

image

When I use the icon (the bolt), it turns from green to red, shutsdown octoprint and the relay turns of the power after the configured delay.

When I enter the command in a gcode file -or- enter it as an ending gcode in otorpint, it is NOT executed.

My gcode: image

My end-script: image

This is shown in the command log: image

Now comes the strange thing: When I use the SEND command button (for sending gcode from the web interface)... it works! The log shows the same: image

So: bolt turns red, it does a shutsdown and the relay turns off. image

Is my gcode wrong? It is the same as what I pasted and sent.

ruedli commented 1 year ago

I have the impression, the command simply does not "reach" the plugin when played through the GCODE printing stream. Perhaps because it is distorted?

As you can see, what goes into the printer is slightly different according to the GCODE window (send GCODE vs. text in GCODE file), maybe it is not filtered out?

jneilliii commented 1 year ago

try increasing your gcode off delay. I think what you are running into is a race condition where the plugin is processing the off command but the printer is still in a printing state and not finished yet. set that value to like 15-30 seconds and see if that plays nicely.

ruedli commented 1 year ago

That did the trick. I also found that my raspberry Pi needed substantial more time to fully come to a stop. The octopi server looses the connection rapidly, but the shutdown takes longer. I found these delays working for my setup.

(Pi powered from the PSU of the printer with a 5V / 5A stepdown convertor, and Tasmota relay in the mains cable to the printer)

image

ruedli commented 1 year ago

Thanx for your help and your lovely plugin!