more G-Labs products

Author Topic: Need help with proper usage of @Sunset  (Read 1605 times)

January 12, 2015, 01:25:44 AM
Read 1605 times

gs001

  • *
  • Information
  • Newbie
  • Posts: 21
Hello all,

I'm new to Homegenie, and this is my first post. I have a couple of questions, one of which I'll ask now, and one that I'll post in a separate topic.

I have Beta r453 running on a RasPi B+ using zwave.

What is the proper usage of @Sunset or @SolarAltitude_Evening_Sunset_Start in the Events Scheduler?

I have several Z_Wave modules installed, and they all work well for timed On/Off using Cron Expressions in the Scheduler. However, I haven't been able to use @Sunset or  @SolarAltitude items in Cron Expressions.

Is the proper form (assuming I want the light to come on at sunset every day):

@Sunset * * *

or

@Sunset * * * *

or just

@Sunset

I've tried the first two forms, and the event never fires. I asume I am using the items incorrectly.

I've gone to 'Configure/Weather and Environment/Weather Underground' and
'jkUtils-Solar Altitude...' and configured both (Weather Underground - entered Key and location. jkUtils - configured Lat and Lon, and enabled both plugins.) The weather and sunrise/sunset information appears to be accurate in both modules when placed into a group for viewing.

Right now I'm lost. Any help would be greatly appreciated.

Gary Sanders

January 12, 2015, 04:07:09 AM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You don't nerd tout put the stars. Look at Scheduler module in the Configuration.
You can also take a look at CRONTAB expression in wikipedia for inderstanding or look at this link : http://www.homegenie.it/docs/scheduler.php

January 12, 2015, 04:07:58 AM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Short answer:
Code: [Select]
@Sunset
Long answer:
The expressions in the scheduler are sort of a shortcut.  If you go to the Scheduler section of the configuration menu, you will find "Sunset" listed near the top.  If you click look at the item, you will see that it holds the cron string that will be used.  For me, this is what @Sunset will convert to for today:
Code: [Select]
39 16 * * *
You can combine these Scheduler variables with the standard crontab format to create more complex statements such as:
Holiday lights ON:
Code: [Select]
@SolarAltitude.Evening.Sunset.Start;* * * 11,12 *Holiday lights OFF:
Code: [Select]
(30 22 * 11,12 *):(@SolarAltitude.Morning.Sunrise.End;* * * 11,12 *)

January 12, 2015, 06:28:15 AM
Reply #3

gs001

  • *
  • Information
  • Newbie
  • Posts: 21
Thanks bkenobi for the concise answer. I was under the mistaken impression that @Sunset would evaluate to just hour and minute - thanks for putting me on the right path.

I've made the appropriate corrections to my schedules, and hopefully I'll be in business.

Gary Sanders