OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated) Re: Re: Mobile Web App for OpenSprinkler (w/Screenshots)

#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.