OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated)

  • This topic is empty.
Viewing 25 posts - 51 through 75 (of 559 total)
  • Author
    Posts
  • #23888

    djagerif
    Participant

    I installed your application and it (almost) worked first time. My settings didn’t save due to my hostname not resolving. Once I put in the correct hostname, with domain, it saved my settings.

    Just one request. I see that US/Central is the default Timezone. What is the significance of this as I left it at default and when I ran the application it picked up my local GMT+2 Timezone automatically. If it has significance, can we not have a dropdown list of all the available timezones?

    I also found my Location not being read correctly from OS. I have ‘Irene,South+Africa’ configured and it only displays ‘Irene’ in the MobileWeb app.

    Oops, one more ‘bug’. I set my ‘S32’ name to ‘Station32’. When I check the Settings page it displays ‘Station32’ but when I go to Manual Control it displays ‘Station31’

    Other than that, it works like a charm.

    Thanks,
    Ingo

    #23889

    anthonywebb
    Member

    Seemed to work pretty well in my chrome browser on the mac. In chrome on iOS 7, the back button doesnt work. Pretty slick project, thanks for sharing.

    #23890

    Samer
    Keymaster

    @djagerif The timezone selection in the installation screen is used by the program preview and the logger. Unfortunately, there is no easy way to translate the value from the OS to PHP and that is why it exists.

    As for the location information, my regex is cutting off the name because it doesn’t allow commas, but that will now be fixed in the next update, expect it soon.

    As for the station names: that’s very weird. My only guess is that the manual mode page doesn’t update between each page load (I assumed not much changes and one less Ajax call is better/faster). So my first recommendation is to refresh the entire site and see if the page updates. If it does, than I will simply Ajax call a new manual mode page, just in case, and will post this update soon.


    @anthonywebb
    I just tried it on Chrome in iOS 6 and experienced no problems. My best guess is this is an iOS 7 beta issue which I honestly do not have or know how to isolate. Best recommendation is wait until iOS 7 is final or use mobile safari.

    #23891

    djagerif
    Participant

    Yip, that seems to do the trick. In Manual Mode it doesn’t refresh properly. Just pressing the Browser Refresh loads the right name.

    Just a question for Updating. I use RPI as my web server. What is the easiest to get updates pulled down to my server without affecting my configuration settings?

    Ingo

    #23892

    Samer
    Keymaster

    @djagerif Great question! From my experience the best way would be to navigate to the directory where the files are stored and run the following command (if your using git):

    git pull

    If you are not simply re-download and extract/overwrite all the files. I do not provide a config.php in the repository nor do I provide the pass_file, log_file, or log_previous file so they will never be overwritten on an update/overwrite.

    #23893

    djagerif
    Participant

    Nice!!!

    How about a check on startup, if there is a new version on the net then popup a message informing the user a new version is available.

    Ingo

    #23894

    Samer
    Keymaster

    @djagerif That is something I am toying with and hopefully can even enable auto updates on supported platforms. That feature will be downstream of other bugfixes though.

    As for the manual mode and run-once pages they have been updated and are now AJAX loaded. Meaning renaming stations will reflect instantly on both those pages.

    Also, the location should now support commas like in your situation. Please update and let me know if the issues are resolved. The timezone fix will come soon, hopefully. In the meantime, please refer to this list for valid timezones: http://www.php.net/manual/en/timezones.php

    #23895

    djagerif
    Participant

    I am now officially impressed. All changes work perfectly. I also changed my Initial TZ to one of the supported PHP ones and it works great.

    Something for the “Wish List”

    1. Have an option to clear the configuration so the next restart will bring you back to the initial install screen if you really messed things up.
    2. Clear Log option.

    Great app but unfortunately doesn’t work with my old HTC Desire on Android 2.3. Could you perhaps publish a minimum spec to the community as well? I fear my old HTC has an older IE based browser which I noticed in an earlier post have similar issues. The top is cut off and in my case I can’t scroll up or down.

    Ingo

    #23896

    Samer
    Keymaster

    The officially published support list is available here: http://jquerymobile.com/gbs/

    Your scrolling is probably due to the lack of ‘-webkit-overflow-scrolling: touch;’ This is supported on Android (3.0+) and iOS (5+). A workaround for older devices is using two fingers to scroll (possibly an iOS only workaround) or for Android grabbing Chrome for Android from the Google Play store.

    I will consider adding a reset to the web app deleting all the accessory and config files but to be honest I do not expect users to keep their web directory writable/deletable from PHP so this might be a limited use scenario.

    Glad everything is working out now!

    #23897

    Vaughano
    Participant

    I have updated all code and am very happy to say I have this all working on my OSPi, with python interval app on port 8080 and this mobile PHP app in an apache server on port 80.

    I am still testing, but the only issue I have found is that my times appear to be out by an hour. My Pi has time correctly set and I have “Australia/Adelaide” in my config.php and +9:30 set in ‘settings’, which seems to have propagated through to the interval python app.

    Is there perhaps some daylight saving issue that shouldn’t be applying in my timezone? The hour discrepancy makes me suspect a daylight saving adjustment. I should also add that times in the logs are correct, it is just the display in both webapps that is wrong.

    Any ideas?

    #23898

    Samer
    Keymaster

    Good to hear your setup is working all from one Raspberry Pi!

    Unfortunately, I am not the best with timezones however I have pushed an update to help address the timezone issues. There is no longer a choice of timezone during the install and will now default to UTC. So long the server’s time is set correctly, I believe this will work just fine. I did some more testing and the program preview seems to be working well. The logging is now fixed by applying the timezone difference before displaying the time. This is done against the OS timezone setting.

    This change will mess up old log entries. The best thing to do if you update would be to empty the two log files defined by $log_file and $log_previous. Also, if you are updating please change your config.php timezone to UTC otherwise the calculations will be off as well. There was no good migration path hence the manual interventions needed. Just to be clear the manual changes are only needed if you are upgrading to the new files and does not affect new installs.


    @Vaughano
    and @djagerif please let me know if this helps address your issues. I am sure more work needs to be done for this issue but need to see where we stand before proceeding. Thanks!

    #23899

    Samer
    Keymaster

    @djagerif I tried to debug Android 2.3.3 but unfortunately the emulator provides no good way to interact with the javascript console. I suppose I could send out console.log’s and eventually figure out how to get it supported on Android 2.3.3 however I am not sure if there is much demand supporting such an old OS nor am I proficient enough to do so. However, just to note I am experiencing the same thing as you on Android 2.3.3. The header is on top of the page content on the home page and I am unable to scroll.

    If you don’t mind rooting your HTC Desire I believe you can update to ICS+ using a guide such as this: http://frenchtouch.pro/tutorial/android-ics-for-your-htc-desire/2

    If you or anyone else has any suggestions I would love to incorporate them into my web application.

    #23900

    djagerif
    Participant

    I already rooted my HTC to ICS but went back to stock OS. The issue with this old device is of storage, there was no real benefit having the capability to load new applications but no space to install them on.

    Don’t worry about my old 2.3 OS, my contract expires soon and then I can upgrade.

    One more for the Wish List: Could you please add a Program Export/Import or Backup/Restore function. If you have to restore OS then perhaps via your application you can dump all the settings on OS if possible. If it’s in XML format it would be easy to edit and modify the file if you choose.

    Ingo

    #23901

    Samer
    Keymaster

    That’s actually an awesome feature! Let me look into the best way to do it.

    The only problem is the iPhone does not allow any real file manipulation (export/import) but every other browser would. I could also backup to device using localStorage but not sure that is exactly what we are trying to do.

    I will do some more research because I do like this idea. I would try to export/backup all the settings not just the programs because that would make recovering from some situations a whole lot easier.

    Edit: I have a backup/import already working using localStorage now. The benefits from this are cross-browser compatibility especially on iOS 6 which saves localStorage in a sandbox like a native app. This information is saved to iCloud/iTunes backups and restored from backups. The down side is the data is not user editable/accessible and stuck on the specific device your using. I could send out a file for download but on an iPhone the best this would do is open Safari (would require re-login) and then a manually email file from there. Of course, a file would work perfectly in every other browser but my primary device for this operation is the iPhone. With all that said I will be playing with it a bit further and post my results.

    #23902

    slobrewer
    Member

    @salbahra,
    I just applied all your latest changes and everything works flawlessly. I’d love to throw some money your way. Do you have an email address I can PayPal you a few bucks for beer or whatever?

    #23903

    Samer
    Keymaster

    @slobrewer I appreciate that! My PayPal is [email protected]om

    I am glad everything is working for you now!

    #23904

    Oasiz37
    Participant

    Hello,

    I’m trying to install the app on a Synology server and I’m running into problems. I’m trying to run the install.php and when I click the “submit” button, I’m getting a pop-up saying “check folder permission and file path”. I understand my setup is a bit not standard, but not by much. Here’s what I have:

    1. The server is a really small one and I don’t want to install anything on it unless absolutely necessary. Hence, I’ve downloaded the zip file, instead of using git, and unpacked everything under the “sprinklers” directory.
    2. Unfortunately, the install instructions are very… sparse. I can only guess what to do next…
    3. I’ve changed every file permission recursively to 777.
    4. I’m using VPN to get to home network instead of configuring a redirect on router, this is more secure. Thus, I don’t have a password protection for Open Sprinkler, don’t need to. I wonder what “user” field is, the one I have to specify in install.php. I wonder if it’s not the files permission but the lack of the password for the controller that causes the issue.

    Thank you!

    #23905

    Samer
    Keymaster

    @Oasiz37 The instructions are sparse because this is a work in progress project that I am doing for fun. With that said you did the right thing so far in extracting the files to the web directory. The next thing you need to do is open your browser and navigate to said directory. All you do now is fill in the requested fields and off you go. Since you already changed the permissions for the directory you should have no problems letting PHP generate the config.php and other log files.

    The “user” field your referring to, I assume, is the username. The program has an authentication system in place to help prevent unwanted/unauthorized access to your sprinkler system. You can put whatever username / password you want as this is what will be used to log you in.

    Not having a password set or using ignore password is NOT a problem for my web app. The file permission error is a very generic “guess” at what could be wrong so don’t go crazy trying to figure that out but again, its the most likely issue (or for some reason PHP can’t write out).

    You can try to “install” the web app your self by renaming the provided config example to config.php and filling in the variables there. Then you will need to generate a .htpasswd file in the format described here: http://rayshobby.net/phpBB3/viewtopic.php?f=2&t=154&start=40#p775

    Please let me know if this helps.

    #23906

    Oasiz37
    Participant

    Thank you for a quick response.

    >The next thing you need to do is open your browser and navigate to said directory

    I think if I just navigate to the directory it’ll execute index.php, not install.php. I’m getting a blank page when just navigating to the directory or invoking index.php. I have to explicitly specify www/sprinklers/install.php to get to the install screen.

    >All you do now is fill in the requested fields and off you go

    This is what I tried and this is where I’m getting a pop-up saying I don’t have permissions or files in place.

    I’ll try to manually create all the files as the next step. Could you please let me know what files should NOT be reverted to 644 permission mode (I assume index.php as one of them, anything else)?

    Thank you!

    #23907

    Samer
    Keymaster

    The website should auto navigate you to the install.php if a config.php is not found in your directory. If it is not I would venture to guess something is going very wrong and unexpected. If you could please supply some PHP error logs I would love to further help. Not sure where on the Synology Apache setup however typically these errors are sent to /var/log/apache2/error.log

    The only files that need to be writable after install are the 2 log files defined by $log_file and $log_previous. During the install they are the bottom two file paths requested.

    Thanks

    #23908

    Samer
    Keymaster

    Just posted an update to my web app with options to export and import the configuration. The export and subsequent import occur in localStorage on the browser itself. At the very least this will let you muck around with settings and programs and allow a quick restore point. Later, I plan to add file export/import for non-iOS devices but for now I am satisfied.

    #23909

    Samer
    Keymaster

    Another update, for the Raspberry Pi users: The last run is now hidden as is the sequential option. As soon as they are working on the interval program they will reappear :D!

    At this point I think I will break on features and focus on specific bugs so @Oasiz37 let me know your progress so we can ensure the program works in most situations.

    So far, I have gotten reports of a successful install on a Debian Linux machine, Raspbian Raspberry Pi machine, a OpenSprinkler Raspberry Pi (running both the interval app and my web app off the same device), and a Tomato firmware based Belkin router. Would love to add Synology to that list.

    #23910

    Oasiz37
    Participant

    These are the errors I’m getting (please note that my Synology server runs some heavy PHP applications including image/galery host, PHPAdmin, tramsmission, etc – in other words, I have some PHP applications that work)

    Hope this helps:

    [Mon Jun 17 15:37:42 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 1 to 3 : URL /sprinklers/install.php, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:38:44 2013] [error] [client 10.8.0.6] PHP Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /volume1/web/sprinklers/install.php on line 80, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:38:44 2013] [error] [client 10.8.0.6] PHP Warning: exec(): PHP exec disable. in /volume1/web/sprinklers/install.php on line 82, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:38:44 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 1 to 3 : URL /sprinklers/install.php, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:38:46 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 6153 to 1719 : URL /sprinklers/install.php
    [Mon Jun 17 15:38:47 2013] [error] [client 10.8.0.6] PHP Parse error: syntax error, unexpected ‘[‘ in /volume1/web/sprinklers/main.php on line 419
    [Mon Jun 17 15:38:47 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 0 to 2 : URL /sprinklers/index.php

    #23911

    Samer
    Keymaster

    Okay, great news! The reason installer is failing is because it cannot add the watcher/logger to crontab. This is not a huge problem at all. You can manually add it. The reason it is failing is because you have PHP Safe mode on (again, this is not a problem).

    Even if you do not add the watcher to crontab, the web app will work.

    To add the watcher to the crontab do the following:

    crontab -e

    And add:

    * * * * *       cd /volume1/web/sprinklers; php /volume1/web/sprinklers/watcher.php >/dev/null 2>&1

    As for the final error: I cannot determine what line 419 in main.php is because I have pushed several updates to the code recently. If you could copy paste line 419 from main.php I could further debug the cause of that (or update to the latest version out now, 18 minutes old, and paste any new errors).

    As a final summary, based on your Safe Mode error I suspect everything up until then went fine which means your config.php, user files, and log files should be created and saved properly. From here, update to the latest, add your watcher to cron manually like instructed above and give me any new errors you may receive.

    Thanks.

    Edit: I updated the installer to catch crontab failure and show the proper error message. It will also take you to the login screen after this error since it is non-critical.

    #23912

    Oasiz37
    Participant

    I’ve got the most recent update and now the installer tells me that files have been saved ok. However, when redirected to index.php, I see a blank screen. Here’s the log file (I haven’t done the cron -e thing yet)
    [Mon Jun 17 15:58:55 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 6153 to 1719 : URL /sprinklers/install.php
    [Mon Jun 17 15:59:34 2013] [error] [client 10.8.0.6] PHP Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /volume1/web/sprinklers/install.php on line 80, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:59:35 2013] [error] [client 10.8.0.6] PHP Warning: exec(): PHP exec disable. in /volume1/web/sprinklers/install.php on line 82, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:59:35 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 1 to 3 : URL /sprinklers/install.php, referer: http://192.168.40.101/sprinklers/install.php
    [Mon Jun 17 15:59:37 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 6153 to 1719 : URL /sprinklers/install.php
    [Mon Jun 17 15:59:37 2013] [error] [client 10.8.0.6] PHP Parse error: syntax error, unexpected ‘[‘ in /volume1/web/sprinklers/main.php on line 466
    [Mon Jun 17 15:59:37 2013] [debug] mod_deflate.c(615): [client 10.8.0.6] Zlib: Compressed 0 to 2 : URL /sprinklers/index.php

Viewing 25 posts - 51 through 75 (of 559 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated)