Jump to content

Not sure how to write this one


andrew77

Recommended Posts

Posted

In my ISY, how would I write a program that the condition was

If no light switch has been touched for four hours (let's say)

then turn on some indoor and outdoor lights (because I'm obviously not home and want lights on when I arrive).

 

Drew

Posted

Drew,

 

Try this:

 

If

x is off

And y is off

....

And z is off

Then

wait 4 hours

turn w on

turn u on

Else

 

With kind regards,

 

 

In my ISY, how would I write a program that the condition was

If no light switch has been touched for four hours (let's say)

then turn on some indoor and outdoor lights (because I'm obviously not home and want lights on when I arrive).

 

Drew

Posted
In my ISY, how would I write a program that the condition was

If no light switch has been touched for four hours (let's say)

then turn on some indoor and outdoor lights (because I'm obviously not home and want lights on when I arrive).

 

Drew

Andrew, what happens when you are asleep and no switches are touched for four hours?

Posted

Good one, Joe.

Maybe I can have it run only between the hours of (?) and (?)

or have it run only if it's also before a certain hour of the night (say 11:00pm?)

 

Drew

Posted

Yes, I think you would want to add a qualifier, such as the ones you have listed.

 

An alternative would be to have a Home/Away KPL button that you push when you leave, and push again when you return. Upon leaving, it could do things like turn all lights off, or perhaps start an 'Away' schedule to give your house an occupied look for security. Or, if you have a security panel, you could tie it in so that arming/disarming would serve that same function.

Posted

As you can probably tell, I'm at the start of using my ISY.

I've had the insteon stuff for a while and tried Houselinc but was left a little frustrated.

I need to learn more about IF and THEN and Qualifiers.

 

I've been to the WIKI site and it's okay but not really informative.

Is there a site or a particular forum that's got a good education on starting to program the ISY?

 

Drew

Posted

Hi Drew,

 

Have you checked out the following?

 

ISY Programming forum: http://forum.universal-devices.com/viewforum.php?f=13

ISY Example Programs forum: http://forum.universal-devices.com/viewforum.php?f=14

 

With kind regards,

Michel

 

As you can probably tell, I'm at the start of using my ISY.

I've had the insteon stuff for a while and tried Houselinc but was left a little frustrated.

I need to learn more about IF and THEN and Qualifiers.

 

I've been to the WIKI site and it's okay but not really informative.

Is there a site or a particular forum that's got a good education on starting to program the ISY?

 

Drew

  • 2 months later...
Posted

I know this is an old thread but I've just gotten around to this idea again.

What I want is this.

If we're not home then this program will run.

I'm assuming that if the Big Room, or the Hall, or the Kitchen is off then we're not home as these lights are in all scenes.

Here's my program

 

 

If

Time is Sunset + 30 minutes

And Status 'Hall KPL A Hall Light' is Off

And Status 'Big Room' is Off

And Status 'Kitchen' is Off

 

Then

Set Scene 'All Dim' On

Set 'Deck KPL A Decklight' 65%

Send Notification to All

Set 'Barn' 70%

 

Else

- No Actions - (To add one, press 'Action')

 

Does anyone see a problem here?

Is there an easier way to do this?

 

And what is the ELSE section for?

 

Now that the forum has been reorganized, I can't follow those links found above anymore.

 

Drew

Posted

Drew,

 

A couple of potential problems with the below -

 

1) I don't see where you are turning your lights off (another program possibly).

2) In your "THEN" statement - you are activating the "ALL DIM" scene. If this changes the status of the devices in your "IF" statement (HALL KPL, Big Room, or Kitchen), your conditional will retrigger and revert to a "false". The statements following your "ALL DIM" scene may not be executed.

 

Rather than "inferring" that you're not at home from the status of your lights, would it be easier to dedicate a KPL button to "AWAY MODE"?

 

If

Time is Sunset + 30 Minutes

And Status "Away Mode" is ON

 

Then

.

.

.

 

IM

 

I know this is an old thread but I've just gotten around to this idea again.

What I want is this.

If we're not home then this program will run.

I'm assuming that if the Big Room, or the Hall, or the Kitchen is off then we're not home as these lights are in all scenes.

Here's my program

 

 

If

Time is Sunset + 30 minutes

And Status 'Hall KPL A Hall Light' is Off

And Status 'Big Room' is Off

And Status 'Kitchen' is Off

 

Then

Set Scene 'All Dim' On

Set 'Deck KPL A Decklight' 65%

Send Notification to All

Set 'Barn' 70%

 

Else

- No Actions - (To add one, press 'Action')

 

Does anyone see a problem here?

Is there an easier way to do this?

 

And what is the ELSE section for?

 

Now that the forum has been reorganized, I can't follow those links found above anymore.

 

Drew

Posted
And what is the ELSE section for?

 

Anybody know what this is for and how to use it? I've noticed that none of the programs that people post here use this section of the If THEN ELSE program.

Maybe it's something I should stay away from until i know better.

 

Drew

Posted

Drew,

 

The else loop is executed when your "IF" condition evaluates to a false.

 

In the example below, if both the Time and the Away conditions are true the "then" loop is executed (executing the away scene).

 

If either of the conditions are false, the "else" loop is executed (turning the scene off).

 

If

Time is from Sunset + 30 Minutes

to Sunrise (next day)

And Status "Away Mode" is ON

 

Then

Set Scene 'All Dim' On

Set 'Deck KPL A Decklight' 65%

Send Notification to All

Set 'Barn' 70%

 

Else

Set Scene 'All Dim' off

Set 'Deck KPL A Decklight' off

Set 'Barn' off

 

IM

Guest
This topic is now closed to further replies.

×
×
  • Create New...