From: Jim S. <js...@sy...> - 2006-04-20 02:45:21
|
Please respond to this post if you have some private code, or even requirements, for functionality related to the near term weather = forecast. I hope to write some module that is useful to others, or better yet just = take advantage of someone's handiwork. My objective is to have a couple of reliable generic items that indicate either strong wind gusts, or heavy rains, within 4, 8, and 24 hours. I = would use the item state changes (just like a motion detector or RF item) to trigger code, or the state of the items to make decisions within other = code. I know there is good functionality to tell current conditions - but I = want to be able to code to influence current actions based on the future = weather conditions. For example - with a weather station it is possible to skip irrigation cycles if there has been a lot of rain in the last day - but = what if it has been dry for days and it's going to rain a lot today, with = only the history the irrigation would be activated but wasted. I have = automation for my swimming pool level - it wouldn't make sense to top up the pool = if there is going to be a heavy rain. I also have a large awning that = retracts - and should be retracted in strong winds - I would like to do that in advance of the strong winds - not when it's under stress. I recognize that there have been several modules to screen scrape = weather forecasts from NOAA, weather network, and Environment Canada - but = changing formats makes the solution less than reliable for this level of control. = The values that a chance of rain can take are not constrained so it's hard = to reliably and deterministically make decisions on the data, and of course = is very country dependent. There are however short term forecasts that by necessity have good = accuracy and reliability - the aviation TAF reports (Terminal Area Forecasts) = that are a first cousin to the METAR (current conditions) reports for which = there is a good module in misterhouse. And these reports are available in a standard format around the world (or at least where there is a = commercial airport). There is a perl library GEO::TAF (30 months old) that can be used to = parse the TAF and there are lots of sources for the TAF feeds. So that's the idea - here are the questions: 1) Comments / ideas about the generic items; what should they be called = to be obvious? 2) Update interval - poll the TAF how often? I think the forecast will = not change more rapidly than once in an hour under changing conditions, and = is usually issued every 6 hours. 3) Validity variables for the generic items - sort of best before dates = in case the internet TAF feed fails, etc - any examples that have been successful? 4) The GEO::TAF include - grab the code and incorporate in a module, or = use the library and force new users to fetch it into their perl libraries = using CPAN or equivalent? 5) Pointers to using .ini variables to control the code (point me to the best example)? 6) Any other structure ideas? 7) Any experience trying this and failures to learn from? Thanks Jim |