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

  • This topic is empty.
Viewing 25 posts - 226 through 250 (of 559 total)
  • Author
    Posts
  • #24064

    Samer
    Keymaster

    Okay, the good news is, your wheel is spinning when you hit a menu item. The bad news is it is indeed the weather lookup locking up the application.

    Here is what is going on: the PHP script is fetching the Yahoo weather but it is being delayed for whatever reason. That AJAX call being run prevents other AJAX calls to the same site, from the same browser and as a result you sit there waiting. I will add a timeout to the script now to prevent these lockouts, which might not fix the weather but at least will let the rest of the app function.

    My guess: Your connection is being flaky or Yahoo is throttling you (I doubt it but an idea). Try going to Yahoo directly and see if it takes a bit to open or not (refresh it a few times):

    http://weather.yahooapis.com/forecastrss?w=23424954

    Update: Time out has been added (5 seconds). Let me know if this helps. Again, if the weather times out, it won’t show the weather but the rest of the application will function.

    #24065

    Zapp
    Participant

    Thanks, I’ll try the update with the timeout.

    I’m starting to think it’s my wifi that acts up here. I’ll do some more testing. For what I can see on my laptop an F5 on the xml page is more or less instant, but my laptop is also on wifi… 🙄

    I’ll conect my Pi to the netwok with cable and try it out too.

    Report on this might take some time since I’m about to go to a birthdayparty NOW! :mrgreen:

    /Jonas…

    #24066

    Samer
    Keymaster

    @Zapp No problem! Just to give you my scenario, I have almost no wifi in my apartment currently, and my iPhone will spin for a while as well. With the new timeout you will at least be able to tell which end is stalling. If it still spins a lot you know it’s your connection between your phone and your Pi. If the weather just doesn’t load after 5 seconds (empty) then you know the Pi was having issues reaching Yahoo. This is because we capped the server at 5 seconds but did not set a timeout on the phone.

    Hope that makes sense, enjoy your party!

    Update: I added timeout logic to the javascript (pushed to Github). If the frontend takes more than 5 seconds to get a reply, it stops trying and shows an error. In regard to the weather, this will instead hide the “Loading Weather…” text.

    Update 2: I set a hard limit on the PHP execution time. This way, the app should be responsive even after a connection timeout. Long story short, the app should have more control of what is happening rather then leave you with a spinner and no control except for closing/reopening. I really can’t imagine a scenario when the PHP needs more than 5 seconds to execute an action.

    #24067

    Samer
    Keymaster

    I updated the program selection now and should work everywhere, including iOS! This is for the program preview. If you select the program it will redirect you to the change program window and expand the specific program you selected allowing you to edit it. Minor feature but a nice shortcut.

    I also fixed the problem with Android being unable to navigate the timeline/preview. The fix is indirect but I added a navigation menu on the bottom right with a move right/left and zoom in/out button. Tested it on Android and seems to be working well.

    Loving the preview page now, thanks for all the feedback!

    #24068

    andrew
    Participant

    If I type my location in as “CITY, STATE”, I do not get the little weather status at the top of the screen. If I change it to a zip code, however, it works. If I had to guess without looking at the code, I’d say you weren’t properly encoding your strings for URLs when you query for the WOEID (for shame) :).

    Edit: You probably already know this, but just in case I’m not clear. When I say properly encoding URLs, I mean coverting things like spaces to “+” and commas to “%2C”. There are php functions you can use for this.

    #24069

    Samer
    Keymaster

    Your absolutely right, complete oversight. I will get this patched up when I get home!

    Thank you!

    Update: Pushed the fix on my mobile haha! Should work now.

    #24070

    djagerif
    Participant

    Just a small issue: The OS ‘Weather’ link doesn’t work when the location textbox contains a space, even though it saves it. The OS documentation says you need to use a [,] or [+] instead of a [space]. Can the Web App also allow both these values to be used/saved?

    #24071

    Samer
    Keymaster

    @djagerif Did you use the version I just pushed 15 minutes ago? I just fixed that issue.

    Let me know if its fixed.

    #24072

    djagerif
    Participant

    I just updated again but it doesn’t save the + character.

    #24073

    Samer
    Keymaster

    Sorry about that, I just pushed a fix. Curiously, what is the + used for? Should work now though.

    #24074

    djagerif
    Participant

    It’s just what OS uses instead of a space. It uses either a ‘,’ or ‘+’ character. Hover your mouse over the OS ‘Location’ text.

    Works perfectly now, thanks.

    #24075

    Samer
    Keymaster

    Oh okay I see what you mean however I have a space in my location and it works fine. The plus sign is technically a space in a URL and I assume that was vestigial instead of encoding it for the weather button. Anyways, either works fine now.

    Edit: I just tested, and if you have a space in the location the native OpenSprinkler’s UI weather button won’t work. Thanks for the heads up on this. I might just convert space to plus signs to alleviate the issue/confusion.

    #24076

    andrew
    Participant

    Ok, try it with a comma in the location (e.g., Orlando, Fl). For me, that doesn’t work.

    #24077

    Samer
    Keymaster

    With the latest update? I am using “Dallas, TX” and it works fine.

    Edit: I just tried San Antonio, TX and also works without any issues.

    Edit 2: I just tried Orlando, FL and it also works fine. Wonder what’s going on. I know it caches the WOEID so if it set a 0 earlier (because of the bad code) then it’ll keep trying that until you set a “new” location. Try opening options and hitting submit (don’t need to change anything).

    #24078

    andrew
    Participant

    Ah. I misunderstood your previous post and didn’t realize there was an update. I’ll check it out when I get home but it sounds like you caught it.

    #24079

    Samer
    Keymaster

    More goodies! I updated the status page bringing everything the normal OpenSprinkler shows as displayed below. I also label the master station on the status page now (if there is one).

    #24080

    wyone
    Participant

    I could not get the weather to work at all, and I could see it was trying during the initial start up, but it would go away. I simply put in my zip code and it worked perfectly and it pulled the name and state as well. Great addition to the app!

    Thanks again for all your work

    #24081

    Samer
    Keymaster

    @wyone Awesome! I think it wasn’t working initially because of a bug I had in the code with commas/plus signs but that should be resolved now. If the most recent version isn’t working with your full location name, could you let me know so I could troubleshoot it?

    Thanks!

    #24082

    wyone
    Participant

    I just closed my browser ( I use Chrome BTW ) and restarted it and it works perfectly with JUST my zip code. It pulls my City and State and also the graphic with whatever the current conditions are. Great job!

    I noticed you have the status showing time remaining and if it is a one time program for IOS. I looked and it is not working on the web app, but then again, maybe it is not supposed to at this time.

    Again, I appreciate all your efforts!

    #24083

    Samer
    Keymaster

    Are you using the web application hosted by Ray at http://rayshobby.net/apps/sprinklers? If so, those updates have to be pushed by Ray and sometimes take a day or two. I email him the updated package daily and he usually pushes it within 12 hours.

    Glad your enjoy the app 🙂

    Edit: I just checked and the version on Ray’s site still has the weather bug. It should be fixed once updated and also get the new status page and other fixes/changes.

    For future reference, you can find the version in the About page accessed from the side panel. Currently, Ray has v14 and the latest is v15.

    #24084

    Samer
    Keymaster

    Pushed an update that finally allows you to toggle “use master station” for each station if a master being used (otherwise this option will be hidden).

    I also fixed a bug for the OSPi where checking ignore password would not save correctly (and cause an error). Another bug I fixed was the program ID not being shown correctly on the status page. I think I finally brought 100% of all the options from the OpenSprinkler into the mobile app. The only option missing is the HTTP port and it’s omitted to prevent accidental lockouts. I am sure there are bugs with this update so let me know if you experience anything.

    Thanks!

    #24085

    Zapp
    Participant

    @salbahra wrote:

    @Zapp No problem! Just to give you my scenario, I have almost no wifi in my apartment currently, and my iPhone will spin for a while as well. With the new timeout you will at least be able to tell which end is stalling. If it still spins a lot you know it’s your connection between your phone and your Pi. If the weather just doesn’t load after 5 seconds (empty) then you know the Pi was having issues reaching Yahoo. This is because we capped the server at 5 seconds but did not set a timeout on the phone.

    I don’t know if this still is valid but judging by the above it was my Pi having issues with Yahoo.

    @salbahra wrote:

    For future reference, you can find the version in the About page accessed from the side panel. Currently, Ray has v14 and the latest is v15.

    On the About page where? I can’t see any version number…

    I don’t know how this (XX:XX remaining) is calculated but it looks like it misbehaves when the rain delay is involved…

    My P1 is scheduled to run all zones at 05:00:00, 15 min each. It’s now 15:25:03 and this is the screenshot.

    I also think that ‘Last Run’ has some issues with ‘Time Zone’. Looks like it’s not taken into account at all. Mine is GMT +2:00 and the status page says 04:15:41 but it should have been 06:15:41. The Logs page have the correct time!

    /Jonas…

    #24086

    Samer
    Keymaster

    @Zapp wrote:

    On the About page where? I can’t see any version number…

    Sorry for the confusion, I meant for the hosted web application. I mantain two different versions of the same app. One is hosted on Github (the one you use) which is installed on your own server/Raspberry Pi. The other one is hosted by Ray at http://rayshobby.net/apps/sprinklers and only requires an open port to work.

    @Zapp wrote:

    I don’t know how this (XX:XX remaining) is calculated but it looks like it misbehaves when the rain delay is involved…

    My P1 is scheduled to run all zones at 05:00:00, 15 min each. It’s now 15:25:03 and this is the screenshot.

    This is a documented problem with the Raspberry Pi software, build date June 22, 2013. Dan pushed an update on June 26, 2013 which should resolve this however I am noticing it still says June 22 inside. If you can, confirm the problem is not just the web app by visiting the normal website and observing the same issue.

    @Zapp wrote:

    I also think that ‘Last Run’ has some issues with ‘Time Zone’. Looks like it’s not taken into account at all. Mine is GMT +2:00 and the status page says 04:15:41 but it should have been 06:15:41. The Logs page have the correct time!

    I think this MIGHT be an issue with the interval program on the Pi, because I do not have this issue with my normal OpenSprinkler. I will try and troubleshoot this and let you know.

    Thanks!

    Edit: I don’t own a Raspberry Pi or the OpenSprinkler Pi version however I run the software on my server with GPIO disabled. I am expierencing this problem on my test setup and described it here http://rayshobby.net/phpBB3/viewtopic.php?f=28&t=160&start=20#p1101

    Edit 2: I notified Dan via the forum post for the interval program. I might take a look at the code and see what I can find.

    Edit 3: I made an update to show the currently running commit number on the About page. This should help is further discussions since I have been pushing updates frequently. This will also be the first step in update notifications. I do not plan on forcing or auto-updating but I think it would be nice if a notification showed up telling you there is a newer version!

    #24087

    Zapp
    Participant

    I’m not really sure of what’s going on here.

    I just did a new download of Dan’s OSPi interval prg and it’s exactly the same ospi.tar.gz as I had before, checked with md5sum.

    I’ll wait for Dan or Ray or whoever it is to do another update on the GitHub and see if that solves the problem.

    /Jonas…

    #24089

    Samer
    Keymaster

    @Zapp Sorry if that was too much. Basically, I am blaming the interval program for now. Just let me know if this problem is showing up in the interval program or only my web application. If it is both, then as you said, we should just hang tight until Dan or Ray push an update. Otherwise, I need to fix something 😛

    Thanks!

Viewing 25 posts - 226 through 250 (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)