Author Topic: Weather Forecasts?  (Read 20913 times)

Offline thebgrian

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #30 on: April 29, 2014, 01:50:18 pm »
Hi, guessed

I hope everything is good with you.
Just wanted to check if there is still development for this great plugin and the forecast option.

Offline Freddan101

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +12/-2
Re: Weather Forecasts?
« Reply #31 on: May 10, 2014, 01:23:27 am »
+1 Would love to see forecast data in the plugin.

Offline dzmiller

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +10/-14
Re: Weather Forecasts?
« Reply #32 on: May 11, 2014, 12:32:05 pm »
Eventually someone will expose the whole API in the parent device. I don't see much value in doing it piecemeal. I would like to be able to determine the forecast overnight low. I would also like to know the next hours forecast. (Windows open/rain, that sort of thing).

Offline AgileHumor

  • Hero Member
  • *****
  • Posts: 984
  • Karma: +51/-27
  • KISS
Re: Weather Forecasts?
« Reply #33 on: May 11, 2014, 12:54:10 pm »
The new Virtual Rain plugin will now detect rain in the past, future, or both.  I created 2 virtual rain plugin devices..   One for past/near future (for irrigation bypass) and one for future (to set a scene off it it will rain).
WMC Leviton:18xVPE06,8xVRS15,3xVRP03-W,2xVRR15,4xVRCS4,2xVRCS2,VP00R,8xVRS15 Aeon:5xDSC06106,4xDSC24,4xDSC25,12xDSB29,2xDSC11,4xDSB54,DSB05,3xDSA22,DSA38,2xDSA03202B,DSB09104,HEM Other:3xYale,12xHSM100v3,7xSP103,45604,WDHA-12,SSA2USR,EVLCD1T,6xWWA02A,7xIPC-HFW2100,URTSI,Hue,Russound,OpenSprinker

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Weather Forecasts?
« Reply #34 on: May 14, 2014, 03:46:17 pm »
To make this easier, I'm going to split the work into two parts, fetching-data and scene-scriptability.

I just checked in the prototype of the data-fetching part of the code.  It contains a bunch of additional StateVariables, which are attached on the Parent node of the Weather Plugin, as well as changes/tweaks to the way the data is fetched/converted (in the case of metric conversions)

It's quite possible this change has destabilized the code, so "beware".  The information presented, or some of the semantics, may change based upon the feedback received. 

WARN: If use of the Weather Plugin is critical to your automation, then I don't recommend you try these changes yet 8)

For those still interested, look here:
    http://code.mios.com/trac/mios_weather/browser/trunk?rev=72

