Pause/Resume service requests for Octoprint component

Currently, there is no way to send service requests to OctoPrint via Home Assistant? IMHO, the most significant such feature would the ability to Pause/Resume the prints.

I would use this together with APCUPSD statuses. When grid is off for 2 minutes, pause the print. Once the grid is stable for more than 15 minutes, resume the print.

I need such a feature in order to be confident to start longer prints (24 hours +). I live in a place where grid failures are common and a 1400VA UPS does not seem to solve my issue with prints being cancelled…

Any alternative way of doing this is welcomed!

This is a good idea, I have planned on adding this but was waiting on https://github.com/hroncok/octoclient to finish up his library so I wasn’t duplicating the work. I’ll look in to adding this and see how it goes.

1 Like

It looks like that project’s been pretty much abandoned. No movement on this depo for more than a year… Looks like “Job operations” have all been achieved though:
Job operations

  • Issue a job command
    • start
    • restart
    • pause
    • cancel
  • Retrieve information about the current job

Yeah I noticed when I posted that. I’ll take a look and see if it is in a working state and use it if it is. If not I may fork it and get it working.

1 Like

Let us know if we can help!

see if it will support multiple octoprint instances on different hosts please…

1 Like

Multiple hosts would be great, but if all else fails, we can add this via Custom Components!

I’ve had to do this with ModBus integration and it’s easy as pie… Search for modbus1 on here and you should find the code and changes needed for the .py file, if you want to do this now! Waiting for my second printer to get here before I can test a variation of this for the OctoPrint component.

@w1ll1am23: Did you get a chance to look into this? Do let us know if you need help testing this!

This is something I would be interested in as well. There is another thread that covers how to do it with shell commands but it is a bit clunky.

1 Like

Yes, here is the link: https://community.home-assistant.io/t/octoprint-restfull-switch/
Unfortunately, it does not cover pausing/resuming prints. Just connecting, preheating and switching off the Octoprint device…

Looking through that thread, it’s pretty much the same for sending a pause/resume command. There are more examples later in the thread too. I’ll give this a shot.

1 Like