Web UI Native Wrapper
-
It would be interesting to see however I do like the fact that the web interface works nicely on my tablet, phone and PC (all using Chrome).
Could you expand on the idea of a custom gcode in this sense?
-
I am interested in accessing the Duet from other programs than the Duet Web Control, but I'm not interested in an alternative UI - the web control is basically fine (though I encourage you to submit improvements - it is open source!). I'd like a library, preferably in python, that made it easy to control a Duet from a program running on a PC. This is in some ways a simpler task, since it basically just needs to make HTTP requests and then decode the JSON responses. But if such a library were available, it would then be easy to write a UI on top of it, for any platform that supports python.
My application for the library is to experiment with advanced or alternative probing strategies, or to otherwise use the Z probe to evaluate the mechanical repeatability of your printer. (This is particularly pressing because my printer is unhappy in some as-yet-unexplained way.) You could also do things like experiment with aggressive speed/acceleration/jerk settings and see at what point you begin losing steps or developing severe mechanical slop.
-
Could you expand on the idea of a custom gcode in this sense?
Nothing special really. The application would beable to read all the Json returned data and run custom gcode based on what's returned.
-
I am interested in accessing the Duet from other programs than the Duet Web Control, but I'm not interested in an alternative UI - the web control is basically fine.
The application is a wrapper for the web UI and nothing more. Basically a custom web browser.
-
I am interested in accessing the Duet from other programs than the Duet Web Control, but I'm not interested in an alternative UI - the web control is basically fine.
The application is a wrapper for the web UI and nothing more. Basically a custom web browser.
I think we're talking at cross purposes here - the Duet provides an interface layer that is HTTP requests and JSON responses (plus some static files). The Duet Web Control is a user interface that is downloaded in those static files and that runs in your browser. Are you proposing a special browser that somehow interacts with the existing Duet Web Control code in a way normal browsers can't? Are you talking about modifying the DWC code so that it can communicate with the browser it runs inside in some special way that only works with your custom browser? Or are you talking about an alternative UI that doesn't use a browser at all, just the HTTP/JSON interface?
-
I am interested in accessing the Duet from other programs than the Duet Web Control, but I'm not interested in an alternative UI - the web control is basically fine.
The application is a wrapper for the web UI and nothing more. Basically a custom web browser.
I think we're talking at cross purposes here - the Duet provides an interface layer that is HTTP requests and JSON responses (plus some static files). The Duet Web Control is a user interface that is downloaded in those static files and that runs in your browser. Are you proposing a special browser that somehow interacts with the existing Duet Web Control code in a way normal browsers can't? Are you talking about modifying the DWC code so that it can communicate with the browser it runs inside in some special way that only works with your custom browser? Or are you talking about an alternative UI that doesn't use a browser at all, just the HTTP/JSON interface?
In its simplist form think of the application as Chrome without all the buttons, navigation and address bar. It will load DWC inside the web view.
-
They have things similar to this for some mobile phones. You can make any website into a native app, because sometimes the way native apps behave is preferable to the compatible web browser available to you.
-
I am interested in accessing the Duet from other programs than the Duet Web Control, but I'm not interested in an alternative UI - the web control is basically fine (though I encourage you to submit improvements - it is open source!). I'd like a library, preferably in python, that made it easy to control a Duet from a program running on a PC. This is in some ways a simpler task, since it basically just needs to make HTTP requests and then decode the JSON responses. But if such a library were available, it would then be easy to write a UI on top of it, for any platform that supports python.
My application for the library is to experiment with advanced or alternative probing strategies, or to otherwise use the Z probe to evaluate the mechanical repeatability of your printer. (This is particularly pressing because my printer is unhappy in some as-yet-unexplained way.) You could also do things like experiment with aggressive speed/acceleration/jerk settings and see at what point you begin losing steps or developing severe mechanical slop.
This is a really good idea actually. Abstracted further it might allow for CAD/CAM programs to directly control a Duet controlled machine. So 1 click send to printer from with Autodesk 123D etc would be more realisable.
-
@bot:
They have things similar to this for some mobile phones. You can make any website into a native app, because sometimes the way native apps behave is preferable to the compatible web browser available to you.
Yeah I've built them before. Facebook app used to be one of them.
-
My application for the library is to experiment with advanced or alternative probing strategies, or to otherwise use the Z probe to evaluate the mechanical repeatability of your printer. (This is particularly pressing because my printer is unhappy in some as-yet-unexplained way.) You could also do things like experiment with aggressive speed/acceleration/jerk settings and see at what point you begin losing steps or developing severe mechanical slop.
This is a really good idea actually. Abstracted further it might allow for CAD/CAM programs to directly control a Duet controlled machine. So 1 click send to printer from with Autodesk 123D etc would be more realisable.
It should be possible for it to be a fairly self-contained python module/script, so it might make it easy to (say) make a "Send to Duet" button in Slic3r like the "Send to Octoprint" one. Integration with Cura might be a little easier since its UI is in Python anyway. A flexible binding, though, allows the possibility of two-way communication - the slicer could query the printer to find out what speeds it has been set to allow, for example. More generally I want to make it easy to move complicated tasks off the Duet and into a non-realtime environment with gigabytes instead of kilobytes of memory. Even tasks that should ultimately run on the Duet would be easier to debug on the PC.
I haven't looked too closely at what's involved, but I have written a similar hack to let me experiment with programmable calibration by sending G-code over USB to Marlin. So the HTTP/JSON interface really ought not be too bad.
-
I looked at making some of the Duet's data available in Rainmeter.
This way I could have a small customisable meter on my desktop telling the status of the printer.
But Rainmeter does not work with AJAX connections and I don't have enough programming experience to make it work. So I gave up, I simply didn't have the time to work on it.Would be fantastic though.
-
I'm using a native iOS app I wrote, running on an iPod touch mounted on my printer, as a sort of a replacement for a PanelDue. The advantage is that you get some things basically for free, like nice scrolling lists.
-
This is basically all it is.
Ive managed to get it to automatically scan the local IP range and connect.
Its just a clean way to use DWC as you don't need any of the bloat from a browser.
-
I can get a similar UI if I use the -app parameter (standalone web app mode) with Chrome
though there is not auto scanning -
I can get a similar UI if I use the -app parameter (standalone web app mode) with Chrome
though there is not auto scanningYeah and my app uses the same blink engine.
I've also got it to display the print status if you hover over the tray icon on windows so that's pretty neat.
Next up is to test sending an SMS message through clickatell when a print completes.
-
-
Would you care to share your Wrapper? (Will it work on both Mac and Windows?)
Doug
Yeah it will go on GitHub and yeah it will work on Windows/Linux/Mac
When I put the sources on GitHub I'll also add a folder with compiled versions for Windows & Mac but only rpms for RHEL 6/7 (CentOS, Redhat) for Linux.
-
Good Man?
-
Very nice work.
-
Great!