weewx-opensprinkler weather skin

189 views
Skip to first unread message

Peter Hardy

unread,
Oct 2, 2018, 9:17:43 AM10/2/18
to weewx-user
A big feature of the OpenSprinkler irrigation controllers is the ability to automatically vary watering levels based on weather conditions. By default the firmware does this by polling an external web service that calculates the watering adjustment based on data gathered from OpenWeatherMap or Weather Underground.

This skin is a partial reimplementation of the OpenSprinkler-Weather service, providing watering adjustments calculated from weeWX data.

There's still some limitations - baseline settings and sensitivity are hardcoded in the skin.conf and settings from the controller are ignored. Further, the web service provides local timezone offset information that I'm unable to include in a static skin as OpenSprinkler doesn't seem to be timezone-aware. Finally, I've only properly implemented the "Zimmerman method" end point. I'd like to include "Auto Rain Delay" at some point, but the standard service relies on forecast data for that, which I'm not sure how to get.

I'm still testing the skin out, so not sure I can recommend it to others full-time. But if you're interested, it's available from https://bitbucket.org/pjhardy/weewx-opensprinkler

Cheers,
-- 
Peter

vince

unread,
Oct 2, 2018, 1:16:21 PM10/2/18
to weewx-user
On Tuesday, October 2, 2018 at 6:17:43 AM UTC-7, Peter Hardy wrote:
I'm still testing the skin out, so not sure I can recommend it to others full-time. But if you're interested, it's available from https://bitbucket.org/pjhardy/weewx-opensprinkler



A screenshot so we know what it looks like would be helpful to have.... 

Peter Hardy

unread,
Oct 2, 2018, 5:28:34 PM10/2/18
to weewx-user
Apologies if I wasn't clear. This skin only produces plain text files, that can be consume by an OpenSprinkler controller. If you have one, and would like to produce weather adjustments locally instead of relying on an external web service, this skin may be useful. If you don't, a screenshot of a text file isn't going to convince you.

-- 
Peter

Pat

unread,
Oct 2, 2018, 5:41:40 PM10/2/18
to weewx-user
Sounds interesting! I use OpenSprinkler but never used the watering calculations - have always wanted to look into it but never have yet. 

I thought part of the watering calculations are done with forecasted rain for the day. How do you plan to get that forecasting data from weewx? Or are you using historical data from the rain collected by weewx?

Peter Hardy

unread,
Oct 2, 2018, 5:59:30 PM10/2/18
to weewx-user
There's two methods for weather adjustments. The "Zimmerman Method" only uses historical data (avg temp and humidity from the previous day, and total precipitation from previous and current days), and scales watering times up and down based on that. The Auto Rain Delay uses forecast data only - it scans the forecast precis for keywords indicating rain, and will delay the watering program entirely for a day if found.

So far I've only implemented the Zimmerman Method, partly because I'm not sure how to get forecast data in to weewx either. :) In my install I'm using the Responsive skin as well, which includes an extension for getting forecasts from the Australian BoM. But that's hardly a general solution.

mwall

unread,
Oct 2, 2018, 6:20:12 PM10/2/18
to weewx-user
On Tuesday, October 2, 2018 at 5:59:30 PM UTC-4, Peter Hardy wrote:
So far I've only implemented the Zimmerman Method, partly because I'm not sure how to get forecast data in to weewx either. :) In my install I'm using the Responsive skin as well, which includes an extension for getting forecasts from the Australian BoM. But that's hardly a general solution.

try the weewx-forecast extension.  it can pull forecasts from a few different sources, and it sticks the results into a dedicated forecast database.  then you can query that database from your service to get the specific rainfall information you want. 


m

Andrew Milner

unread,
Oct 3, 2018, 12:44:15 AM10/3/18
to weewx-user
I use open sprinkler on the raspberry pi and the Zimmerman method and the previous day's weather is picked up from weather underground using my wunderground key.  It works a treat and is using the data from my weather station for the previous day without needing to change anything in weewx.  I control 7 valves by uploading a dynamically changed program to the sprinkler from the pi twice a day, but also have a 'line clearing' program which is a pure open sprinkler program.  Anyone interested can see some of the result at

tomn...@frontier.com

unread,
Oct 3, 2018, 8:52:26 AM10/3/18
to weewx-user

    I’ve been messing around with this for a few months.  Initially, the external weather offset

was always returning a scale of zero because of how it was pulling OWM data, so I brought that

service inside the house and updated the OWM code to work better.  I also implemented the

same thing using DarkSky data and calculate the scale from both.  The external thing runs on

NodeJS, which was pain to get running on an RPi, so I’m rewriting the whole mess in python.

What’s left is to get it working as a CGI server so the OS controller can talk to it.  In terms of weewx

data, all I’m pulling at the moment is the last ~2 days of rain using a template to write a web

page the new code fetches.  That gets added to the forecast calculations.  The scale numbers

between old way and new code track, but often don’t match because of the math related to the

3 parameters (temp and humidity mostly), which vary slightly between OWM and DS.


No idea if the OS guys every fixed the forecasting thing or not, but they knew it was a problem.

I’d rather have all this inside my network anyway.  The WU thing only works when you have a key,

