Author Topic: Dusk and Dawn times (possibly in wunderground plugin)  (Read 2282 times)

0 Members and 1 Guest are viewing this topic.

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Dusk and Dawn times (possibly in wunderground plugin)
« on: March 31, 2014, 06:45:04 PM »
Hi

It would be really useful to be able to get dawn and dusk times. I'm pretty sure Weather Underground have these in the astronomy section but I couldn't see them in the plug-in.

Thanks
Garry

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #1 on: March 31, 2014, 07:35:10 PM »
I'm not sure, but this feature exist in the WU api: http://www.wunderground.com/weather/api/d/docs?d=data/astronomy

maybe you can use it with the WUnder.GetCustom action.
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #2 on: March 31, 2014, 07:55:20 PM »
Hi

It would be really useful to be able to get dawn and dusk times. I'm pretty sure Weather Underground have these in the astronomy section but I couldn't see them in the plug-in.

Thanks
Garry
Sounds reasonable.  Putting it on the list!  ;D

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #3 on: March 31, 2014, 07:56:28 PM »
Thanks James that is great. At this rate I won't need any other Home Control than VoxCommando. :-)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #4 on: April 03, 2014, 01:23:06 PM »
Here is new version of the Weather Underground plugin with astronomical variables (attached).

I will include this in the next alpha release, but there is no reason you should have to wait for that, so, just replace the appropriate file.

The version of the attached plugin dll is 0.2.1.0

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #5 on: April 03, 2014, 04:44:11 PM »
Fabulous - many thanks.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #6 on: April 03, 2014, 05:02:05 PM »
Just for the sake of "whateverness" here is another way to do it with scrape.  Admitedly it might not work the same for everyone, or google might do something to break it, so the Wunder method is probably still better, as long as our api key keeps working.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.1.9-->
<command id="166" name="scrape sunrise" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>scrape</cmdType>
    <params>
      <param>https://www.google.ca/search?q=when+is+sunrise%20in%20Morin-Heights</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>td.class="r"&gt;&lt;b&gt;(.*?)&lt;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{Match.1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #7 on: April 03, 2014, 05:05:02 PM »
By the way, I think percentIlluminated refers to how full the moon is.  In any case it does not have anything to do with sunshine or weather, it is some kind of a moon-related value for sure.

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #8 on: April 03, 2014, 05:18:11 PM »
I guess if I was really clever I could work out when to turn the lights on by checking to see if the sky was clear and whether there was a lot of illumination from the moon.  ???

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #9 on: April 03, 2014, 06:27:08 PM »
Dunno, but I do know this:

When there is a full moon you want to close the bedroom blinds at night.

But then again you might want to do that anyway...
Either way I'm doing it the old fashioned way. ;)

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: Dusk and Dawn times (possibly in wunderground plugin)
« Reply #10 on: April 04, 2014, 07:35:32 AM »
Cool idea. Haven't managed to automate my curtains yet. I am testing auto lighting coming on at dusk.