News:

HOT TIP! Enable the History Window in the main UI when trying to problem solve. It provides a handy log of what is happening. Roll over lines in the History to get more details.

Main Menu

Dusk and Dawn times (possibly in wunderground plugin)

Started by garryjw, March 31, 2014, 06:45:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garryjw

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

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

Quote from: garryjw 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
Sounds reasonable.  Putting it on the list!  ;D

garryjw

Thanks James that is great. At this rate I won't need any other Home Control than VoxCommando. :-)

jitterjames

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


jitterjames

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.

<?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

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

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

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

Cool idea. Haven't managed to automate my curtains yet. I am testing auto lighting coming on at dusk.