Basic logic based on printer output?

Is there any current way (short of writing a new plugin) to have a routine take different actions based on printer responses?

E.g.

  • Probe this point, if it's not within certain bounds then run gcode to level bed.
  • While all endstops (M119) are off, lower 0.1mm (e.g. if your printer is set to home from a probe but you still have a z-stop connected, you can use this to auto-calibrate the probe)

There must be loads of other examples where you want to run a bit of GCODE and then react to the printer's response.

I've been through scripts, snippets and action commands. The closest I can find is the terminal response plugin but that doesn't have any provision for sequencing.

I appreciate that GCODE doesn't natively support this so it would be Octoprint that's looking at the responses from the printer.

Yeah that's definitely possible with a plugin.

But I'm not aware of any plugin that would do what you want.

If you want to write your own plugin you could peek into the source of this one - it might help you getting started

Thanks for your reply. This is what I suspected, I'm a bit surprised really that no-one has built a plugin to do this as it seems to me that it would be pretty useful.

Thanks for the link, unfortunately it's beyond my skills to even understand it. I am currently experimenting with the API and node-red - it's possible to see everything in the terminal through the websocket so it might be possible that way.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.