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

Be able to send to OctoPrint via HTTP from Onshape #40

Closed
probonopd opened this issue Jul 29, 2018 · 8 comments
Closed

Be able to send to OctoPrint via HTTP from Onshape #40

probonopd opened this issue Jul 29, 2018 · 8 comments

Comments

@probonopd
Copy link
Contributor

My OctoPrint-compatible host software currently runs only HTTP and I seem to be unable to send GCODE there:

printdirect

Please allow sending to HTTP hosts from within Onshape.

@stewartoallen
Copy link
Contributor

Sorry about that. In order to run inside Onshape, grid.space must be entirely https. And https sites can't access non-secure content. You can run Kiri:moto locally on the same host that runs your octo-print server.

@probonopd
Copy link
Contributor Author

Is there some other way to send a HTTP request from JavaScript? I mean, it's just a simple POST request...

@stewartoallen
Copy link
Contributor

The integration does use a simple http post using javascript. It's a standard browser security restriction to disallow https -> http.

@probonopd
Copy link
Contributor Author

I see. Thanks for your explanation.

@probonopd
Copy link
Contributor Author

probonopd commented Jul 30, 2018

Do you think it could be made work with something like Chrome's --allow-running-insecure-content command line option? I am asking in part since a dedicated, pre-configured Electron application for Onshape like https://github.com/develar/onshape-desktop-shell/ might be able to relax some security settings if this helps.

@probonopd probonopd reopened this Jul 30, 2018
@probonopd
Copy link
Contributor Author

Another option might be to open a HTTP popup window, and send the CGODE from there.

https://stackoverflow.com/a/44943661

@stewartoallen
Copy link
Contributor

That won't work without sending the entire gcode server-side then bouncing it back to the new window. Doable, but not elegant, easy, or contained. Kiri does not send any data to the server at present, so that would be a huge departure.

@stewartoallen
Copy link
Contributor

closing as not feasible unless octoprint implements https with real certs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants