Announcement

Collapse
No announcement yet.

Scripts for Holiday Toggle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scripts for Holiday Toggle

    BLGData_Calendar - Holiday Today.vb Version 1.0 dtd Dec 26, 2016
    BLGData_Calendar - Holiday Tomorrow.vb Version 1.02 dtd Dec 28, 2016

    All,

    While Blade searches for a solution to my issues with the Handlers See post: http://board.homeseer.com/showpost.p...84&postcount=1 , I decided to take a shot at writing scripts that access the BLGData Objects to do what I need. As I worked on these I realized that the Handlers will not do what I want as currently coded, but I hope Blade will take look at these scripts and add the functionality into the Handlers.

    Note: I'm still learning vb, so I'm sure there are more eloquent ways to achieve the same result with far fewer lines of code.

    Holiday Tomorrow Script: Looks at calendar events for the next day and toggles a virtual device "ON" 24 hours before the event occurs. It also toggles a virtual device "OFF" at the end of the day.

    Holiday Today Script: Toggles a virtual device "ON" during the duration of the calendar event.

    Calendar Trigger Words: The script looks for the any of the following in the calendar event:
    -" Day": For example the event might be "Christmas Day" the keywork includes the space before the word Day.
    -"RDO": This is uses for a non standard work schedule. In my case I work 80 hours in 0 days (8-9 hour days, 1-8 hour day, and I'm off a day). The Regular Day Off is abbreviated RDO.
    -"Leave": Self explanatory

    Parameters to pass to the script from the event (Parm1,Parm2,Parm3):
    Parm1: Virtual Device Reference ID
    Parm2: Gmail Account
    Parm3: Gmail Calendar Name

    Currently, I'm using these scripts to toggle my Thermostats from Workday to Non-WorkDay settings.

    Kesterf

    Click image for larger version

Name:	Devices.jpg
Views:	1
Size:	15.4 KB
ID:	1210324

    Click image for larger version

Name:	Event - [BLGData - Calendar - Holiday Today].jpg
Views:	1
Size:	63.4 KB
ID:	1210325

    Click image for larger version

Name:	Event - [BLGData - Calendar - Holiday Tomorrow].jpg
Views:	1
Size:	64.3 KB
ID:	1210326
    Last edited by kesterf; December 28th, 2016, 08:44 PM. Reason: updated script versions
Working...
X