Background


By default, the OpenSprinkler grabs Javascript files from a cloud server to render the UI on your device. Prior to firmware 2.1.0, the default path is on rayshobby.net; from firmware 2.1.0, the default path is on ui.opensprinkler.com. To change the Javascript path to a different server (whether remote or local), please follow the instructions below. 


NOTE: the password field for the /su page listed below will have to be MD5 hashed for firmware 2.1.3 or newer in order to be accepted otherwise the device will return "result:2". Starting with firmware 2.1.4, this is automatically hashed.


NOTE: you MUST have OpenSprinkler firmware 2.0.4 or above to be able to use the feature below. If your firmware version is below 2.0.4, please follow the How to Upgrade OpenSprinkler Firmware guide to update your firmware first.


Option 1: Use a Different Remote Server for UI Assets:

  1. Open a browser and navigate to the following URL, replacing os_addr with the OpenSprinkler IP address: http://os_addr/su 
  2. Change the Javascript URL: we recommend https://ui.opensprinkler.com/js
  3. Enter your device password and push Submit. Then you are all set.


Option 2: Use a Local Server for UI Assets


With this option, you can set up a local web server to host the files (UI.zip) on your local network.


Step 1. Setting up the web server


  1. The first step is installing a web server. This will be outside the scope of this guide however you may use any web server such as Apache, nginx, lighthttpd, etc.
  2. Download the following zip and extract to the root directory of your web server: UI.zip
  3. Modify your web server configuration for the path hosting the UI files and add the following configuration (example in Apache):
    1. Header set Access-Control-Allow-Origin "*"
    2. AddEncoding x-gzip .cgz .jgz
    3. AddType text/css cgz
    4. AddType text/javascript jgz
  4. Save changes and move on to configuring OpenSprinkler.


Step 2. Making OpenSprinkler use the web server


  1. Navigate to the following URL, replacing os_addr with the OpenSprinkler IP address: http://os_addr/su 
  2. Change the Javascript URL, replacing server_addr with the server IP, to read: http://server_addr/js
  3. Enter your device password and push Submit.
  4. You should now be using the locally hosted files.