OpenSprinkler › Forums › Comments, Suggestions, Requests › Adding Sunset/Sunrise, 433MHz support › Re: Re: Adding Sunset/Sunrise, 433MHz support
Thanks for the suggestions.
1) Sunrise/Sunset time is being considered together with the weather feature. As a preview of what’s happening recently, I’ve written a Python script which can take a location and output sunrise sunset time, as well as water percentage adjustment (based on Rich Zimmerman’s algorithm). You can run the script by using:
where you have to substitute WUKEY with your Wunderground API key, and tz gives the time zone value (your time zone multiplied by 4 and offset by +48. for example, UTC-4 is -4*4+48=32). Of course the parameters are meant to be populated automatically by OpenSprinkler.
The script will return one line:
which can be easily parsed by Arduino. Here:
-scale: water scale / percentage
-sunrise: local sunrise time (number of minutes from midnight)
-sunset: sunset time
-the other parameters like maxh, minh are the humidity, temperature and precipitation data used to calculate water scaling (these parameters are obtained from WUnderground using the location).
This way the device can send a query once a day to retrieve the data.
2) OpenSprinkler 2.0 and 2.1 have pin headers on the circuit board to directly plug in a standard 433 or 315MHz RF transmitter. I’ve written a few blog posts about how to use this to interface with remote power sockets:
It’s also possible to connect a RF receiver so the device can listen to remote sensors. I’ve written a series of blog posts about interfacing with various sensors like temperature, humidity, rain, soil moisture:
so the pieces are all there, but the support has not been added to the provided firmware yet.