-
Notifications
You must be signed in to change notification settings - Fork 4
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
Printing progress #6
Comments
Maybe, does OctoPrint provide this information via the API? |
Yes, it should be possible !http://docs.octoprint.org/en/master/api/datamodel.html#progress-information I would do it myself but I am new at python and I still don't understand how you use the rest API to communicate with octoprint |
Sounds to me like a perfect project for you to get to know python! Good luck, and I look forward to your pull request. |
@vishnubob I'm slowly understanding your code and I successfully done some Can you give me some hint about what I'm doing wrong? |
ok, i've updated the code a bunch. the problem is octocmd and octoprint have drifted somewhat. there are still some problems, but check out the new code and see if you have you still get a 400. |
When trying to run a
When I debugged the code
There seems to be a problem with the new |
I'm not sure why you got these errors, but I pushed some changes that might address them. Please try it again, and let me know if it works. |
def pause_job(self):
res = self.post("control/job", data={'command': 'pause'})
return self.check_response(res, 204) I'm getting this error:
I'm running this with Python 2.7.10 on OS X Yosemite. The errors with the init command are fixed however. |
What is the command line you are executing? |
I added a pause command. I'm just running this: op = OctoPrint_API(**args.__dict__)
res = op.pause_job() Here is the complete code if you want to see: http://pastebin.com/LXYRhGHk. |
Thanks for the code, but I was asking how you were executing the command from the shell. |
Hooo, I'm running it inside PyCharm! |
I've never used PyCharm, and since this is written as a command line tool, I can't really help you without an analogous command line example that replicates your results. |
Reading your code further, it doesn't seem like you execute |
octoprint-cli does this, so it shouldn't be too hard to achieve. progress %age, current layer number, Z height would also be useful additions to the output |
Would it be possible to get the printing progress (0.0% to 100.0%) using
octocmd status
?The text was updated successfully, but these errors were encountered: