home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR9
/
X10XA200.ZIP
/
XA.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-10-16
|
10KB
|
260 lines
DISPLAY OFF
#
# ┌─────────────────────────────────────────────────────────────────┐
# │ │
# │ XA - X10 Command Interpreter for the CP-290 - Version 2.00 │
# │ Copyright 1991-93 by Bruce Christensen. All Rights Reserved. │
# │ │
# └─────────────────────────────────────────────────────────────────┘
#
#──────────────────────────────────────────────────────────────────────────────
#
#
# IF NONE OF THIS MAKES SENSE....
# ....READ THE MANUAL (XA.TXT)
#
#
#──────────────────────────────────────────────────────────────────────────────
#
# You can pass arguments to a command file and 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"
#
# The following tokens are not activated for the SHAREWARE version...
#IF (vacation)
# DISPLAY ON
# Entrance_Chandelier ON TIME 9:30 PM RANDOM 15 TODAY
# Entrance_Chandelier 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
# Sunday's events:
DECK_LIGHTS_1 ON SUNDAY SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 SUNDAY DUSK
DECK_LIGHTS_1 OFF SUNDAY SUNSET OFFSET 1:30
LIVING_ROOM_LAMP OFF SUNDAY TIME 11:30 PM
LIVING_ROOM_LAMP ON SUNDAY DUSK
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:30 PM RANDOM +15
# Monday's events:
LIVING_ROOM_LAMP ON MONDAY DUSK
LIVING_ROOM_LAMP OFF MONDAY TIME 11:30 PM
DECK_LIGHTS_1 ON MONDAY SUNSET
DECK_LIGHTS_1 DIM 50 MONDAY DUSK
DECK_LIGHTS_1 OFF MONDAY SUNSET OFFSET 1:30
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:30 PM RANDOM +15
# Tuesday's events:
LIVING_ROOM_LAMP ON TUESDAY DUSK
LIVING_ROOM_LAMP OFF TUESDAY TIME 11:30 PM
DECK_LIGHTS_1 ON TUESDAY SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 TUESDAY DUSK
DECK_LIGHTS_1 OFF TUESDAY SUNSET OFFSET 1:30
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:30 PM RANDOM +15
# Wednesday's events:
LIVING_ROOM_LAMP ON WED DUSK
LIVING_ROOM_LAMP OFF WED TIME 11:30 PM
DECK_LIGHTS_1 ON WED SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 WED DUSK
DECK_LIGHTS_1 OFF WED SUNSET OFFSET 1:30
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:30 PM RANDOM +15
# Thursday's events:
LIVING_ROOM_LAMP ON THU DUSK
LIVING_ROOM_LAMP OFF THU TIME 11:30 PM
DECK_LIGHTS_1 ON THU SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 THU DUSK
DECK_LIGHTS_1 OFF THU SUNSET OFFSET 1:30
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:30 PM RANDOM +15
# Friday's events:
LIVING_ROOM_LAMP ON FRIDAY DUSK
LIVING_ROOM_LAMP OFF SATURDAY TIME 12:30 PM
DECK_LIGHTS_1 ON FRIDAY SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 FRIDAY DUSK
DECK_LIGHTS_1 OFF FRIDAY SUNSET OFFSET 1:30
FAMILY_ROOM_LAMP ON FRIDAY SUNSET OFFSET -1:00
FAMILY_ROOM_LAMP OFF SATURDAY TIME 12:30 PM
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:30 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
DECK_LIGHTS_1 ON SATURDAY SUNSET OFFSET 5
DECK_LIGHTS_1 DIM 50 SATURDAY DUSK
DECK_LIGHTS_1 OFF SATURDAY SUNSET OFFSET 1:30
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:30 PM RANDOM +15
# Other events:
DEHUMIDIFIER ON EVERYDAY ON TIME 5:00 AM
DEHUMIDIFIER OFF EVERYDAY OFF TIME 9:00 AM
DEHUMIDIFIER ON EVERYDAY ON TIME 5:00 PM
DEHUMIDIFIER OFF EVERYDAY OFF TIME 9:00 PM
HALLWAY OFF EVERYDAY DAWN
STAIRS DIM 40 EVERYDAY DUSK
STAIRS DIM 25 EVERYDAY TIME 11:00 PM
STAIRS OFF EVERYDAY DAWN
HALLWAY DIM 25 SCHOOL_NIGHTS TIME 8:25 PM
HALLWAY DIM 25 FRI SAT TIME 9:45 PM
#
#──────────────────────────────────────────────────────────────────────────────
#
# 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
#
# Turn ON various lights on weekday mornings only when sunrise occurs
# at least 1 hour after they're needed.
#
# The following tokens are not activated for the SHAREWARE version...
# 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.