home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
UTILS2
/
X10XA2.ZIP
/
XA.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-01-15
|
10KB
|
257 lines
DISPLAY OFF
#
# ┌──────────────────────────────────────────────────────────────────┐
# │ │
# │ XA - X10 Command Interpreter for the CP-290 - Version 2.1 │
# │ Copyright 1991-1994 by Bruce Christensen. All Rights Reserved. │
# │ │
# └──────────────────────────────────────────────────────────────────┘
#
#──────────────────────────────────────────────────────────────────────────────
#
#
# IF NONE OF THIS MAKES SENSE....
# ....READ THE MANUAL (XA_201.TXT)
#
#
#──────────────────────────────────────────────────────────────────────────────
#
# * * * * * * * * * * * SHAREWARE VERSION * * * * * * * * * * * * * * * *
#
# IF/ELSE/ENDIF, VARIABLES, LOGICAL-BOOLEAN-ARITHMETIC LOGIC HAS BEEN
# DISABLED FROM THE SHAREWARE VERSION. YOU MUST REGISTER THIS SOFTWARE
# TO HAVE THESE FEATURES ACTIVATED.
#
# You can pass arguments to a command file and have it react accordingly.
# If you pass a non-zero variable and test it with the IF statement, it will
# result in a TRUE condition. For example:
# XA f=xa.cmd "vacation = 1"
#
#
# IF (vacation)
# DISPLAY ON
# Security_Lights ON TIME 9:30 PM RANDOM 15 TODAY
# Security_Lights OFF TIME 10:30 PM RANDOM 15 TODAY
# DISPLAY OFF
#
# ELSE # Do all the other things...
#
#──────────────────────────────────────────────────────────────────────────────
#
# Produce a report file listing events for each day. Use REPORT1 to
# generate a listing events in the order they occur for each day.
# Use REPORT2 to list events for each day by module.
REPORT1
#
#──────────────────────────────────────────────────────────────────────────────
#
# The next token (ERASE) will remove all events from the CP-290
# memory. You are advised to use this when you use the DATE token for
# programming specific events. This ensures that when the event has
# passed, it will be deleted. Since every one of your events should
# be included in this file, there is no need to worry about erasing them
# now...they will be downloaded automatically.
ERASE
#
#──────────────────────────────────────────────────────────────────────────────
#
# Set the X10 clock to the time and date of your PC's internal clock.
# Use the optional "EXACT" token to wait for the seconds counter to
# rollover to 0.
SYNCHRONIZE X10 EXACT
#
#──────────────────────────────────────────────────────────────────────────────
#
# Set the PC clock to the time of your X10's internal clock.
# Use the optional "EXACT" token to wait for the seconds counter to
# rollover to 0.
#
# Note: There is not enough information from the X10 to set the date.
#SYNCHRONIZE PC EXACT
#
#──────────────────────────────────────────────────────────────────────────────
#
# The following are a set of commands that are downloaded weekly. See the
# documentation for full details - but here's a synopsis:
# Every Sunday morning at 3:00, the computer is turned on via X10. As
# DOS executes AUTOEXEC.BAT, a utility supplied with this package,
# POWERUP.EXE will return an ERRORLEVEL of 1 if the current time is
# within a range that you specify. This errorlevel can then be used to
# invoke XA.EXE to download another weeks worth of events, or you can use
# it to call other programs as well, for instance: backup programs,
# communications, etc. See the documentation for more details.
#
# Note the use of the SUNRISE and SUNSET tokens. These tokens will
# calculate the exact time of sunrise or sunset for your city assuming
# LATITUDE, LONGITUDE, and TIMEZONE were all entered correctly.
# This avoids having to constantly enter a new time for your outdoor lights.
DISPLAY ON
#INCLUDE INC1.CMD # Include other command files...
# Sunday's events:
LIVING_ROOM_LAMP OFF SUNDAY TIME 11:30 PM
LIVING_ROOM_LAMP ON SUNDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP ON SUNDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF SUNDAY TIME 11:30 PM
BEDROOM_LIGHT ON SUNDAY TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF SUNDAY TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 SUNDAY SUNSET
OUTSIDE_PORCH_LIGHTS OFF SUNDAY TIME 10:35 PM RANDOM +15
# Monday's events:
LIVING_ROOM_LAMP ON MONDAY SUNSET OFFSET -1:00
LIVING_ROOM_LAMP OFF MONDAY TIME 11:30 PM
FAMILY_ROOM_LAMP ON MONDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF MONDAY TIME 11:30 PM
BEDROOM_LIGHT ON MONDAY TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF MONDAY TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 MONDAY SUNSET
OUTSIDE_PORCH_LIGHTS OFF MONDAY TIME 10:35 PM RANDOM +15
# Tuesday's events:
LIVING_ROOM_LAMP ON TUESDAY SUNSET OFFSET -1:00
LIVING_ROOM_LAMP OFF TUESDAY TIME 11:30 PM
FAMILY_ROOM_LAMP ON TUESDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF TUESDAY TIME 11:30 PM
BEDROOM_LIGHT ON TUESDAY TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF TUESDAY TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 TUESDAY SUNSET
OUTSIDE_PORCH_LIGHTS OFF TUESDAY TIME 10:35 PM RANDOM +15
# Wednesday's events:
LIVING_ROOM_LAMP ON WED SUNSET OFFSET -1:00
LIVING_ROOM_LAMP OFF WED TIME 11:30 PM
FAMILY_ROOM_LAMP ON WED SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF WED TIME 11:30 PM
BEDROOM_LIGHT ON WED TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF WED TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 WED SUNSET
OUTSIDE_PORCH_LIGHTS OFF WED TIME 10:35 PM RANDOM +15
# Thursday's events:
LIVING_ROOM_LAMP ON THU SUNSET OFFSET -1:00
LIVING_ROOM_LAMP OFF THU TIME 11:30 PM
FAMILY_ROOM_LAMP ON THU SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF THU TIME 11:30 PM
BEDROOM_LIGHT ON THU TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF THU TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 THU SUNSET
OUTSIDE_PORCH_LIGHTS OFF THU TIME 10:35 PM RANDOM +15
# Friday's events:
LIVING_ROOM_LAMP ON FRIDAY SUNSET OFFSET -1:00
LIVING_ROOM_LAMP OFF SATURDAY TIME 12:30 AM
FAMILY_ROOM_LAMP ON FRIDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF SATURDAY TIME 12:30 AM
BEDROOM_LIGHT ON FRIDAY TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF FRIDAY TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS DIM 80 FRIDAY SUNSET
OUTSIDE_PORCH_LIGHTS OFF FRIDAY TIME 10:35 PM RANDOM +15
# Saturday's events:
OUTSIDE_PORCH_LIGHTS DIM 80 SATURDAY SUNSET
LIVING_ROOM_LAMP ON SATURDAY DUSK
LIVING_ROOM_LAMP OFF SUNDAY TIME 12:30 AM
FAMILY_ROOM_LAMP ON SATURDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF SUNDAY TIME 12:30 AM
BEDROOM_LIGHT ON SATURDAY TIME 10:30 PM RANDOM +15
BEDROOM_LIGHT OFF SATURDAY TIME 1:30 AM
OUTSIDE_PORCH_LIGHTS OFF SATURDAY TIME 10:35 PM RANDOM +15
# Miscellaneous Events:
DEHUMIDIFIER ON EVERYDAY ON TIME 6:00 AM
DEHUMIDIFIER OFF EVERYDAY OFF TIME 12:00 PM
DEHUMIDIFIER ON EVERYDAY ON SUNSET
DEHUMIDIFIER OFF EVERYDAY OFF SUNSET OFFSET 6:00
HALLWAY STAIRS DIM 40 EVERYDAY SUNSET
HALLWAY STAIRS DIM 40 TIME 8:30 PM DATE 1/1 THRU 5/1
HALLWAY STAIRS DIM 40 TIME 8:30 PM DATE 9/1 THRU 12/31
HALLWAY STAIRS DIM 25 EVERYDAY TIME 10:30 PM
HALLWAY STAIRS DIM 25 EVERYDAY TIME 11:30 PM
HALLWAY STAIRS OFF EVERYDAY DAWN
DECK_LIGHTS_1 ON SUNSET OFFSET 5 DATE 4/1 THRU 9/31
DECK_LIGHTS_1 DIM 50 DUSK DATE 4/1 THRU 9/31
DECK_LIGHTS_1 OFF SUNSET OFFSET 1:30 DATE 4/1 THRU 9/31
KATHRYNS_PC ON SUNSET OFFSET 15 THANKSGIVING THRU NEW_YEARS_DAY
OUTSIDE_PORCH_LIGHTS DIM 50 SUNSET OFFSET 15 THANKSGIVING THRU NEW_YEARS_DAY
CHRISTMAS_LIGHTS ON SUNSET OFFSET 15 THANKSGIVING THRU NEW_YEARS_DAY
CHRISTMAS_LIGHTS OFF TIME 10:32 PM THANKSGIVING THRU NEW_YEARS_DAY
#
#──────────────────────────────────────────────────────────────────────────────
#
# The following event occurs every Sunday at 3:00 AM.
# When used in conjuction with POWERUP.EXE (in AUTOEXEC.BAT)
# we can automatically download new commands an a weekly basis.
# For example, sunrise and sunset change from day to day. The X10
# computer interface can store these times for 1 week, then it
# needs to be updated with new times.
#
# Additional note: Backups are now performed during this time, as
# well as having all the drives optimized. See the sample
# AUTOEXEC.BAT file supplied with this package.
#
#
# Note: The sample AUTOEXEC.BAT contains the command: XA "PC OFF"
# after the download, optimizations, and backups have been performed.
# But just in case something went wrong (like leaving a floppy in Drive A),
# we'll have the CP-290 turn the computer off 2 hours later.
COMPUTER ON SUNDAY TIME 3:00
COMPUTER OFF SUNDAY TIME 5:00
# * * * * * * * * * * * SHAREWARE VERSION * * * * * * * * * * * * * * * *
#
# IF/ELSE/ENDIF, VARIABLES, LOGICAL-BOOLEAN-ARITHMETIC LOGIC HAS BEEN
# DISABLED FROM THE SHAREWARE VERSION. YOU MUST REGISTER THIS SOFTWARE
# TO HAVE THESE FEATURES ACTIVATED.
#
#
# Turn ON various lights on weekday mornings only when sunrise occurs
# at least 30 minutes after they're needed.
#
#
# IF (SUNRISE > TIME 6:00)
# OUTSIDE_PORCH_LIGHTS DIM 80 WEEKDAYS TIME 5:30 RANDOM 10
# OUTSIDE_PORCH_LIGHTS OFF WEEKDAYS SUNRISE
#
# LIVING_ROOM_LAMP ON WEEKDAYS TIME 5:35 RANDOM 10
# LIVING_ROOM_LAMP OFF WEEKDAYS SUNRISE OFFSET 10
# ENDIF
#
#
#
# ENDIF # from IF (vacation)
#
# That's all folks.