Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Examples of GetSchEvInfo, SetSchEvTime?
#1
I want to create a screen where I can see and modify the time of scheduled events from within the IV. Are there examples of the GetSchEvInfo or SetSchEvTime anywhere?  Or is anyone doing this where you can send me your templates?

I see this in the docs, but not sure exactly how to use it. 

GetSchEvInfo(path, timevar, maskvar, statevar)
Quote:path: 
The path to the event to get information for
timevar: 
The name of the variable for the schedule info
maskvar: 
The name of the variable for the day or month mask
statevar: 
The name of the variable for the pause state
This command allows you to get information about a scheduled event (one of the daily, weekly, or monthly types.) You provide the path of the event and it fills in three variables that you provide. They receive the start time of the event, the day/month mask, and the paused/un-paused status
The mask has no meaning for daily events. For weekly events it is a list of seven ones or zeros, indicating which days of the week are scheduled. For monthly events it is a list of twelve ones or zeros indicating which months of the year are scheduled. A one means that day or month is scheduled and zero means it is not.
The time value is in the form "dd hh mm", i.e. the day, hour, and minute that the event runs each day, week, or month. The day value isn't meaningful for a daily type event, so just pass zero.


SetSchEvTime(path, timeinfo, mask)
Quote:path: 
The path to the scheduled event to set
timeinfo: 
The schedule info to set
mask: 
The day or month mask to set
This command allows you to set information about a scheduled event (one of the daily, weekly, or monthly types.) You provide the id of the scheduled event, and the runtime and mask. These are the same as described in GetSchEvInfo above. For those scenarios where the mask is used, it cannot be all zeros.
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#2
Trying out various things to no avail. I tried creating both an OnLoad and a command button to call GetSchEvInfo, store into variables, and created 3 variable text fields to display what they have in them so I can see what these things mean. But the text fields aren't showing anything.
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#3
Seems to be working for me. Bring up the action trace when you run the command button and watch the action to see what is happening, i.e. make sure it's not the display thereof that is the issue. I assume you are choosing the path by just clicking the helper button on the path parameter?

Also, if testing in the IV, make sure to disable IV caching, so that you are running the latest changes you just made.
Dean Roddey
Software Geek Extraordinaire
Reply
#4
Keep in mind that not all of the values are valid for all types of events, so some of the values won't be filled in in those cases.
Dean Roddey
Software Geek Extraordinaire
Reply
#5
Yeah, I am working on this now and am as confused as IVB.

Can you explain in a little more detail or provide an example?
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#6
Let me finish up something I'm working on now.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  EventSrv::GetSchEvInfo Question standon 4 1,194 08-15-2014, 08:12 AM
Last Post: standon
  Code samples/examples for betabrite driver? Sendero 4 2,043 05-18-2007, 09:45 AM
Last Post: Squintz

Forum Jump:


Users browsing this thread: 1 Guest(s)