Welcome! Log In Create A New Profile

Advanced

Ormerod Web Control v0.67

Posted by iamburny 
Ormerod Web Control v0.67
March 12, 2014 03:10PM
Hi All,

I've just released an update to my replacement Ormerod Web Control interface highlights are as follows.

-Clearer g file upload status now in a modal box which stops any button clicking while an upload is in progress ("cancel upload" soon to be added)
-You can now upload Config.g, homeall.g, homex.g, homey.g, homez.g and reprap.htm via the web interface setting tab.
-Basic details are now read from Slic3r G files dropped on the print button, e.g. object height, layer height, etc (only works for Slic3r files at the moment)
-Bug found that caused some prints to hang
-A couple of other minor bugs fixed

Its pretty important to run the latest version of reprap.htm so your not out of sync with reprap.js

Simply rename reprap.remote.htm to reprap.htm and copy it to you Duets SD card in the www directory. (requires an internet connection)

reprap.remote.htm





If you don't want to be internet connected all the time the instructions for hosting the javascript files on your own webserver are on my github (see signature)


Matt (iamburny)


Limited Edition Red RS Ormerod 1 #144 of 200 - RRP 1.09fw
iamburnys Ormerod Upgrades Github
Follow me on ThingiVerse My Designs
Re: Ormerod Web Control v0.67
March 12, 2014 03:47PM
Great stuff. Thanks for the new functions. Refreshing config and reprap was the only reason I ever connected the USB.

I did have one funny whilst putting this on. I tried doing it via Pronterface as I have done before and it would claim to start writing the reprap.htm but not finish. Duet was hung at that point and needed a reboot. Was repeatable. Maybe a line is exceeding Pronterface upload limits? Edit: Checked the file and it doesn't seem to have any long lines.

So I took the SD card out and file was 0 bytes. Copied it manually and all was fine.

Running via local server.

Edit2: Previous versions had a <!-- **EoF** --> comment at the end. Is Pronterface expecting that?

Edited 2 time(s). Last edit at 03/12/2014 03:54PM by bobtidey.
Re: Ormerod Web Control v0.67
March 12, 2014 04:04PM
Nice work. I've not used anything other than your web interface for my prints.
Much appreciated.
Jon
Re: Ormerod Web Control v0.67
March 12, 2014 04:22PM
Quote
bobtidey
Great stuff. Thanks for the new functions. Refreshing config and reprap was the only reason I ever connected the USB.

I did have one funny whilst putting this on. I tried doing it via Pronterface as I have done before and it would claim to start writing the reprap.htm but not finish. Duet was hung at that point and needed a reboot. Was repeatable. Maybe a line is exceeding Pronterface upload limits? Edit: Checked the file and it doesn't seem to have any long lines.

So I took the SD card out and file was 0 bytes. Copied it manually and all was fine.

Running via local server.

Edit2: Previous versions had a <!-- **EoF** --> comment at the end. Is Pronterface expecting that?

Yes its probably the <!-- **EoF** --> Bob, i took it out specifically as when it is upload via my web interface the <!-- **EoF** --> caused an odd character at the end of the file, which was visible when running the web page. i'm assumign it was caused by a difference somewhere in the firmware, as the Ethernet and Serial/USB (that pronterface uses) communications are handled differently. I expect dc42 can shed further light on this odd occurance.

Matt


Limited Edition Red RS Ormerod 1 #144 of 200 - RRP 1.09fw
iamburnys Ormerod Upgrades Github
Follow me on ThingiVerse My Designs
Re: Ormerod Web Control v0.67
March 12, 2014 04:30PM
Slic3r generates at the end one line, that says how long is approximately it uses of filament. That can be used for estimation of time very easily.
Even better, you can use WebWorker to pass .g file to, that will go and calculate based on all G codes movements actual time. So it can be very precise. And if Ormerod does somehow gives information which G code it does right now, or line in gfile, then even Very precise estimation can be made.
Re: Ormerod Web Control v0.67
March 12, 2014 05:25PM
Hi moka,

I've looked at implementing the gcode parser from [gcode.ws] into the interface, but it is a lot of work for only slight gain, so not high proirity, sadly the Ormerod firmware does not provide any status of its current position in a print so that cannot be reported. I may well capture the ~filament usage at some point but it probably won't aid the printing end time calculation at all.

Matt


