- This topic is empty.
May 10, 2013 at 10:34 pm #22427
Here’s what I did to make my 1.42u running 1.8.3 firmware not require an internet connection while being programmed without recompiling the source…
1. I installed DD-WRT on my router. (I’m running an Asus RT-N16 router which has plenty of ram/flash etc…)
2. I enabled jffs mode : http://www.dd-wrt.com/wiki/index.php/JFFS#Directions_for_.28normal.29_users:_using_Web-GUI_Interface
3. I then installed optware : http://www.dd-wrt.com/wiki/index.php/Optware#Option_A:_Preparing_.2Fjffs_for_.2Fopt
Make sure you follow the step to enable it at startup: http://www.dd-wrt.com/wiki/index.php/Optware#Running_at_startup
4. While ssh’d in, I installed a new web server : ipkg-opt install lighttpd
5. I set the default port for the router interface to be something other than 80: “nvram set http_lanport=8080” “nvram commit && reboot”. Remember that port as that is the port you’ll need to access your router’s setting from now on.
6. I changed the accesslog.filename and server.errorlog to both be “/dev/null” inside of “/opt/etc/lighttpd/lighttpd.conf” to keep down wear and tear on the router flash. (I also set the default port to 80 in that same file).
7. I copied the images and scripts folders from the source page (https://github.com/rayshobby/opensprinkler) to “/opt/share/www”
8. Finally, I told DD-WRT to map all requests to the domain rayshobby.net to its local IP (192.168.1.1) by going to the router menu of Services->DNSMasq, enabling both “DNSMasq” and “Local DNS” and putting “address=/rayshobby.net/192.168.1.1” into the “Additional DNSMasque Options” field, saving and applying.
I tested this by disconnecting the router from the internet and I was able to still program and move about the interface of the sprinkler system just fine. The only drawback is I can’t go to rayshobby.net anymore unless I disable the DNSMasq which is pretty easy to do.May 11, 2013 at 1:26 pm #23649
Glad to hear that you solved the problem so quickly. Thanks for sharing.May 16, 2013 at 4:06 pm #23650
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.
- You must be logged in to reply to this topic.