and WU quite giving them away, which is why the OS guys switched to the OWM api.


Once I get this in a usable state I can share it.  I hadn't thought of serving it from the main
httpd I have in the house, but that might speed things up.

Chris

Fearghas Mckay

unread,
Oct 3, 2018, 9:20:06 AM10/3/18
to weewx...@googlegroups.com, Fearghas McKay


> On 3 Oct 2018, at 00:44, Andrew Milner <andrew.s...@gmail.com> wrote:
>
>
> http://weather.andrewmilner.online/plants.html

That looks great.

How are you get the plant moisture data in ?

Thanks

f

Pat

unread,
Oct 3, 2018, 9:30:36 AM10/3/18
to weewx-user
I think the problem many are facing is the demise of wunderground's API keys. Sure they work for now, but for how long? There's a thread on their forums about replacing wunderground within the OS Unified Firmware.

Maybe this skin could be a good replacement for those using weewx and OpenSprinkler?

Peter Hardy

unread,
Oct 3, 2018, 5:45:55 PM10/3/18
to weewx-user
On Wednesday, October 3, 2018 at 8:20:12 AM UTC+10, mwall wrote:
try the weewx-forecast extension.  it can pull forecasts from a few different sources, and it sticks the results into a dedicated forecast database.  then you can query that database from your service to get the specific rainfall information you want. 


That's super useful, thanks! I'll add weewx-forecast support to this project in the next few days.

There could also be some value in trying to bring BoM support in to weewx-forecast. I'm not going to commit to that until I've actually done it though. ;)

Thanks,
-- 
Peter

mwall

unread,
Oct 3, 2018, 5:55:56 PM10/3/18
to weewx-user
On Wednesday, October 3, 2018 at 5:45:55 PM UTC-4, Peter Hardy wrote:
There could also be some value in trying to bring BoM support in to weewx-forecast. I'm not going to commit to that until I've actually done it though. ;)

i am happy to add other forecasting services to the weewx-forecast extension.  my only requirement is that they provide a free service.

it is pretty interesting to compare the various forecasting services.  and comparing forecasts from a single service over time is also informative.  for example, here is a sample set of wind, temperature, and precipitation forecast comparisons between weather underground and us national weather service, between different forecasts from nws over time, and between different forecasts from wu over time:


of course, if your local weather tends to be sunny all the time then its not quite so much fun :)

m

gjr80

unread,
Oct 9, 2018, 7:56:34 PM10/9/18
to weewx-user
I meant to reply a while back but was sidetracked.

I have looked into using data from the Australian Bureau of Meteorology in the past and have decided not to due to some (seemingly) fairly tight copyright controls/conditions on their publicly accessible products. Refer to their copyright page. The BoM's default terms of use permit personal use but do not permit distribution. They do have provision for Creative Commons and Public Access Licenced data but I am yet to find too much data of interest that includes the CC or PAL. I am no copyright lawyer nor have I contacted BoM but given the apparent restrictions on their products I have steered clear of their use on my site.

Gary

tomn...@frontier.com

unread,
Oct 9, 2018, 10:11:50 PM10/9/18
to weewx-user
So, I was able to port the OpenSprinkler weather server to python as a cgi script.  It isn't ready for public consumption, but does cover most of the capabilities of the original.  It queries Open Weather Map and Dark Sky using my private keys for each, as well as pulling in a weewx generated web page with the last 2 days rain, so that part would have to be figured out.  It does require a local web server at this point.  I wasn't able to (didn't try too hard) to get a python web server to simply serve the cgi results internally verses running the same code via cgi mechanisms.  The scale from the two sources are averaged for now.  If anyone is interested I can package in some form or another.

Chris 

Aldo Bord

unread,
Oct 13, 2018, 5:14:13 AM10/13/18
to weewx-user


Il giorno martedì 2 ottobre 2018 23:41:40 UTC+2, Pat ha scritto:
Sounds interesting! I use OpenSprinkler but never used the watering calculations - have always wanted to look into it but never have yet. 


Do you take into account the Evapotranspiration value ?
It should give a fairly accurate estimation of actual watering needs.

Aldo 

Peter Hardy

unread,
Oct 13, 2018, 6:04:03 AM10/13/18
to weewx-user
On Saturday, October 13, 2018 at 8:14:13 PM UTC+11, Aldo Bord wrote:


Il giorno martedì 2 ottobre 2018 23:41:40 UTC+2, Pat ha scritto:
Sounds interesting! I use OpenSprinkler but never used the watering calculations - have always wanted to look into it but never have yet. 


Do you take into account the Evapotranspiration value ?

No.

I gave a broad overview of the two methods OpenSprinkler uses to calculate watering offsets in a reply to Pat. You can find a full description of the algorithms used to scale watering times at https://github.com/rszimm/sprinklers_pi/wiki/Weather-adjustments

This weewx addon currently only provides the same scaling functions as the default OpenSprinkler service. It's certainly possible to add other scaling functions, including one based on the evapotranspiration value, as long as weewx has enough data to calculate it. But it was more important to me to provide existing functionality before trying to add to it.

-- 
Peter
Reply all
Reply to author
Forward
0 new messages