Limited Edition Red RS Ormerod 1 #144 of 200 - RRP 1.09fw
iamburnys Ormerod Upgrades Github
Follow me on ThingiVerse My Designs
Re: Ormerod Web Control v0.67
March 12, 2014 07:27PM
Quote
iamburny
Yes its probably the <!-- **EoF** --> Bob, i took it out specifically as when it is upload via my web interface the <!-- **EoF** --> caused an odd character at the end of the file, which was visible when running the web page. i'm assumign it was caused by a difference somewhere in the firmware, as the Ethernet and Serial/USB (that pronterface uses) communications are handled differently. I expect dc42 can shed further light on this odd occurance.

Matt, are you URLencoding the data properly when you send it? The string:

<!-- **EoF** -->

should be sent as:

%3C!--%20**EoF**%20--%3E

according to [meyerweb.com]. Last time I looked, the URL encoding in reprap.js was incomplete.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ormerod Web Control v0.67
March 14, 2014 04:53PM
Using Chrome, when tab is navigated away, upload is not going on. I've tested few times, and it stays on % as I navigate away, and continues if navigate back to printer tab.
Is it a bug or a feature? smiling smiley
Re: Ormerod Web Control v0.67
April 02, 2014 04:14PM
This is a great interface. Great work.

Is it just me, or is the g-code upload feature buggy? It always hang at 99%, no matter what.
Re: Ormerod Web Control v0.67
April 03, 2014 05:24AM
when I had hangs a 99% they where caused by long lines at the end of the g-code.
specifically older cura plugins did not remove the "profile" cura likes to put at the end of the g-code.
Maybe you could check with a text editor if you have a long line a the end of your g-code. If it is the cura profile: simply remove it
the ormerod does not read it.
Re: Ormerod Web Control v0.67
April 03, 2014 05:43AM
Quote
auser
when I had hangs a 99% they where caused by long lines at the end of the g-code.
specifically older cura plugins did not remove the "profile" cura likes to put at the end of the g-code.
Maybe you could check with a text editor if you have a long line a the end of your g-code. If it is the cura profile: simply remove it
the ormerod does not read it.
Wow, that was a long line. Is that all settings in binary form in case the gcode is read into cura again?
Re: Ormerod Web Control v0.67
April 03, 2014 03:53PM
Hi Matt, I'd love to try your web interface now I'm a bit more confident with the workings of the Ormerod. Is there somewhere I can find instructions or such on how to install/configure it ?
Re: Ormerod Web Control v0.67
April 04, 2014 04:38AM
It is really simple. Especially if the PC running the web-interface has internet connectivity (as well as connectivity to the ormerod).
- Go to https://github.com/iamburny/OrmerodWebControl/tree/master
- click on reprap.remote.htm
- click on "Raw"
-> save somewhere
- rename to repra.htm
- copy to sdcar i belive in the "sys" folder
there is also info on the github page.
hth
Re: Ormerod Web Control v0.67
April 04, 2014 09:59AM
You also need to be running a late version of dc42 firmware (57y) is I believe the most recent.
Re: Ormerod Web Control v0.67
April 05, 2014 03:23AM
I would like to now try running this splendid interface for the first time on a locally hosted server (ongoing web access is a pain for me) but am daunted by the "just set up a local web server" bit - can someone please point me to a (preferably simple!) way to do this?
Re: Ormerod Web Control v0.67
April 05, 2014 03:53AM
I don't understand why the Duet itself can cater these files? It does have a primitive web server in it anyway, does it not?
Re: Ormerod Web Control v0.67
April 05, 2014 04:05AM
MrCrispi, I installed Apache 2.2 under Windows 7 x64, downloaded via [apache.mirror.anlx.net]. Then I created directory reprap within C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs and I put the css, js, img and fonts directories inside that.

Michael, the web server on the Duet cannot yet handle the multiple concurrent connections required to serve all the files, and I haven't had time to fix that yet.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ormerod Web Control v0.67
April 05, 2014 05:09AM
Perfect - many thanks (as ever) @DC42 - I'll give it a go...
Re: Ormerod Web Control v0.67
April 05, 2014 11:27AM
Hi Guys,

My apologies for not being more attentive to this thread over the last month or so, my person circumstances have changed somewhat and my all my free time is now consumed, rest assured I have not abandoned this project and do intend to continue its development, it is however going to have to wait until my life has settled down a bit.

