Open techninja opened 10 years ago
Excellent, excellent idea. Love to see this implemented.
As discussed in 179, this is mostly beyond the proof of concept phase and working in the branch, it just needs some follow-through. Note, the local CNCserver is STILL RUNNING to enable hosting the RoboPaint API, and it's likely it can be used as a relay for some complex modes of operation. Also, yes, this does work over the internet. If we get this working I'd be willing to poke a hole in my firewall and allow remote testing over webcam as I did with @RobotGrrl :)
The following specific requirements are likely:
localStorage
, maybe as localStorage['cncserver_external'] = {domain: '192.168.0.42', port:'80'}
The best part about the API and the wrapper is that RoboPaint should care very little about the server if it's running on the same process, or if it's on a RaspberryPi/Gallileo in another country. Also because of the buffer system overhaul, as long as your data gets to the device eventually, you can print smoothly. Though if it prints faster than its buffer fills, it's best to pause and wait. We all know how that goes on YouTube!
Some more detail on possible RELAY: Currently the Scratch offline v2 interface will ONLY look on localhost
, meaning that external server + scratch = :cry:. Unless... we relay the local CNCserver commands to our target!
How would this work? well.. basically when a request comes in on one of the scratch endpoints, and if CNCServer somehow knew that it was only to be used for relaying to a known server/port, it could just mirror the commands sent to it, ignoring any actual execution... Actually this could be done with every request, less the fact that you'd have to rebuild the requests by hand, and that's MUCH easier with scratch because they're all GET
requests that don't care what gets returned. The 30hz poll page requests might be a problem though... :P
Could CNCServer act as a proxy and relay all of the requests it receives to the remote instance? How hard would it be to make CNCServer reload the bot configuration when the bot type is changed?
Moving this to 1.0, pending more conversation on what kind of plan we have for documenting/(supporting?) use cases. Also this is going to have to fit into the Introductory walkthrough in some form or fashion, likely hidden behind an advanced expander(?).
Is this implemented enough to close?
@docprofsky It's in the beta/master. Feel free to test.
This has been merged and can be tested as part of 2.0.0 Beta 2. It's not ALL there, but it is in UI.
This would allow for RoboPaint to connect to a headless CNC Server (as the early HTML only versions of the program used to allow). Should have support for all most options that RoboPaint currently uses (except bot type modification and other CNC Server options).