This is how to configure the Pi IoT Gateway to run locally.
One must have internet access to download the files.
After that the Pi IoT Gateway can run locally with some limitations (no emails sent, etc...)
One will need to modify /home/pi/gateway/www/index.html
1. (Optional) As a backup, create two copies of this file as a backup and name them as: index_original.html and index_offline.html
2. Create a folder to hold the files for offline use: /home/pi/gateway/www/offlinefiles
3. Open the index.html with a text editor.
In head (beginning) of the file notice the lines that say either href="https://....." or src="https://......." .
These files will need to be stored locally.
Currently Nov. 2018 there are 10 files that need to be stored locally.
4. Download and store these files locally.
4.1 One way to do this is to use the curl command in the command line
Ex: curl
https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css -o /offlinefiles/jquery.mobile-1.4.5.min.css
This downloads jquery.mobile-1.4.5.min.css from the jquery website and saves it to the folder"/offlinefiles" with the file name "jquery.mobile-1.4.5.min.css"
4.2 Do this for all 10 remote (online) file links in the index.html file
5. Update index.html so all the "https://..." references are directed locally to the files in the offline files folder.
5.1 Ex: Before <link type="text/css" rel="stylesheet" href="
https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
After <link type="text/css" rel="stylesheet" href="/offlinefiles/jquery.mobile-1.4.5.min.css" />
5.2 Repeat for all the 10 remote (online) file links in the index.html file
6. Save this file as index.html.
7. Save this file as index_offline.html
8. Now the gateway is ready for use offline.
9. (Optional) To convert it back to "normal" mode, just copy the index_original.html file and rename it as index.html.
Troubleshooting Note:
1. First try with the original index.html file.
Access the IoT Gateway to verify it works.
Download one file to the /offlinefiles folder.
Change one of the filelinks in the index.html file.
Save the index.html file
Access the IoT Gateway to verify it still works.
If it doesn't check and make sure the file is indeed in the folder
Also check for typos.
Then repeat for each link till you are done.
Best Wishes!