OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Changing the user interface
- This topic has 17 replies, 5 voices, and was last updated 8 years, 2 months ago by 951calguy.
-
AuthorPosts
-
July 29, 2016 at 12:44 am #43583
951calguyParticipantI tried hosting the UI files on a remote server and also on a local server, I changed the target by going to ospi_ip/su and all I get is a dark background. Please help.
This is the address I input on the remote server http://pileofmaps.com/js
on my local server is this http://192.168.1.7/web/js/Attachments:
July 31, 2016 at 5:35 pm #43597
951calguyParticipantPlease let me know if anyone can help.
August 3, 2016 at 11:58 pm #43646
RayKeymasterIn Chrome, you can open ‘Developer Tools’ and refresh the page, then you can see error messages.
Another thing you can try is to directly log on to:
http://pileofmaps.com/
click on ‘Manually Add Device’ and type in the IP address.August 4, 2016 at 8:53 pm #43663
951calguyParticipantThanks Ray but I am not trying to access the OpenSprinkler Im trying to host and modify the UI and according to your turorials I should be able to do that either on a local or remote web server but it doesnt seem to work for me even without modifying the UI all I get is a black page with a loding icon as on the attached picture. Is the feature to save the UI to the sd card gone? Any thoughts?
August 4, 2016 at 8:57 pm #43664
SamerKeymasterIf you open the developer tools in the browser you are using, as suggested by Ray, do you see any errors in the console? Try opening the tools and doing a page refresh and feel free to attach a screenshot. That should help us track down the issue.
Thank you!
August 4, 2016 at 11:05 pm #43665
951calguyParticipantThanks guys, this is what I get on chrome.
Attachments:
August 5, 2016 at 2:51 am #43668
SamerKeymasterDid you modify the code? Sounds like you are missing quotes around a variable name.
August 5, 2016 at 5:21 am #43670
SamerKeymasterAlso please note the web assets are pre-gzipped to allow smaller file size when being hosted on the Arduino device. This isn’t as common anymore but still exists to ensure the UI loads when served off the microcontroller (smaller file size to transfer).
Because of this, you need to add the correct headers to the HTTP server for file types “cgz” and “jgz” which are just the CSS and JS files gzipped, respectively. Alternatively, you may decompress these files and it should work fine.
This is described here: https://opensprinkler.freshdesk.com/support/solutions/articles/5000164006-using-a-different-server-for-ui-assets
August 5, 2016 at 8:49 am #43673
ShawnHarteParticipantSamer I have the same issue. I hosted them on my server online for the ET version. I can go to ui.veuphoria.com and it works, but visiting the IP address of the OS, or using the app just returns, the black page. I was certain I had caused the issue so I didn’t mention it, but I don’t get errors at all. Just a blank black page.
The same result can be achieved on your version by opening the ui using the IP address, and then pressing the back button after logging in. It will go to the blank black page without going to whatever was in the browser history, and then no navigation buttons will work in the browser. I’m not a web developer so I was not able to fix the problem, and no errors are thrown so I don’t even know where to start.August 5, 2016 at 2:03 pm #43676
SamerKeymasterI think they are likely different issues. In jquery mobile I have disabled the hash change so the browser is not able to keep track of the page changes correctly. The OP’s problem I believe is either due to a home.js modification or likely mis configuration of the web server by not adding support for the CGZ/JGZ files (pre-gzipped files).
Can you confirm you are correctly adding support for the above mentioned files?
August 6, 2016 at 3:02 am #43681
951calguyParticipantI have no idea on how to add support for those files, also I have not modified any files.
After getting a black web page I extracted the cgz and jgz files but I don’t know what to name them, when I extracted them it showed just a bigger file with no extension, I tried renaming changing only the extension but there is already a file with that name app and jqm, I am really lost with this new way of changing the ui it used to be way easier when loading from sd card.August 6, 2016 at 3:18 am #43682
SamerKeymasterThe support link above documents how to add support for Apache. Which HTTP server are you using?
If you unzip the files, just keep them with the same name and they will also work.
August 6, 2016 at 3:23 am #43685
951calguyParticipantApache
HTTP/1.1 200 OK
Date: Sat, 06 Aug 2016 07:44:36 GMT
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Last-Modified: Sat, 06 Aug 2016 07:32:45 GMT
ETag: “16070a-1225-5396230654a00”
Accept-Ranges: bytes
Content-Length: 4645
Connection: close
Content-Type: text/htmlAugust 6, 2016 at 3:25 am #43686
951calguyParticipantI unzipped them by right clicking and choosing “extract here” with 7zip which created just a file with a name but no extension, I then uploaded all the files including the compressed files but it didn’t help.
August 6, 2016 at 4:24 am #43688
951calguyParticipantSamer if you can help me I can give you all my credentials for my server and ftp, I was trying to get this going this weekend. Allow me to buy you a beer or a coffee, you guys need to add a donation button for all your help.
August 6, 2016 at 10:38 am #43690
SamerKeymasterSince you are using Apache you should be able to copy and paste the config from the support document to add support for the files. Please read the entire document.
If you continue having issues I don’t mind continuing to assist in the forums as this will help other users. I appreciate the donation offer however it’s in my best interest to publicly assist you so I don’t have to repeat this for each user trying to do this.
I understand this is a bit non-standard but I think with some patience it’s a relatively easy procedure and if the documentation is not clear maybe we can clarify it once you identity how to fix your issue. I can tell you we are using Apache to host the same files for everyone without issues so this will work once configured correctly.
Another way I can help is for you to attach your Apache config and I can show you where to add the appropriate lines of code.
To address the unzipping process again, please note as I said earlier after unzip you can give the files the same extension as before you unzipped and they will work fine. Again, this is only performed if you do not want to modify your Apache configuration.
Please remember what you are performing is considered an advanced technique and some patience and trial and error will be required.
August 7, 2016 at 3:22 am #43708
PeterParticipantadrian78666,
I have attached the instructions that I used with a friend to set-up Apache for local web hosting on his OSPi. The steps are quite detailed and assume a clean install from a new SD card. As Samer said above this requires a bit of knowledge of Debian and Apache so not for the faint hearted!
Note that hosting the web site “only” gets you a system that is less dependent on the OpenSprinkler cloud services which may be your preference. If you are looking to customise the web app then that is a whole other order of magnitude when it comes to configuring the system for web development. Curious what you are looking to achieve ?
Let me know if the attached helps. Pete
Attachments:
August 7, 2016 at 3:37 am #43710
951calguyParticipantThank you so much Peter I actually got it working but your instructions seem way simpler and I think I will do a clean install following them.
I installed the apache server and placed the UI in the root folder so I can just point to myip/js and it works wonderfully. The reason I wanted to host them on my site not knowing that I could just do it on the same raspberry pi is because I am planning to use the OSPi over a cellular connection and I don’t want to use up all my data just pulling the UI, I do have some other questions about the raspberry pi and it’s behavior, I don’t know if it can handle running the OSPi and the apache server, I am using the pi3 btw but I would like to use the zero also, the other question I have is about how well does the pi3 or zero handle the heat, because I will have them running inside an enclosure outside where temperatures inside the enclosure could be >120 degree f. here in Southern California.I appreciate all your help.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Changing the user interface