How to run ChiliPepr w/o internet (was Re: Software)

Discussion of tinyG control platform
sdumond
Posts: 58
Joined: Sun Feb 01, 2015 1:12 am

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by sdumond » Fri Mar 20, 2015 6:58 pm

Here is what the wiki says :Offline Chilipeppr

For those of you who want to run ChiliPeppr offline, here are some strategy ideas to achieve this. ChiliPeppr is dynamically pulling all of the widgets/elements from JSFiddle's or other code sources across the Internet. For instance, the 3D Viewer pulls roughly 10 different Javascript files from different CDN networks. To create an offline version you would have to pull down locally each Javascript file and each JSFiddle and perhaps host your own web server. You would have to scan through all of the code and repoint the Javascript files to your local server. This can be achieved, but would just require somebody to write a script that did all of the redirecting.

You could visit ChiliPeppr.com and load the workspace and then disconnect from the Internet. As long as you never reload you should be ok. It is likely you will need to reload at some point, so this is a short-lived solution.
You could setup a local proxy on your computer using Charles. http://www.charlesproxy.com/. You could then load the workspace from ChiliPeppr.com, open the developer console, and copy the HTML content of the DOM. You would have to setup a web server on your localhost and serve up that page from http://localhost. Then you'd have to watch your the Charles Proxy UI to see what URL's are being requested by your browser and where they fail. Then go retrieve that file manually and make a local copy. Then create a mapping for that file in Charles Proxy. After working through all dependencies you should be good to go.
ChiliPeppr uses Require.js to load all Javascript files so you could create a remapping inside the app.js or require.js file that is used as part of ChiliPeppr. You would overload the chilipeppr.load command as well as the require.js require() method.


I do not understand it at all. When they start talking about java script, I don't understand. If anybody understands this, please help me in layman's terms how to do this.

Thank you.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by cvoinescu » Fri Mar 20, 2015 9:27 pm

I'm afraid those are the layman's terms, or as close as you get.

The way I understand it, he suggests three solutions.

