OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)
- This topic is empty.
-
AuthorPosts
-
August 5, 2013 at 11:01 pm #24264
SamerKeymasterI just removed a fix for the old interval program. This fix allowed the program preview to work even though sequential / concurrent modes weren’t changeable. Now that this has been added in the August 1 build of the interval program this fix is no longer needed! If you run into issues please make sure you are using the latest builds of everything and please reference your build dates and versions when asking for help, thanks!
August 7, 2013 at 8:07 pm #24265
kenbobMemberThanks Samer’s for all the great updates. I have been using the logging and it is a nice addition. However I did notice that if it goes over the minute by one second it will log it as another minute, so essentially it will show two minutes. Can you give it a grace period of a second or two, because I notice my 12 minutes cycles will also show 13 on some stations?
August 7, 2013 at 8:17 pm #24266
SamerKeymasterNo problem! Been a wonderful learning experience and very happy to see widespread use!
As for the logging, I decided to take a very haphazard method of calculating the minutes and I am also experiencing the same issue (30 vs 31 minutes). I wasn’t sure anyone cared but sure, I will get a fix issued for this.
Update: I changed the rounding method from ceil() to round(). Ceil always rounded up however round applies the 0.5 cut off for rounding up. 0.4 mins or lower are rounded down. This should provide the buffer you are looking forever however I am still seeing some 31 minutes in my logs and also some 29 minutes. Let me know how this works for you.
August 8, 2013 at 3:59 am #24267
kenbobMemberWorks great for me. Sorry if it seems like I am being critical. It must have been the years of hardware/software compatibility testing that I use to do, so I tend to be a little anal. So hopefully it has helped a bit. But I feel at this point you have a rock solid app that really surpassed my expectations. Thank you for all of your hard work. Please donate to Samer’s if you find this app useful.
August 11, 2013 at 11:49 pm #24268
AveryParticipantI just received my opensprinkler, and am looking forward to getting it setup with this great looking web app!
The standard web interface is up and running, accessible from the public internet via port 80.
I have a hosting provider where I’ve uploaded latest available release of the web app, and get to the installer page.
Issue 1: When I click ‘Submit’ on the installer page
The apache error log shows:
[/usr/local/apache/logs] $ tail -f error_log
[Sun Aug 11 18:38:19 2013] [error] [client] PHP Warning: file_get_contents(http://127.0.0.1:8080/vs) [function.file-get-contents]: failed to open stream: Connection refused in /home/ /public_html/sprinklers/install.php on line 99, referer: http://www.
[Sun Aug 11 18:38:19 2013] [error] [client] PHP Warning: set_time_limit() has been disabled for security reasons in /home/ /public_html/sprinklers/main.php on line 13, referer: http://www.
Are there any work arounds for this if the hosting provider is unwilling to make a change?Issue 2: My hosting provider prevents access of directories that are set to 777, thus I can’t get to the installer page when permissions are wide open. I believe I read on the first page of this thread that it needs to be 777 to allow creation of directories or files. Can you please confirm this, and let me know if there is a workaround for my situation?
Thanks in advance!
AveryAugust 11, 2013 at 11:59 pm #24269
SamerKeymaster@Avery There is a much easier solution! Using Ray’s hosted version of the web app. Just goto http://rayshobby.net/apps/sprinklers and put the IP for your OpenSprinkler and the password set on the device (default: opendoor). You should be logged right in.
If you really want to install the copy yourself we can proceed from there, let me know.
August 12, 2013 at 12:17 am #24270
AveryParticipant@salbahra wrote:
@Avery There is a much easier solution! Using Ray’s hosted version of the web app. Just goto http://rayshobby.net/apps/sprinklers and put the IP for your OpenSprinkler and the password set on the device (default: opendoor). You should be logged right in.
If you really want to install the copy yourself we can proceed from there, let me know.
Hi Samer,
Thanks for all of your contributions!
Yes, I was aware of that option. Because I am using this to water a huge vegetable garden and fruit trees I’d like the predictability of knowing when software changes, etc occur. I’d hate to be out of the country for a month to have a software bug potentially lead to a lot of plants dying, etc. And the ability to roll back/forward the software as needed.
Avery
August 12, 2013 at 3:34 pm #24271
SamerKeymaster@Avery Good idea. Well the warnings you are receiving are just that. They shouldn’t be preventing the app from functioning.
As for the permissions, you don’t need 777 just anything that allows you to make 3 files (you can also make the files yourself and ensure PHP has the right to modify them). The 3 files are:
– SprinklerChanges.txt (logging file)
– .htpasswd (used for the username/password database, named .htpasswd to help prevent Apache from serving it)
– .cache (used to cache tokens for the rememeber me option)In order to add a user manually to .htpasswd you can use the following syntax: “user:passwordn”. The user name is just that but the password is hashed using SHA1. Just generate a hashed password and put it in that file. The “n” is just a line return not really needed but could cause problems adding users down the road if a line return is missing.
In order to hash a password you can use the following command:
/usr/bin/php -r "echo base64_encode(sha1('PASSWORD'));"
Hope that helps and please let me know if you need further assistance.
August 12, 2013 at 11:23 pm #24272
SamerKeymasterI have recently added a new theme as many of you may have noticed and today I added the ability to switch themes. This option can be found in the side panel accessed from the top left icon (bars) on the home page.
I also fixed several bugs including a nasty current status page that sent you back into current status every time the timer drifted. I also fixed a bug rendering program preview for IE8 and below.
Let me know if any new bugs have cropped up or just any general feedback.
September 8, 2013 at 5:11 pm #24273
c1wrenMemberHi,
I’m trying to install the mobile web app on a website of mine so I can access my sprinkler by going to the url on my website and logging in there. I have installed the files on my website, set up port forwarding correctly on my router (and ran checks to make sure it is open), and verified my ip. I then go and enter the information in the install.php page and enter everything correctly. I click submit then I get “Settings have NOT been saved. Check IP and Port settings and try again.” The ip and port settings are correct. I have verified they are correct by running port forward checking programs and by access the base sprinkler web app from my phone running on verizons network. Since I couldn’t get it it work on my website, I tried getting it to work through the rayshobby.net/apps/sprinkler/ link and that still doesn’t work. It just keeps spinning forever and never connects. Anybody have any suggestions?
September 8, 2013 at 5:24 pm #24274
SamerKeymaster@c1wren That is odd. The only thing I can imagine is the port is somehow incorrect. First few questions:
1) Are you using the micro controller or the Raspberry Pi version?
1b) If your using Raspberry Pi, are you using Dan’s OSPi program?2) What port are you telling the web app to use?
Note: If you are using the micro controller, don’t bother setting a port unless you are using a non-default port.
If you are using the OSPi program, the default is 8080 (use by appending, :8080 to your IP).3) Both your options sound like they are on a remote network compared to the OpenSprinkler itself, are you using a public IP?
Note: If the IP begins with 192.168, 172.16, or 10 it is a private IP. Use wimi.com to find your WAN IP.September 10, 2013 at 1:05 am #24275
vaziimoloMemberHi,
I am trying to use Ray’s hosted version and I get a similar result as noted by c1wren.On the first attempt, “It just keeps spinning forever and never connects”. On subsequent attempts I just get a blank (dark blue) screen.
Any ideas?
Thanks.September 10, 2013 at 1:18 am #24276
SamerKeymaster@vaziimolo Could you please provide some context/information? The same questions above apply to your scenario as well. Sorry but there are different firmwares and different mobile apps. If we’re not all on the same page we could go back and forth for days with no resolution.
Thanks.
September 18, 2013 at 1:44 am #24277
vaziimoloMemberHi Samer,
Everything seems fine now.
I’m using the DIY v1.42u (Arduino based) OpenSprinkler. It is running firmware version 1.8.3.
I’m also using port 8101 instead of the default port (80).
I am also using version hosted on Rayshhobby.net server.I suspected that the problem had something to do with my browser (Safari). Itried to connect using Chrome and the app worked fine. So I deleted the cashed data in Safari (cookies, …) and tried to run your app again and this time it worked.
I don’t know what happened the very first time I ran it which seems to have caused the problem, but clearing the data has fixed it.
It is a nice app! Thanks for sharing it !!!
Regards,
Marc.September 21, 2013 at 12:15 am #24278
AveryParticipantSamer,
Perhaps you can shed some light on this situation:
1. Setup open sprinkler… allowed port forwarding
2. Works fine from multiple machines, browsers, etc with ray’s hosted web app.
3. Try from my girlfriends machine and iphone, and get the message: “Check IP/Port and try again.” from both. Neither of these devices have accessed the local or web app previously. Safari 6 on the laptop.
4. Used iphone to access local device on local network – works fine
5. Navigate back to the hosted web app, appears to login, but does not display correct information and has red banner saying “System Disabled”.
6. Then, on the laptop (haven’t navigated to local app), I realize I can get to the web app and login with no password provided. I clear all cache, cookies, etc. Still can login with no password provided.So, lots of odd stuff… thoughts?
September 21, 2013 at 12:21 am #24279
SamerKeymasterMy best guess: you used the devices local IP. You mention the girlfriends iPhone was on the same network as the OpenSprinkler therefore thinking it is okay to use the LAN IP however rayshobby is a relay. As a result, you have to use an IP Ray’s server can communicate with.
September 21, 2013 at 12:52 am #24280
AveryParticipantSo, another observation… maybe I didn’t realize previously that it does let you view (read-only) the sprinkler without entering a password, but doesn’t allow any changes. Not sure if that is by design, but typically I wouldn’t want someone over the public internet to view the schedule without a password. Perhaps the unit can’t accomodate this. The access from devices that haven’t accessed the local device web page does still seem to be an issue (invalid ip/port).
Some design thoughts…
When I schedule something to go of just once on a day, why not allow the interval to be 0? Based on my experimentation, it requires both that you put a window (say 06:30-07:30) and an interval. Adding an interval has no value, and if you happen to choose an interval short enough, it might run multiple times (you have to think about this when you schedule). Also, perhaps an option is to only require the end time if the interval is zero? That way, if another program pushes the execution/start time beyond the (would-be) end time, it would still run?
September 21, 2013 at 12:57 am #24281
SamerKeymasterEverything you have discussed is related to the firmware.
If you put the IP:Port in your address bar instead of the web app you will notice the native firmware giving you the same information.
As for the invalid IP, have you ensured your not using a local IP?
The interval duration is a parameter required by OpenSprinkler firmware. Using 0 prevents a program from running hence my advice about setting it high.
Update: My web app is just a nice front end to Ray’s firmware and cross compatible with Dan’s OSPi program.
September 22, 2013 at 4:14 pm #24282
SamerKeymasterFixed a few cosmetic things now that iOS 7 is out. I’ve really switched my preference to the flat theme which goes along with iOS 7 a bit better.
Hope the app is working well for everyone.
September 22, 2013 at 7:40 pm #24283
JerryAllenMemberI have the opportunity to interface this device/software with some agricultural sprinkler system circles so the application they will want will be custom and the hardware interface will be 24v AC relays over 440v VAC systems.
The mobile app is Nice, Really Nice addition to Opensprinkler. I use Android, far as I see the Mobile App works perfectly.
I intend to create a graphing interface for run time per “zone” with gallons, energy costs per gallon/hour etc. and hook it into this app if I can debug the code far enough to do this. This addition would require setup of a local server to handle the X minute polling of the status bits from the controller(s) as well as the gallon/minute and energy cost settings etc. More info that would be of value for possible load shedding etc. I doubt I can integrate into the full blow mobile app with ajax, ajax is above my level of experience at this point.Where are import/export configurations stored?
Thank you,
Jerry Allen
September 22, 2013 at 11:09 pm #24284
SamerKeymasterThank you @JerryAllen for the compliments! There is a similiar project on going right now by @Vaughano available here: http://rayshobby.net/phpBB3/viewtopic.php?f=33&t=330. I would be more than happy to help just let me know after you glance over things what specifically you need to know.
Also, the configuration is exported to localStorage of the browser/device. At the very least, iOS backs up localStorage so exported configurations on iOS devices are fairly safe.
September 23, 2013 at 12:49 am #24285
JerryAllenMemberThank you for the pointer to the other thread.
For now, my (own) solution to this will be “server side” based Information Dashboard and will be untethered from the Web App for the graphing of data it will not be real time, it will be historical with a 1-5 minute granularity due to polling constraints on the 1.42u hardware leaving enough CPU/Ethernet time for the hardware to take care of timing and also service the WEB/Mobile UI and buttons. I am reading the sprinkler ON/Off values now every 60 seconds, I will begin graphing it as soon as I get the rrd specifics sorted out. Discovered (probably in the docs) that I can read all station bits at once (bonus), now every 60 seconds to see if I can get that 100% reliable for a long, long period of time. I will change the polling time to <15 seconds to see what that does if 60 works. For long term storage, I can not see that 15 second time increments would be of value and would consume a great deal of resources on the server as well as the browser to plot that data. That type of application would be realtime or almost. 60 seconds ago 4 stations were on, now only 1 so flow data can be calculated fairly well.... Pressure and Flow alarms/stats would be very useful again adding a dedicated pressure and flow sensor device with IP so as to not pollute the original sources. At this point I want to learn are the hooks into your "portal". When I discover my questions I may ask at minimum to hook into the menus of the Mobile APP.
Jerry
September 23, 2013 at 1:30 am #24286
VaughanoParticipant@salbahra wrote:
Thank you @JerryAllen for the compliments! There is a similiar project on going right now by @Vaughano available here: http://rayshobby.net/phpBB3/viewtopic.php?f=33&t=330. I would be more than happy to help just let me know after you glance over things what specifically you need to know.
Just on this, there has been little activity from me for a while due to other distractions, like work. But I expect to get back to it soon, and will certainly be checking that post if anyone has any questions, or ideas.
October 2, 2013 at 2:15 am #24287
ubestbsteppinMemberhi Salbahra,
I installed the mobile web app on a shared server I have. Everything seems to work with the exception of logging and some of the screen hanging for a little while. When I run watcher.php from command line it returns “Fatal error: Call to undefined function: date_default_timezone_set()”. It would seem like my PHP version is out of date, but I am actually running PHP 5.4.2. Any ideas what could be going on?
October 2, 2013 at 6:39 pm #24288
SamerKeymasterNot sure why you are getting the error if you PHP is up to date. Nonetheless, I have updated the code to check if the function is available and fallback to putenv if it is not.
Let me know if this works a bit better for you, thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)