Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scheduled Events?
#1
Soo ... I am starting to setup some of my scheduled events now that my scene save appears to be working OK.

I just setup a basic one that runs every weekday (M-F) to turn on CNN at 7AM via a Harmony activity.  I can start the event without issue, but how do I constrain when the event runs?

Do I really need to make 3 events?  The primary 'Start CNN at 7AM', a second one for Stop CNN that would run on Friday to pause the event, and then a third one on Sunday to resume it?

I am going to have quite a few questions as I get deeper into this since my intent is to use a CQC touchscreen as our primary 'alarm clock'.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#2
Hmmm ... is there a way to do this in the action editor? Set the scheduled event to run daily, and then use the IsWeekday in the action editor?
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#3
(01-05-2018, 08:51 PM)jkmonroe Wrote: Soo ... I am starting to setup some of my scheduled events now that my scene save appears to be working OK.

I just setup a basic one that runs every weekday (M-F) to turn on CNN at 7AM via a Harmony activity.  I can start the event without issue, but how do I constrain when the event runs?

Do I really need to make 3 events?  The primary 'Start CNN at 7AM', a second one for Stop CNN that would run on Friday to pause the event, and then a third one on Sunday to resume it?

What are you trying to do, not getting it.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#4
Nothing crazy, I want to set an alarm for Monday through Friday at 7AM.

All that it will do is kick off a Harmony Hub activity.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#5
Yeh, just run it daily. In the action, decide if you really want it to run. That's trivial overhead once a day to run the action and decide to do nothing.
Dean Roddey
Software Geek Extraordinaire
Reply
#6
Think this will work:

Code:
System::GetDayOfWeek
    P1=Short
    P2=GVar:DayOfWeek
    P3=GVar:DayOfWeekName

If 
System::LsThan
    P1=%(GVar:DayOfWeek)
    P2=6

Devices::FieldWrite
    P1=harmony_lr.InvokeCmd
    P2=StartActivity: Morning News
    P3=True

End
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#7
Isn't there a System::IsWeekDay() command? That would do all of that in one shot.
Dean Roddey
Software Geek Extraordinaire
Reply
#8
There is, but I don't know how to use it. It's asking for parameters for the (), I think. Parameter 1 command is required. What would I put in there?

The one I posted above seems to work.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#9
Trying to use the IsWeekday() command. Below is what is in the docs, but it doesn't seem to be accurate. I put a random GVar in for Parameter 1 and it seems to test out OK (doesn't run the action), but I won't be able to really check until Monday.

IsWeekDay() [*]
This command returns True if today is a week day, else False. If you want to check for a week end day, just negate the return value.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#10
It's giving back the day offset (0 though 6.) So provide it with the name of a variable to put it in. I'll fix the docs. Sorry about that.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  FailOnErr in events IVB 6 96 01-01-2018, 06:20 PM
Last Post: Dean Roddey
  Suggestion - Scheduled Events karenlee 2 563 05-10-2017, 05:37 PM
Last Post: Dean Roddey
  Scheduled scripts not running ghurty 21 3,339 05-09-2017, 12:43 PM
Last Post: Dean Roddey
  Scheduled Event - Yearly Basis Bugman 2 619 11-07-2016, 04:44 PM
Last Post: Dean Roddey
  Pause All Scheduled Events? jkmonroe 8 1,325 09-29-2015, 03:51 PM
Last Post: Dean Roddey
  Triggered Events Quit Working kblagron 3 838 07-30-2015, 08:53 AM
Last Post: Dean Roddey
  Minor scheduled event issue dlmorgan999 2 835 07-12-2015, 09:06 AM
Last Post: dlmorgan999
  Unhandled Exception Scheduled Events zra 8 1,376 06-25-2015, 05:54 PM
Last Post: zra
  Events from M1 questions znelbok 3 896 01-25-2015, 08:34 AM
Last Post: Dean Roddey
  Urgent: The Triggers tab does not show in the Manage Events console pseigler 6 1,260 11-12-2014, 07:02 AM
Last Post: pseigler

Forum Jump:


Users browsing this thread: 1 Guest(s)