Many thanks to those users who have answered question and assisted others in this thread, it is much appreciated.


Matt


Limited Edition Red RS Ormerod 1 #144 of 200 - RRP 1.09fw
iamburnys Ormerod Upgrades Github
Follow me on ThingiVerse My Designs
Re: Ormerod Web Control v0.67
April 05, 2014 12:06PM
Matt,
Sorry to hear that your circumstances have change
I would just like to thank you for your hard work, please hurry back, we will miss you.
kind regards
Paul


appjaws - Ormerod 1, core XYUV Duet wifi, duex5
firmware 1.21 Web Server 1.21 Web Interface 1.21
OpenSCAD version 2016.02.09 (git 9950e6a)
slic3r-1.38.5-prusa3d and/or Simplify3D 4.0.0
Re: Ormerod Web Control v0.67
April 05, 2014 03:20PM
Quote
dc42
MrCrispi, I installed Apache 2.2 under Windows 7 x64, downloaded via [apache.mirror.anlx.net]. Then I created directory reprap within C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs and I put the css, js, img and fonts directories inside that.

OK - Apache (2.25) installed and all appears to be working OK (according to Apache monitor), reprap directory created, files moved into that directory and reprap.htm file in www folder of SD card modified to refer to this directory. Now what? Not sure what I am actually supposed to be opening/sticking in as a URL on my laptop in order to access my (hopefully now locally hosted) files confused smiley - any pointers appreciated
Re: Ormerod Web Control v0.67
April 05, 2014 04:26PM
You use exactly the same URL as before, that is, the IP address of the Duet. But from your description, I'm not sure that you have made the correct changes to reprap.htm. What you need to do is:

1. Establish the IP address of your laptop, e.g. by running ipconfig from a command prompt;

2. Take reprap.htm from Matt's repository (not reprap.remote.htm), change 10 lines (3 at the top, 7 at the bottom) to refer to that IP address. For example, if your computer has IP address 192.168.1.2 then the lines near the end should read:

<script src="//192.168.1.2/reprap/js/jquery-2.1.0.min.js"></script>
<script src="//192.168.1.2/reprap/js/bootstrap.min.js"></script>
<script src="//192.168.1.2/reprap/js/jquery.storageapi.min.js"></script>
<script src="//192.168.1.2/reprap/js/jquery.flot.min.js"></script>
<script src="//192.168.1.2/reprap/js/jquery.flot.navigate.js"></script>
<script src="//192.168.1.2/reprap/js/jquery.filedrop.min.js"></script>  
<script src="//192.168.1.2/reprap/js/reprap.js"></script>>

This causes it to ask your local web server for those files, and Apache treats its htdocs directory as the file system root for web requests.

Edited 4 time(s). Last edit at 04/05/2014 06:32PM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ormerod Web Control v0.67
April 05, 2014 05:33PM
Very clearly & fully explained...exactly what I needed - thank you; I had indeed not modified the reprap.htm file in the right way.

It, at first sight, all now looks good because I can see now that the reprap.htm file is calling on the apache server on the laptop, (if I turn off the server the page stops working and starts working again when I turn it back on and it also loses formatting if I change the name of the htdocs file, so pretty confident all is good there) BUT the page only loads IF I still have my ethernet lead connected to the duet and to my router (which rather makes the whole local hosting thing pointless!)

To be specific, the set up I have working is laptop (with apache on it) connected to home wi-fi network and printer connected to laptop via duet USB cable and via Ethernet lead to router - all good. If however I unplug the Ethernet lead from the printer, laptop can't find the page on the duet - same result if I connect the printer directly to the laptop via an Ethernet lead...

..I'm obviously still missing something here and out of my depth! confused smiley

Edited 2 time(s). Last edit at 04/06/2014 06:07AM by MrCrispi.
Re: Ormerod Web Control v0.67
April 06, 2014 07:35AM
Hi MrCrispi,

Glad to see your making progress with a "local" install of my Ormerod interface.

Its very likely that the Wired Ethernet Connection will have a different IP address to a Wireless Wifi connection.

Try running "ipconfig" again when it is connected via wireless, if it is different and this is going to be the interface you use most, i'd suggest changing the reprap.htm to use this IP address instead.

Matt

Edited 1 time(s). Last edit at 04/06/2014 07:36AM by iamburny.


