SM2.0 no filament-runout with Octoprint

I think octoprint explicitly does not support power recovery since there is no obvious way to implement it and it might require some form of hardware support.

I actually made a piece of software that helps you resume prints, and I might make it into an octoprint plugin. It should work for power outage type failures.

4 Likes

Thats a great idea, thanks for sharing. You have my vote for an OctoPrint plugin. :grinning:

sigh - Just had a filament runout on an Octoprint job. Didn’t occur to me that they’d implement this in the touchscreen (if that’s how they did it).

Reading this thread and the github comment, which led to PR#91:

I’m not actually clear on the status of this.

Does SM2 support runout detection when printing with OctoPrint yet, or no?

No, but not sure.

The topic above:
The M600 means that you could break your gcode with a manually inserted (maybe in cura) M600 command at a position of your choie, which means it works like a filament runout so the machine goes to parking position and let you (re)-fill material.

1 Like

So it sounds like the trick is:

  • from OctoPrint, send the next line of gcode
  • After some amount of moves (maybe every move?) check the filament status (M412?)
  • If empty, send M600, otherwise go to top of loop

?

Will that introduce a significant slowdown (waiting for each 412 to come back) to the print? I could see this really messing with print speed/times, with frustrating results for people who already have cooling / temps dialed in.

fancy trying it for us :smiley: not quite sure how you’d do the checking automatically in octoprint

Don’t have an octoprint, but this seems doable:

Send M412 every 10 seconds using repeating command: OctoPrint_RepeatingCommand
Regex parse the response and if it matches the out of filament response (filament\: open or filament\: TRIGGERED, can’t remember what’s normal) send M600 to pause for filament change: Terminal Response

2 Likes

this is what i plan to try first when my senor arrives on tuesday… Filament Sensor Simplified (octoprint.org) i couldn’t find a plugin designed to issue a time based gcode command… one could use this to process the response once you figure out how to issue M412 every 10 seconds… Terminal Response (octoprint.org)

I think this is a system command not an octoprint command…

i guess one could use it to call curl and poke this
Printer operations — OctoPrint master documentation

i am not good at curl

–update3-- quoting fixed so it runs on pi console, still cant get the plugin to execute it

this seems to be the curl
curl -s http://octopi.local/api/printer/command -d "{\"command\":\"M412\"}" -H "Content-Type: application/json" -H "X-Api-Key: <yourkeyhere>"

it works fine remotely from my windows machine and locally on the octopi, i can find no evidence the repeating command plugin actually works or does anything…

I wonder how it works. I know that all my new commands are ignored until the current batch has finished, could that be an issue? Maybe try another command that just returns something simple like current position or a settings current value, any simple gcode command, and then watch the terminal tab in octoprint like a hawk for the expected response (you may not see it send the command)…

When I’m not printing, this works and outputs my config on the terminal tab and shows the command being sent (add space separated API key and closing speech marks)
curl -s http://octopi.local/api/printer/command -d "{\"command\":\"M503\"}" -H "Content-Type: application/json" -H "X-Api-Key:

There is another thread where I commented about this, but Octoprint now has this ability built-in, as long as the printer firmware also supports it. However, the functionality in Octoprint is disabled by default. I think it was released in October 2021. Check out the documentation for more information.

1 Like

Struggling to find it on octoprint and your activity is huge :grin:
The firmware config Configuration.h Line1111 suggests it calls m600 itself if nothing else configured, but if the host sends M412 H it overrides that and passes control over to the host on runout.

Host Action Commands is the feature that must be enabled in both the printer firmware (Marlin), and in Octoprint. Here are some related links and videos:

1 Like

Are there any news? I’m very interested in this feature. :slight_smile:

3 Likes

I would also like to see this working.

Support Ticket Form - more tickets more attention. I put one in. The runout sensor is a culprit of many things…