NOTE: Only the I_WUIWeather.xml and S_Weather.xml files have changed at this time, there are no UI differences, and no scene-scripting differences (but there's a whole lot more data in the Advanced tab for use in Luup (etc))


Add the following new information, in support of scene scripting.

General properties
  • WindDegrees - The direction of the Wind, expressed in degrees.
  • WindGust - The speed of any bursts, or gusts, of wind.
  • UV - UV Levels.
  • Solar - Solar Radiation Levels.

Add the following new information, in prototype-only form at this time. This data is subject to change based upon the feedback received.

Support for [limited] Weather Forecast information
  • Forecasts - Representing the # of Forecast entries that have been recorded, not counting "today", or Forecast[0]
  • Forecast.x.HighTemperature
  • Forecast.x.LowTemperature
  • Forecast.x.Condition
  • Forecast.x.ConditionGroup
  • Forecast.x.MaxWindSpeed
  • Forecast.x.MaxWindDirection
  • Forecast.x.MaxWindDegrees

The forecast for tomorrow has is Forecast.1.*, the day after Forecast.2.*, etc.  There can be a variable number of these, depending upon the Weather Provider.

Typically Weather Underground provides "today" + three (3) others.

Support for Weather Alerts
Weather underground supports a feed of one or more Alerts.  The new code will pull in all Alerts, and provide a "count" that can be used by Control Points when they're rendering them.

Only the first alert is represented in the S_Weather.xml file, but there may be others (not that I've ever seen them).  The values populated come directly from Weather underground's Alert feed, so the types/descriptions are documented on their site:
    http://www.wunderground.com/weather/api/d/docs?d=data/alerts

  • Alerts - Representing the # of Alerts that have been recorded
  • Alert.x.Type- a Short code for the type of alert "HEA"
  • Alert.x.Description - a Short description of the type of alert "Heat Advisory"
  • Alert.x.StartDate - in Epoch format, as Vera uses
  • Alert.x.EndDate - in Epoch format, as Vera uses
  • Alert.x.Message - The raw-text details of the message.  This may have all sorts of Unicode and/or other special characters in it

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10091
  • Karma: +763/-142
Re: Weather Forecasts?
« Reply #35 on: May 14, 2014, 08:26:09 pm »
Great !!! I will check it out ...
I only need the Variables ... I do not need to see all of this data on Vera ...
I can go right to WU on the Mobile devices for a comprehensive view of weather in the area.

Offline Mai Pensato

  • Full Member
  • ***
  • Posts: 225
  • Karma: +4/-1
Re: Weather Forecasts?
« Reply #36 on: May 16, 2014, 04:47:03 pm »
@guessed: great development! Can you explain how I can make use of those adapted files. I already use the weather plugin. Many thanks in advance.

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Weather Forecasts?
« Reply #37 on: May 16, 2014, 07:16:52 pm »
@guessed: great development! Can you explain how I can make use of those adapted files. I already use the weather plugin. Many thanks in advance.
It's a little old, but these instructions can also be used for UI5.  The menu hides under:
    Apps > Develop Apps > Luup files

You download the ZIP Archive, from the link that I published above, and upload the files one-by-one to Vera

NOTE: This version is largely unvalidated, although I've been running variants of it for some time.  If you've not worked with plugins in this early-access state before, this might not be the best set of code to start out on  8)

Offline dzmiller

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +10/-14
Re: Weather Forecasts?
« Reply #38 on: May 17, 2014, 08:46:38 am »
.........If you've not worked with plugins in this early-access state before, this might not be the best set of code to start out on  8)

Please keep us informed as you gain more confidence in the changes. As I use the current plugin, I'm not in for early adaptation. But when it reaches a solid beta stage I'm in. The new data should be useful and interesting to find ways to to use meaningfully. Thanks.

I think the alert feed is potentially very useful for those of us who live in areas with thunderstorms. It's true that everyone gets alerts on their phone, but the HA can trigger on things like windows open, garage open, and whole house fan running. It could turn off irrigation too. Where I live delaying irrigation based on forecast will lead to under watering during drought. But I would always want to stop watering for an actual thunderstorm warning alert trigger.

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Weather Forecasts?
« Reply #39 on: May 17, 2014, 09:56:33 am »
I plan to run it for the next two weeks without changing it.  If it remains operational/stable during that time (sans the multiple daily restarts/reboots that Vera does) then functionally it'll be sane to release through apps.mios.com.

The question then is whether the form of the StateVariables is "ok" with folks.  I did ensure that I only used UPnP approved characters in the names, but it wasn't clear how array-like data should be represented (except CSV, which Vera wouldn't like very much)

The Alert data was a simple add, and I figured things like the HEA Heat Warning's could be useful for people to close blinds (etc).  I was really hunting for the Pollen/Allergy data, but apparently WUI isn't permitted to put that into their feeds.


Even with my burn-in testing, it's possible that folks will experience issues.  It would be handy to get feedback from one or two in Europe, where we've seen trouble before, and also from Metric countries, since I've done a few tweaks to how this is handled to avoid having to convert data after-the-fact.

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10091
  • Karma: +763/-142
Re: Weather Forecasts?
« Reply #40 on: May 19, 2014, 08:57:47 am »
All is good for me ...

Offline waynehead99

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +16/-1
Re: Weather Forecasts?
« Reply #41 on: May 19, 2014, 10:53:48 am »
I installed the files yesterday and still looking at what was added to see how I can use it. No issues though. All went in without any problems and things are good. I will monitor and update if there is issues.

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Weather Forecasts?
« Reply #42 on: May 19, 2014, 01:49:32 pm »
Installed the files and everything appears to be working fine. Will keep an eye on things. The data from weather underground is coming from my personal weather station. So I'll have data to compare between the both of them.

- Garrett

p.s. I'll start looking into adding support for the forecast data into my app.
« Last Edit: May 19, 2014, 01:51:44 pm by garrettwp »

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10091
  • Karma: +763/-142
Re: Weather Forecasts?
« Reply #43 on: May 19, 2014, 10:49:00 pm »
@garrettwp
My personal opinion .... the forcast stuff is great for automation ... I am not sure I would use a Vera Remote Control App to look at weather ... there are so many good ones out there ... the WU app is fantastic to put the particular location into a larger regional context.

I am also using the WU to monitory my personal weather station ... I plan to start using the "Solar" measurement to control my lighting instead of sunrise/sunset ... There are times when we have storms and I had to override the settings ... not that we have had any lately ...

Offline waynehead99

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +16/-1
Re: Weather Forecasts?
« Reply #44 on: May 19, 2014, 10:50:17 pm »
Richard how are you going to use the solar? I really liked your idea and don't see that populating.