Thank you to all the authors and contributors of all the detailed threads. I've spent MANY hours reading the forums, wiki's, and how to's and you'd think by now I'd be capable of writing any script I needed- HA! I wish.
I'm expanding my Insteon setup and need to learn ISY programming-- this is my first crack at writing programs. All of the state, body, condition programming is starting to make sense but I'm still very intimated.
Goal: Turn On/Off coffee maker using the fast On/Off ToggleLinc relay controlling my fluorescent under cabinet lighting. I also don't want to change the status of the under cabinet light. I want to avoid any programming mistakes to prevent future headaches and unwanted surprises.
Question: Are my 4 programs below the most efficient way to accomplish this? (they work but I don't think the light status is ideal) Do I need to create a state diagram with body's, condition's and all that jazz?
The programs below get the job done but I'm not confident they are good. Please chime in with your thoughts as I'd like to add a similar program in the Master Bedroom where the Fan Relay Togglelinc controls the Master Lamps.
First program: Coffee maker fast on.
If
Control 'Kitchen / Under Cabinets' is switched Fast On
And Control 'Kitchen / Under Cabinets' is not switched Fast Off
Then
Set 'Kitchen / Coffee' On
Else
- No Actions - (To add one, press 'Action')
Second program: Same as first program with cabinet light on.
If
-(
| Control 'Kitchen / Under Cabinets' is switched Fast On
| And Control 'Kitchen / Under Cabinets' is not switched Fast Off
| And Status 'Kitchen / Under Cabinets' is Off
-)
Then
Set 'Kitchen / Coffee' On
Set 'Kitchen / Under Cabinets' Off
Else
- No Actions - (To add one, press 'Action')
Third program: Coffee maker fast off
If
Control 'Kitchen / Under Cabinets' is switched Fast Off
And Control 'Kitchen / Under Cabinets' is not switched Fast On
Then
Set 'Kitchen / Coffee' Off
Else
- No Actions - (To add one, press 'Action')
Fourth program: Same as third program with status light on
If
-(
| Control 'Kitchen / Under Cabinets' is switched Fast Off
| And Control 'Kitchen / Under Cabinets' is not switched Fast On
| And Status 'Kitchen / Under Cabinets' is On
-)
Then
Set 'Kitchen / Coffee' Off
Set 'Kitchen / Under Cabinets' On
Else
- No Actions - (To add one, press 'Action')