OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Builduing a linux service that gets weather data Re: Re: Builduing a linux service that gets weather data



I honestly haven’t given it too much thought yet been focused on packaging up the web app as a whole right now. But, I was interested in having the PHP (which is already running on a crontab) to maybe poll the weather and at the very least displaying that to the user within the app. Of course, it would be very neat if the PHP could activate a rain delay if it noticed the weather forecast predicated heavy rains (similar to the function of a rain sensor).

Right now, I am not using any storage for my app. It functions by grabbing the data from the OpenSprinkler. Also, I am not using a Raspberry Pi so I am not having to interact with the OpenSprinkler at a hardware level. With how efficient the logging system works I want to avoid tying a database to this setup to be honest with you. What I have in my head is simply checking at a set time (ex. 11PM) the weather for tomorrow. If it’s (and im making this up) >80% chance of rain automatically telling the OpenSprinkler to trigger a rain delay of 24 hours. Something simple. I was also thinking of adding a weather button on the main menu which just uses the location setting on the OpenSprinkler to grab weather data and display it in the iPhone. Of course, if your using an iPhone you can simply pull down your notification center and see the weather which is why that particular feature has remained a low priority.

I also think the PHP could fire off an email if it triggers an automatic rain delay just to inform the user something happened (of course could be disabled).

Thank you for the detailed post by the way! The research on which API’s is helpful as is the array structure’s and methods. I will update if I get some time to play with the weather frontend and let you know!