Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] API should allow pause and unpause, not just pause-toggle #1393

Closed
MarcusWolschon opened this issue Jun 30, 2016 · 3 comments
Closed
Labels
request Feature request
Milestone

Comments

@MarcusWolschon
Copy link

MarcusWolschon commented Jun 30, 2016

Version 1.2.13 (master branch)

The API
http://docs.octoprint.org/en/master/api/job.html#issue-a-job-command
allows for a "command": "paus" described as:
"Pauses/unpauses the current print job."

Issue:
Issuing a pause command twice for any reason (timeout, response not parsed properly, script was restarted,..) resumes the print instead of keeping it paused.

In my case I'm using the pause command for a Filament monitor.
http://marcuswolschon.blogspot.de/2016/06/ultimaker-ii-filament-sensor-and-remote.html
Obviously having any chance of accidentally resuming a print instead of pausing it, is dangerous.

Proposal:
The current command is nice for user interfaces used exclusively by humans.
For automatic scripts it should offer 2 command to
pause and to resume a print regardless of state.

@GitIssueBot
Copy link

Hi @MarcusWolschon,

It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Please take a look at the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).

If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2016-07-14 05:10) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

@GitIssueBot GitIssueBot added the incomplete Issue template has not been fully filled out, no further processing until fixed label Jun 30, 2016
@MarcusWolschon MarcusWolschon changed the title API should allow pause and unpause, not just pause-toggle [Request] API should allow pause and unpause, not just pause-toggle Jun 30, 2016
@GitIssueBot GitIssueBot added request Feature request and removed incomplete Issue template has not been fully filled out, no further processing until fixed request Feature request labels Jun 30, 2016
foosel added a commit that referenced this issue Jun 30, 2016
@foosel
Copy link
Member

foosel commented Jun 30, 2016

Implemented in maintenance and devel branch, will be part of next release.

Simply changing the behaviour of the pause command and introducing a resume and toggle command was not possible due to reasons of backwards compatibility (there might be third party clients depending on the toggle behaviour). Instead a new optional action parameter was added to the existing pause command which can be either pause, resume or toggle. The latter will be assumed if the action parameter is not present. API docs are adjusted accordingly.

@foosel foosel closed this as completed Jun 30, 2016
@foosel foosel added this to the 1.2.14 milestone Jun 30, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
request Feature request
Projects
None yet
Development

No branches or pull requests

3 participants