Author Topic: Weather Forecasts?  (Read 21814 times)

Offline chris66

  • Sr. Member
  • ****
  • Posts: 316
  • Karma: +9/-8
Weather Forecasts?
« on: November 13, 2012, 04:04:41 am »
Hello, go through the topic couldn't find the answer: is it possible to get the Forecast value of the weather? For example at 5AM I run a Scene. If the weather is Clear the afternoon, I don ot need to switch on the Heat Pump. So I need something like (see below) but where the "t" is the Forecast value of the Weather at 1PM (t+8 Hours):

local t = luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "ConditionGroup", xxx)
if  ( (t == "clear")
then
  return true
else
  return false
end

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Weather Forecasts?
« Reply #1 on: November 13, 2012, 04:13:14 am »
Guessed has not implemented the forecast information. Only the current condition is implemented. Once the plugin is stable, he will add more functionality over time.

- Garrett

Offline chris66

  • Sr. Member
  • ****
  • Posts: 316
  • Karma: +9/-8
Re: Weather Forecasts?
« Reply #2 on: November 13, 2012, 04:15:20 am »
Thanks Garrett,

And at this moment, do you know what is the interval of each weather update? Each hour?

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Weather Forecasts?
« Reply #3 on: November 13, 2012, 04:23:49 am »
The default is 30 minutes. When registering for an api key you are allowed 500 calls per day. So that equals to about 1 call every 3 minutes per day. If you go over that limit, you'll be notified and could have your account locked. So when setting the refresh rate, make sure it is not something that will go over that limit.

- Garrett

Offline chris66

  • Sr. Member
  • ****
  • Posts: 316
  • Karma: +9/-8
Re: Weather Forecasts?
« Reply #4 on: November 13, 2012, 05:28:27 am »
Thanks, 3000 posts, happy postday!   :)

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Weather Forecasts?
« Reply #5 on: November 13, 2012, 10:20:31 am »
Thanks! Hopefully this functionality will get added soon. I will be getting my weather station this week and looking forward to using that for the data and getting more out of the weather plugin.

- Garrett

Offline chris66

  • Sr. Member
  • ****
  • Posts: 316
  • Karma: +9/-8
Re: Weather Forecasts?
« Reply #6 on: November 14, 2012, 05:22:22 am »
ok, if you need some testing, I'm there.
Something interesting, a lot of nights, I've the weather value set as "Overcast", but now we are in an anticyclonic period, and the morning, it's "clear" the evening is "clear", and in the night, "Overcast", even when I can see the stars... I record the value at 5AM each night, and I will control one more time.

Offline huogas

  • Sr. Member
  • ****
  • Posts: 301
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #7 on: December 13, 2012, 01:29:03 pm »
I have been away from this forum for a long time. Coming back...

I think my need is related to the present post. I'm Canada and just installed some heating carpets on the stairs outside.
When there is a snow fall forecasted, I would like to turn them on automatically. When the snow stops I would also like to turn off the heating carpets.

If I well understood this thread, I cannot do that at this time (I hope I misunderstood...) ?

For confirmation,

Thanks.

Gaston
Vera2 UI4(1.1.1245/3.2), Kwikset x1, HM-DW001 x1, ZRP100 x1, HA-04WD x1, ZDP100 x6, HSM100 x2, VRI06-1LX x8, ZW5301 x1, HM-FS001 x2, ZRW103W x1, GE 45606 x2, HA05C x1, TED5000 x1

Offline chris66

  • Sr. Member
  • ****
  • Posts: 316
  • Karma: +9/-8
Re: Weather Forecasts?
« Reply #8 on: December 17, 2012, 02:23:04 pm »
Hello Gaston, no, as Garrett said "this functionality will get added soon"

Offline huogas

  • Sr. Member
  • ****
  • Posts: 301
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #9 on: December 17, 2012, 02:53:56 pm »
Ok  :). I will keep an eye on this thread.

Thanks

Gaston
Vera2 UI4(1.1.1245/3.2), Kwikset x1, HM-DW001 x1, ZRP100 x1, HA-04WD x1, ZDP100 x6, HSM100 x2, VRI06-1LX x8, ZW5301 x1, HM-FS001 x2, ZRW103W x1, GE 45606 x2, HA05C x1, TED5000 x1

Offline smadhu

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #10 on: December 23, 2012, 01:13:24 pm »
I have heating mats for snow and a Scene that checks every 30 minutes for current conditiongroup=snow and turns the mats on/off. This works well. However, look forward to the Forecast capability to be able to control by yard irrigation. It will be nice if we can specify the condition as well as the time period for the forecast.

Offline jschaubel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #11 on: December 24, 2012, 08:22:31 am »
I'm doing the same thing with snow mats in Newfoundland that I control from Ontario...  I used the control groups to have them come on with snowing and flurries.  However, the current condition is "light snow" and my mats don't come on. 

I only understand how to use the weather condition (grouped).  I don't get any options when I select weather condition (detailed) - is there something I can do with this option?


Offline smadhu

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #12 on: December 24, 2012, 08:35:43 pm »
this seems to work for me - in Cleveland which may be the only other place that gets as much snow as you...

local t = luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "ConditionGroup", 23)
local s = luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "Condition", 23)
if   ( 
         string.find(t,"snow")
         or string.find(t,"flurries")
         -- since some conditions do not seem to be grouped
         or string.find(s,"snow")
         or string.find(s,"ice") 
         or string.find(s,"freezing")             
     )
then
-- switch ON outside module
 luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"},  8 )
else
-- switch OFF outside module
 luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"},  8 )
end

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Weather Forecasts?
« Reply #13 on: December 24, 2012, 09:45:02 pm »
Can you let me know what the ConditionGroup reads when Condition is freezing, snow or ice?

I'm hoping its just a WUI doc issue...

Offline jschaubel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Weather Forecasts?
« Reply #14 on: December 29, 2012, 09:08:19 am »
Smadhu thanks for the help.  I have not knowledge of luup code, but I'd really like to learn it.

I'm assuming I set up a scene, put your code in and just change the device from :switchpower1 to the name of my device?  is is smart to avoid spaces in device names when writing code?

If I wanted it to turn on when it is raining and less than 2 degrees would it look like this:

local t = luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "ConditionGroup", 23)
local s = luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "Condition", 23)
if   ( 
         string.find(t,"sleet")
         or string.find(t,"rain")
         -- since some conditions do not seem to be grouped
         or string.find(s,"drizzle")
         or string.find(s,"freezing")   
     
     )
and
if   (temperature<2)
         
then
-- switch ON outside module
 luup.call_action("urn:upnp-org:serviceId:front snow mats", "SetTarget", {newTargetValue = "1"},  8 )
else
-- switch OFF outside module
 luup.call_action("urn:upnp-org:serviceId:front snow mats", "SetTarget", {newTargetValue = "0"},  8 )
end

I appreciate your help.  any advice where I can go on the web to learn luup code