Package: Schedule Maker

Author: HCA Central
Version: 2
Added to Library: 11-Nov-23
HCAVersion needed: 17.0.58
Keywords: Utility
Extra Info Link: Here

Package Description:
See technical note #141 on the HCA Website for how to use this

Program: Away over 24 hours

Program Description:
Switches to the "vacation" schedule.

NOTE: The name of that schedule is provided by a tag on the "Configure schedule for today" program.

Program: Choose Schedule For Today

Program Description:
Given a date, finds the log file for that date or searches back in time day by day to find a log file. Gives up after 30 days.

Return value: Path to the log file to use

Parameters:

Name Type Description Default
Date Value The date to choose the schedule for  

Program: Configure Schedule For Today

Program Description:
The goal is to create a schedule based upon what happens in the home on a day. Perhaps to have a schedule that controls devices to make the home look "lived in". To do this it finds the actions taken on a day and creates a schedule that does the same things.

If you have this package in place for a whole year, then it has a log file for every day of the year. Because of that, there is a seasonally appropriate model day that can be used. Until then, it will just use the actions from a previous day.

Once it selects a log file to use it generates a schedule.

You can schedule this program to run shortly after midnight to create a schedule for the coming day. In addition, schedule the package program "Schedule to run at 00_01" at 1 minute after midnight. This makes it ready tot record today's actions.

Configure these tags before running the program.

Required tag: VacSchedule

The name of the schedule to clear and then add entries to. Creates the schedule if it doesn't already exists.

Required tag: VacScheduleParent

If the schedule named in the "TheSchedule" tag value doesn't exist then a new schedule created is as a child of this schedule. Value may be "" in which case the created schedule is a top-level schedule.

Optional tag: UseSetPercentNotOn

Has a value of 0 or 1.

If this tag is added to this program on the tags tab with a value of 1, then any schedule entries for devices that go to 100% are created with a set-percent and not an ON command. This is important for some devices where an ON just goes to the previous percentage. This tag can also be in the tags of a device. If present, then the value of the tag for that device takes precedence over the tag value in this program.

Optional tag: Vary

If this tag is present its value is the number of minutes that the created schedule entries can vary from the specified time when executed.

Program: On Home Mode Change

Program Description:
The intent of this program is to see if the home remains in "Away" mode for over 24 hours and if that's the case it switches to the "vacation" schedule. This assumes that you have the two home modes "home & awake" and "Away" and you are making use of the home mode concept.

This program starts when the home mode changes.

If the home mode changes to the "Away" mode, then a secondary program "Away over 24 hours" is started but delayed for 24 hours.

If the home mode changes to "home & awake" or "home & asleep" mode, then the normal schedule is made the current schedule and any pending execution of the "Away over 24 hours" program is cancelled.

The secondary program "Away over 24 hours" when it executes switches to the "vacation" schedule.

If you want to use this program, then there are some things to do:

Step 1:

This program has a tag named "enable". If it is set to '0' then the program doesn't function. If you want to use this program set it to '1'.

Step 2.

Edit these tags on the package program "Configure Schedule For Today" That's a different program than this one!

AtHomeSchedule: The name of your "normal" schedule. The schedule that should be the current schedule when you are at home. Default is "Home"

VacSchedule: The name of the schedule for when you are away for over 24 hours. This is the schedule that the program "Configure schedule for today" creates. Default is "Vacation".

If you don't use these same home modes or changed their names from the defaults, then you must modify the program and the triggers.

Program: On State Change

Program Description:
Handler for a state change for any device. If the device has the tag AutoSchedule - no tag value needed - then the state change information is saved to today's log file.

The log files are stored in the HCA documents area in the "Daily Happenings" sub-folder.

Parameters:

Name Type Description Default
Object Object Object whose state changed  
Percent Value New percent of that object  

Program: Schedule to run at 00_01

Program Description:
Delete the current day log file. Schedule this program to run just after midnight. This clears the log file for this day to record today's actions anew.