OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Rain delay from Yahoo Weather Re: Re: Rain delay from Yahoo Weather

#24548

andrew
Participant

Looks good. Can’t wait to see it in the app. Does the file_get_contents do proper url encoding? I could see that line running into problems if locations contain commas and spaces.

Also, I’m not a huge fan of hitting the woeid database every time you wish to obtain weather data. Is there a way to cache the woeid and continue to use it so long as the location option hasn’t changed since the last time? For one thing, Yahoo is a little bit more restrictive on their placefinder API than they are with their weather API. Also, the woeid queries can actually take some time (I ran the query using “Disneyworld” and it took several seconds to return).

Edit: looks like we’re cross-talking and you’re already considering the same issue.

Edit 2: Also, I completely agree that 1 minute is too frequent for weather checks. An hour is probably fine. I really only had it running every five minutes so I could test it out more easily.