OpenSprinkler Forums OpenSprinkler Unified Firmware No more internet needed… Re: Re: No more internet needed…

#23650

Ray
Keymaster

As I am preparing for Maker Faire demos, I came up with a potentially simpler way to do in-house hosting of the Javascripts. The way I did was to use a Raspberry Pi, and put the relevant files (Javascripts as well as icon images) to a local holder on RPi, say ~/osfiles. Then in that folder, run ‘sudo python -m SimpleHTTPServer 80’. This will start an HTTP server so that you can access the files through the following (assuming the RPi’s ip address is 192.168.1.50):
http://192.168.1.50
This can be set as a startup script so that it will automatically start when the RPi restarts.

Then in OpenSprinkler source code, modify the JAVA_SCRIPT_PATH to from ‘http://rayshobby.net/scripts/java/…..’ to ‘http://192.168.1.50/scripts/java…’. That’s it. Basically it’s using the python’s SimpleHTTPServer module as a simple way to serve the files.

The downside of this is that it involves an RPi (or some other server that should be on at all times), and modifying the OpenSprinkler source code.