First is to edit the JavaScript (okay, we're leaving layman territory now) and change the references to external scripts to a local web server. There are many.

The second is to install a proxy server (Charles) and make sure everything needed by ChiliPeppr exists as a local copy. In layman's terms, a proxy does what its name says: when your browser wants to get something from the Internet, for example one of the dozens of bits that ChiliPeppr needs, instead of asking the remote web server directly, it asks the proxy server. Normally, the proxy then asks for that on behalf of your browser, receives it, and hands it over. But you can configure Charles to give your browser its own copy instead, rather than get it from the Internet. You have to do this for each file used by ChiliPeppr, and manually tell Charles to serve the local copy. This sounds tricky, but it's the most promising solution for a non-programmer. The proxy even gives you a blow-by-blow list of everything the web browser is asking it to get.

The third approach is to edit the JavaScript (aaand we're not in Kansas anymore, again) to remap all references to external scripts to local copies, and change the way ChiliPeppr loads those scripts.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

sdumond
Posts: 58
Joined: Sun Feb 01, 2015 1:12 am

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by sdumond » Sat Mar 21, 2015 12:52 am

We are not even close to Kansas!! It would take the wizard to figure this out. Where do the files for chili peppr load at when it installs off the web? It is important to me to get this to work offline, so I will struggle and see what I can do.

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by WillAdams » Sat Mar 21, 2015 1:15 am

Okay. As I understand it:

- Chilipepper is cloud software which is typically loaded from a web server as needed.
- in theory one could connect, load everything, and all associated files would be stored in one's web browser's Cache, but this is potentially problematic.
- there is a class of utility programs which will allow the storing locally of files from a web site and serving them up to other programs running on the same machine
- one such commercial program is suggested.

Go to the site: http://www.charlesproxy.com/

Install this program and run it in trial mode presumably when you run it, it will afford the chance to designate which site you want to proxy. Indicate the chilli pepper site. It should also indicate how to connect a web browser to the program. Do so.

Then, connect to the site and exercise all of its functionality. As you do so, the proxy program will download and store locally the files which makeup the web site. Once everything is downloaded, disconnect from the internet. The locally stored copies will be used until such time as you re connect the machine.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

sdumond
Posts: 58
Joined: Sun Feb 01, 2015 1:12 am

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by sdumond » Wed Mar 25, 2015 12:23 am

the tinyg works perfect, but I have no internet service where the machine is. I loaded it up where I have internet and went to the shop where the shop is. That doesn't work. I have now got my exercise and haven't accomplished anything. It is ridiculous trying to make this work this way. I tried Charles and I can't get it to work. I then tried TGFX. About half way through it runs out of memory and might just as well quit. I got Chili peppr to run twice doing it the load up and take over to the shop way. It didn't quit. The only thing left is Cool Therm. My suspicions are that it will run out of memory to. I guess if I can't get it offline, I will have to get some other controller. It is a real shame. I wasn't informed of this arrangement when I bought the tinyg, but I was even greener then I was now and never would have thought the program to run the dang controller was on the internet! I am getting very frustrated.

Thank you for all your guys help. I appreciate it very much!

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by WillAdams » Wed Mar 25, 2015 12:58 am

Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

lordmundi
Posts: 207
Joined: Wed Jan 01, 2014 4:02 am
Location: Friendswood, TX
Contact:

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by lordmundi » Wed Mar 25, 2015 2:01 am

sorry to hear about your frustration... I too have been working on methods to be able to run CP offline, but for different reasons from you.

I tried two different methods, and after spending about two days on it, neither worked. I used a different proxy server, but I've seen enough that the Charles method isn't going to work.

What we would have to do is write our own caching proxy server that we can detect certain requests and rewrite the response on the fly, unless I can get John to make some minor mods to CP.

Even in that case, John has made it pretty clear that he prefers CP to be online only, and he is adding features that will require users to be online to use. So, even if we get it running, there's no guarantee it would stay that way.

Anyhow, I think CP is awesome, and I'd love to have some way to run it offline for small periods of time, or at the least, have the ability to say when I want to update versions to the latest.

I had to put aside my offline CP work for a bit. If I"m able to get it working later, I'll let you know.

FG

khauser24
Posts: 30
Joined: Mon Dec 01, 2014 12:41 am

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by khauser24 » Thu Mar 26, 2015 1:31 am

Before I get to the main part of my reply, let me state that I fully sympathize with your desire and requirement for an offline gcode sender. It's a clear necessity ... but (main part begins), that really isn't what ChiliPeppr is for. Lots and lots of work could go in to making a version of ChiliPeppr that ran offline, but that work would take the place of some really cool stuff that is happening in the cloud environment that is ChiliPeppr's true home. Just a couple RECENT additions to the ChiliPeppr lineup:
- Eagle PCB support
- Z-axis autozeroing
I totally understand that these and other features could be added to a downloadable package, but it wouldn't just magically appear. As a software engineer I have another view of the cloud ... the ability to get fixes out instantly is really compelling.

So I think the vast majority of things is going to go in this direction, especially as the world starts to appreciate what is called "the internet of things". Right now its a conscious choice, but give it a year or two and you won't even realize when you are electing to run software from the cloud. It'll all just work.

For those with CNCs in a place where there is no Internet, ChiliPeppr is the wrong answer. Trying to mold it to work in that environment is, in my opinion, the wrong direction. ultimately, those locations will become less and less but while you have to work in that area you'll need to find a different gcode sender. Or you could use a mobile hotspot (it's not data intensive at all).

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by WillAdams » Thu Mar 26, 2015 1:56 am

khauser24 wrote: So I think the vast majority of things is going to go in this direction, especially as the world starts to appreciate what is called "the internet of things". Right now its a conscious choice, but give it a year or two and you won't even realize when you are electing to run software from the cloud. It'll all just work.
Except when it doesn't.

I really don't understand this rush to return to the bad old days of the centrally-controlled mainframe. Personal computers are supposed to be about freedom.

If need be, we'll create yet another section of software on the wiki --- "free" software which doesn't give one the freedom to run it w/o a 'net connection.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Woodworker
Posts: 639
Joined: Tue Mar 11, 2014 1:37 am
Location: 5 miles north of Benson, NC

Re: How to run ChiliPepr w/o internet (was Re: Software)

Post by Woodworker » Thu Mar 26, 2015 2:39 am

I need a solution that is stable and repeatable. I shut down everything in the shop every night. The following day I evpect my software to be the same as the day before. There are enought variables without worrying about the software "in the cloud" changing between uses. I agree there are many people that prefer that option but many of us don't. I think that the CP author is missing a large segment of users by it being cloud only. It's not to hard to raise a flag when there is a new module and download that module and run some tests when it is convenient for you.

I don't really have a dog in this fight, I just don't use CP and won't until there is some option to run it locally. Also since 60% of the worlds population doesn't have internet access, not everything belongs in the cloud.
BRuce - SO2 #4798 - IC's Z axis upgrade, customized Z rail and Z motor mount, spindle Dewalt 611

Post Reply