Limited Edition Red RS Ormerod 1 #144 of 200 - RRP 1.09fw
iamburnys Ormerod Upgrades Github
Follow me on ThingiVerse My Designs
Re: Ormerod Web Control v0.67
April 06, 2014 08:40AM
I've cracked it hot smiley

You set me off on the right track Matt - many thanks. Turned out it was not the IP address, but the default gateway...I had the original default gateway on the duet, and needed to change it to be the same as the laptop

Many thanks for all your patient help Matt & @DC42...as ever, you always help me to get there spinning smiley sticking its tongue out
Re: Ormerod Web Control v0.67
April 06, 2014 05:23PM
Having spent most of today working on it, I've managed to create a version of the firmware that can serve all the files from the SD card. It meant major changes to allow the firmware to return several files over multiple concurrent connections.

Page load time is just over one second. There are some potential speed improvements to be had, e.g. data is still being read one byte at a time from the file system.

Chrome sometimes opens as many as 6 connections at once, and handling this number has meant that there is now only 2K of RAM left. So I want to reduce the memory usage before I release this. I also want to tidy up some rather messy internal interfaces between the web server and the TCP/IP stack. But I may not have time to work on this again for a week or two.

Edited 1 time(s). Last edit at 04/07/2014 08:35AM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ormerod Web Control v0.67
April 07, 2014 08:16AM
That is very good news dc42. We thank you for your efforts! Looking forward trying it.
Re: Ormerod Web Control v0.67
April 08, 2014 05:19AM
Hi Matt,

I hope you are getting on okay.
Just a FYI for when you get back into things.

Last night I tried to upload a gcode (crow.g) onto the printer through the web interface but halfway through I got bored of waiting and changed my mind to what I wanted to print. So I clicked outside of the progress box to cancel the upload.
I went into Cura and sliced another object (skull.g) then dragged it into the upload on the web interface. it seemed to upload normally but when it finished i looked into the files and couldn't see the skull.g filename in there, all i could see was the crow.g (which I had stopped halfway through)

I'm not sure if this file was a mixture of both the files, or if it was the Skull file but named as Crow. So I just deleted it and re-uploaded and it worked okay

Kind Regards
Paul
Re: Ormerod Web Control v0.67
May 09, 2014 06:25AM
I had the the same and similar issues to Paul.

What I've had is that I started to upload the file. It got to 28% or so, then just stopped (for a couple of minutes until I gave up). I wondered if it was possibly an 8.3 filename issue, so I renamed the file, then selected the (renamed) file to upload again and this time it breezed it's way through the upload.
When I refreshed the files list, the previous incomplete file was there with the shortened ~1 filename, but the new file that seemed to have completed fine wasn't there.

It occurs to me that it's possible that the firmware is sitting waiting for the rest of the 1st file (no 'end upload' command), and ignores the 'start new file' command and instead continues the previous upload, saving the changes at the end of the successful upload to the old file.
That would mean that both files are jammed into one g code file.. not so great.

I'll try reproduce the problem and if it fails the upload I'll send it a M29 command to end the upload to see if that completes the previous upload.

Not sure why it's failing the upload, but I do see that the the 'Online' button sometimes goes red and becomes 'Connect' (disconnection), so it's probably related to that?

Edited 2 time(s). Last edit at 05/09/2014 06:48AM by VortyZA.
Re: Ormerod Web Control v0.67
May 09, 2014 06:35AM
Quote
VortyZA
It occurs to me that it's possible that the firmware is sitting waiting for the rest of the 1st file (no 'end upload' command), and ignores the 'start new file' command and instead continues the previous upload, saving the changes at the end of the successful upload to the old file.
That would mean that both files are jammed into one g code file.. not so great.

I'll take a look at exactly what the Cancel button does when I get time.

Quote
VortyZA
I'll try reproduce the problem and if it fails the upload I'll send it a M29 command to end the upload to see if that completes the previous upload.

That would be helpful. Are you using version 0.74?

Quote
VortyZA
Not sure why it's failing the upload, but I do the the 'Online' button sometimes goes red and becomes 'Connect' (disconnection), so it's probably related to that?
[/quote]

The only time I see the Online button go to Connect is if I refresh the page, effectively restarting the web interface from scratch, or if I explicitly disconnect. I don't know what could make it go from connected to not connected. I haven't touched the connect/disconnect code since Matt wrote it.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login