OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)
- This topic is empty.
-
AuthorPosts
-
February 11, 2014 at 5:54 am #24335
jonathonParticipantBasically, you can set up multiple programs, each with the same start / end / interval time, but with different stations and run times.
I think the Open Sprinkler hardware combined with Samer’s mobile app is fantastic. I love the flexibility that comes with the open source model and the suggestions and ideas that an active community generates. I’m curious about the decision to have all stations in a program share the same run time. I can see it would work well in a commercial environment when each station irrigates an identically sized area, number of trees or rows of vines etc. But in my limited experience of residential systems, it’s unusual to have any two stations run the exact same length of time. The front lawn, for example, may need slightly more watering time than the back lawn that’s in shade.
I may be out of touch on this, but from my perspective the user interface would make more sense if each station’s run time could be adjusted within a “program”. I know it’s possible to create a Program for each station and set its run time, but that seems unnecessarily messy. Does anyone else share my concern?
Again, I love the app!!
February 11, 2014 at 6:49 am #24340
djagerifParticipantJust to be more specific, mine is running S30 and S32 with a Master station on S08. I don’t start it with a Run Once, I let the schedule kick it off. Here I reinstalled and created a new program.
February 11, 2014 at 2:24 pm #24341
SamerKeymasterOkay let me try to emulate this tonight and hopefully come up with a fix. Thank you for the detail!
By the way, I’ve slowly been adding your suggestions. The first one just got added, clear configuration. The next one will be file based export/import.
February 11, 2014 at 2:42 pm #24342
djagerifParticipantThanks, I’ve noticed.
February 12, 2014 at 12:55 am #24343
SamerKeymasterI am going to try and post/maintain a list of features and bugs I am working on, in case anyone is curious. The list will be posted here: https://github.com/salbahra/OpenSprinkler-Controller/wiki/Scheduled-Changes. Nothing is guaranteed to go live but it will at least be attempted/tested out (unless its a bug of course).
Generally speaking, the wiki has been overhauled and actually contains some information now. However if anyone would like to further contribute to the documentation, it would be greatly appreciated (https://github.com/salbahra/OpenSprinkler-Controller/wiki).
February 12, 2014 at 7:21 pm #24344
bjcatlinParticipantNew error found. I just performed a ‘git pull’ to updated my two instances of the mobile app, and both instances are now getting an error when trying to load the initial page. The error in the web log is:
PHP Parse error: syntax error, unexpected ‘[‘ in /srv/Storage/Web/homecontrol/home/watercontrol/main.php on line 150
That section of code is:
#Resolve location to LID
function get_wunderground_lid() {
$options = get_options();
if (preg_match("/pws:/",$options["loc"]) == 1) {
$lid = $options["loc"];
} else {
$data = file_get_contents("http://autocomplete.wunderground.com/aq?h=0&query=".urlencode($options["loc"]));
$data = json_decode($data);
if ($data == []) return "";
$lid = "zmw:".$data->{'RESULTS'}[0]->{'zmw'};
}
return $lid;
}The line of code in question is if ($data == []) return “”;
In my limited programming knowledge, that line looks fine to me, so I am not sure why it is failing at that point. Any ideas?
Build is be22ab114cdbcdf996a41a171350d2b2fd4673e7February 12, 2014 at 7:51 pm #24345
SamerKeymasterPHP can be somewhat annoying when it comes to syntax (different supported methods between versions and different methods for the same thing). This should be an easy fix and I can hopefully get to it today.
Thanks for the report!
Update: This fix has been pushed out. Let me know if this resolves the issue.
February 13, 2014 at 1:45 am #24346
SamerKeymaster@djagerif I posted a fix for the issue. Let me know if this resolved it. Also, @charvel, I noticed this bug appeared as a result of an addition you made. From what I gathered, you don’t want the master station time to be added or used for the program time nor do you want it listed with a timer on current status page (similar to the native home page).
My solution to keep your suggestion was to unset the master station from the open station array. So it won’t be considered for any of the calculations. I also modified the current status page to only show if the master station is on/off. I tested the following situations and it seems to work fine: 3 stations using run-once program with a master and without a master. I tested both sets with sequential and nonsequential. In the master set, 1 of the 3 stations was the master station as well.
Let me know if your results are the same, for both of you.
Thanks!
February 13, 2014 at 5:53 am #24347
djagerifParticipantWorks perfectly now, thanks.
February 13, 2014 at 4:26 pm #24348
charvelMember@salbahra
I thought that the top of the current status page time is the total time of the running program. Now it shows the open valve’s time and count down. Please check the attachment. It should be 22:54. Please let me know if I misunderstood this case.February 14, 2014 at 1:05 am #24349
SamerKeymaster@charvel That is absolutely off…let me experiment and see if I can replicate that, so I can fix. I will let you know.
Update: Okay pushed an update that should help resolve this. I was able to recreate your screenshot and now I can’t so hopefully that’s good!
February 14, 2014 at 12:19 pm #24350
charvelMemberThanks for the update, but unfortunately it does not work.
This line does not execute:if ($settings["ps"][$settings["mas"]-1][0]) $open--;
February 14, 2014 at 1:27 pm #24351
SamerKeymasterAh okay (sometimes I hate PHP because what works on mine hardly ever works on anyone else’s). I’ll update the syntax and hopefully that will resolve the issue.
Update: Try now, thanks!
February 15, 2014 at 12:23 pm #24352
charvelMemberThanks again for the update!
It still does not work but if I am using “isset” then it works perfectly.
if (isset($settings["ps"][$master][0])) $open--;
February 15, 2014 at 8:09 pm #24353
SamerKeymaster@charvel I believe I figured out the issue. The $settings[“ps”] only reflects programmed schedules and not station status. Basically, I was using the wrong variable. I changed it to $status and this should resolve the issue. The problem with isset is it will always test to true and cause issues. Let me know if this fixes things, finally.
@djagerif I added the file based export/import. Please let me know how this works. I also resolved some bugs with importing files (didn’t know if OSPi/OSBo or OpenSprinkler).I also added a run program button within edit programs. This should make it easier to launch a program, on-the-fly.
February 15, 2014 at 9:12 pm #24354
charvelMemberNow it is working perfectly. Thanks.
March 15, 2014 at 4:58 pm #24355
aleslesjakMemberHello Samer,
is it possible to translate web interface? How do I go about it?
Best regards,
AlesMarch 15, 2014 at 7:03 pm #24356
SamerKeymaster@aleslesjak Absolutely, simply goto http://www.getlocalization.com/opensprinkler_mobile/ and select “Add new language” if one doesn’t already exist.
I typically check the site weekly and update the localization’s on Github however please feel free to post here if any major modifications have occurred and I will merge them.
Thanks!
March 31, 2014 at 12:30 am #24357
nayrParticipantTrying out the iOS app, says: For OSPi and OSBo users, the mobile_api plugin is required but I cannot find this anywhere.. and it don seem to want to connect to the interval-pi so I’m thinking I need to install it?
March 31, 2014 at 12:59 am #24358
SamerKeymasterI jumped the gun on the documentation, I apologize. However the plugin is unreleased but is expected very soon. Furthermore, the iOS update of my app supporting OSPi is pending Apple approval.
Sorry for the confusion.
March 31, 2014 at 2:47 am #24359
SamerKeymasterFor anyone reading the last couple of posts and wondering what is going on, the mobile app project is taking some turns. I am focusing on making native apps for mobile devices (iOS, Android and Windows Phone 8) and also making a UI for the SD card of the OpenSprinkler. This allows a much more seamless integration between the two due to a direct communication (versus a proxy server to communicate).
Of course the PHP project has a few distinct advantages however those will slowly fade over time as the native mobile apps continue to gain feature support. Currently, the main advantage is logging. The native apps have no way to poll the OpenSprinkler 24/7 and generate log reports however this feature will soon be baked into the OS firmware allowing the OS to log to a file on the SD card. This file will eventually be used to bring graphical logs without the PHP application. Second, the PHP app offers SSL encryption and stronger user/pass authentication. This is being considered for the native mobile apps and hopefully will be incorporated in some extent. Of course, SSL cannot be offered on an underpowered Arduino however other methods to enhance security are available.
With all of those things said, once the native apps gain the features only found in the PHP code I will begin to convert the PHP app into more of a wrapper/proxy to convert 1.8.3-2.0.3 firmwares into newer 2.0.4+ replies. This allows the PHP users to benefit from the much improved UI of the native apps. Of course, when this is complete, upgrading the firmware would remove the need completely for the PHP app making it a tool for people who cannot upgrade. This is being done to move the code into one codebase. Right now the native apps and the PHP app are different enough that moving changes between the two is rather cumbersome.
Also, up until today the native apps only supported the Arduino version of the OpenSprinkler using firmware 2.0.4+ however Dan and Jonathan have worked very hard to revamp the plugin system on the OSPi python interval program and incorporated a mobile_api plugin allowing my native apps to work 100% with the OSPi. This plugin is complete however pending some further testing before being merged into the master branch. I have already submitted updated applications to the Google Play store (already live) and the Apple App store (pending review).
If I have created any confusion please feel free to ask. I will update this thread when OSPi interval program is updated with the new plugins and also when Apple App Store has accepted the new update. I have a lot of plans for these native apps that cannot be done from the webapp but the bulk of my efforts have gone into making the app experience as smooth as possible and I will build after the foundation is stable.
Thanks!
More information about the native apps: http://albahra.com/sprinklers
Update 1: Apple just approved the update and it should be reflected in the App Store within 24 hours.
Update 2: OSPi just got updated and includes the mobile_app.py plugin already. Please update to use with the native apps.
April 4, 2014 at 1:28 pm #24360
nayrParticipantjust tried the new iPhone app against my OSBo and it worked fine, curious how does your auto-detect work?
April 4, 2014 at 2:49 pm #24361
SamerKeymasterThat is great news!
It’s kinda cool since the app is written in javascript. I use the native language (Objective-c, Java, and C#) to give me the wifi IP address. I check if that IP is considered a local IP. If so, I scan the /24 subnet on port 80 asking for /jo. If that IP replies with a JSON providing a firmware version than I consider it found. If the scan fails I retry the scan on port 8080 for OSPi.
April 5, 2014 at 10:47 pm #24362
nayrParticipantmessing with the iPhone app today and I noticed it does not resize the window when you rotate your device..
April 5, 2014 at 10:50 pm #24363
SamerKeymasterI completely forgot to test for that. I’ll get an update out soon to handle that. Thanks!
Update: I’m checking this now and works fine on my iPhone 5S. Any particular page giving you issues?
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)