Please login or register.

Login with username, password and session length

Author Topic: Homegenie scheduler  (Read 2876 times)

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Homegenie scheduler
« on: December 06, 2018, 11:31:40 PM »

I posted the following on the HG club site a couple days ago but as I suspected, the page is devoid of traffic so no response.  If anyone gotten into the scheduler maybe a little advise.  I was very well acquainted with the old scheduler, but the new one should be much better (if I knew how to use it).


I’m having an issue with my wife’s schedule for her holiday lighting. I had it set up with the old scheduler and it worked fine. I decided to switch over to using the “new” version (yeah, it’s a couple years old now) and I can’t get lights to work. I’m hoping someone can help me set it up correctly.

What I need is to turn ON between Thanksgiving or Black Friday and January 1 at sunset. I need it turn OFF between the same dates and at 10:30pm. Here’s what I have which doesn’t seem to work:

ON:
(@BlackFriday > @NewYearsDay);@SolarAltitude.Evening.Sunset.Start

OFF:
(@BlackFriday > @NewYearsDay);(30 22 * * *)

BlackFirday:
59 59 23 ? 11 THU#4 *

NewYearsDay:
0 0 0 1 1 ? *

I’d like to get this fixed ASAP so any suggestions would be greatly appreciated.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Homegenie scheduler
« Reply #1 on: December 07, 2018, 07:41:11 AM »

It might be a good idea to post a issue at https://github.com/genielabs/HomeGenie/issues perhaps Gene can shed some light on the new scheduler. Or you may jave stubled on a bug. Since he is working on a new HG version to be ready for Christmas it would be good for him to look at that section of code
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Homegenie scheduler
« Reply #2 on: December 07, 2018, 11:16:33 AM »

I knew I asked the question on the old HG forum but couldn't find it until just last night.  I believe I found the issue and I suppose it makes sense...It's just not exactly how I thought the scheduler worked.  I can't access the HG club site from work for filtering reasons so I can't post the link.

Anyway, the way the old scheduler works is you specify a specific time/date combination via a crontab formatted statement into the "Scheduled On/Off" app for a module.  When the app runs (2x per minute) and the condition matches it will fire the event (2x generally 30 seconds apart).  With the new scheduler, you can specify an event as a range.  So, instead of saying "I want the lights to turn on if the month is 11 or 12 and at sunset", you can instead say "I want the lights to turn on if the date is between black friday and new years and the time is sunset".  The subtle difference is that the old way will trigger at the minute of sunset in Nov and Dec whereas the new scheduler will trigger if the date is between black friday and new years and after sunset.  In other words, the event will trigger ON when it's after sunset every time it runs the code in the new model.  The same happens for the OFF event.  As a result, things don't quite work as expected.  (I can't access the thread, so I may have slightly messed that up.)

I modified the events last night and hopefully they will work.  I'll know when I get home since the lights should be on.   :'

In any case, the current scheduler is better but it requires understanding when events will fire so things will operate as expected.  I'm not sure I'd consider this a bug because the person who helped back then was working with Gene on that section of code IIRC.

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 160
  • Posts: 1458
Re: Homegenie scheduler
« Reply #3 on: December 07, 2018, 11:44:34 AM »

Just a thought... Could the change of year be an issue? IOW, if you changed it to New Years Eve instead of NY Day might that make a difference?
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Homegenie scheduler
« Reply #4 on: December 07, 2018, 02:41:13 PM »

Could be, not sure.  I currently reverted back to 11,12 rather than black friday to new years day.  Yes, it could be that HG doesn't know that I want Nov and Dec and actually be trying to use Jan thru Nov.
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.