Jump to content

Sending on command to responder that is already on?


Walrus

Recommended Posts

I'm new here, and new to Insteon/ISY. Bought myself an ISY99 IR Pro, PLM, two switchlinc relays and motion sensor for Christmas. Bought it all as a project to get started into home automation. I have one switchlinc controlling the outside pot lights on the lower level, and the 2nd switchlinc controlling the outside pot lights on the 2nd level of my house.

 

I used the ISY to create a scene with both switchlincs as controllers, so when either is toggled manually, both lower and upper pot lights turn on/off.

 

I plan on using the motion sensor for light level sensing to turn on the lights according to light level, instead of sunset. Haven't set it up yet, been away from home.

 

Anyways, for now I created a program to turn the lights on at sunset, and off at 11pm:

 

If

From Sunset

To 11:00:00PM (same day)

 

Then

Set Scene 'Front Outside Lights' On

 

Else

Set Scene 'Front Outside Lights' Off

 

 

Now.. what if someone turns the lights on manually earlier? Is it bad sending an 'on' command to the switchlincs if they are already on? Should I add to the if: And Status Scene 'Front Outside Lights' is Off or doesn't it really matter?

 

Thanks,

Mike

Link to comment

It does no harm to send an "on" command to a device that is already on (or "off" to a device that is already off, or any command for that matter).

 

In fact, there is a world of possibilities using things like an "on" command to a light that is already on.

 

For example, I have my bedroom and bathroom lights set to turn on to 25% if they are off and you switch them off. It is a way to easily turn the lights dimly on if you need to get up during the night.

 

If you have lights on a timer and you want to override the timer, this is another great use. For example, if the light is already on but it is timing down to a shut off shortly, then clicking "on" can abort that timer and allow them to stay on.

 

When writing ISY programs it will help you greatly to understand triggers. In ISY programs, the "if" clause may be re-evaluated (triggered) while the program is still running and in that case, the program is aborted and started over. So if a "then" clause is still running, it will abort (like if you have a "wait" command in it).

 

The most common situation that confuses people is the difference between a "status" and "control". Control statements are only triggers if the actual event happend (ie control on, even if it is already on). So if a program is running and "control on" is the only condition, that program will run to completion unless someone hits "on" on that switch. Also, "control" statements always pertain to the actual device being controlled. "control on" means someone physically pushed the "on" paddle. This is different then "status on" which works no matter how the device became on.

 

Status statments are triggers any time there is any traffic relating to the device. So if you say "status on" in a program the program will abort and re-evaluate the entire "if" clause should any command be sent to that device and it doesn't matter what state the device is currently in.

Link to comment

So.. if I had changed it to the following:

 

If

From Sunset

To 11:00:00PM (same day)

And Status Scene 'Front Outside Lights' is Off

 

Then

Set Scene 'Front Outside Lights' On

 

Else

Set Scene 'Front Outside Lights' Off

 

Would it be re-evaluated if someone turned off the lights between sunset and 11pm? Eg, time is 9pm, lights are on. Someone manually turns the lights off. Status changes to off, if statement is re-evaluated, sees that it is true, and turns the lights on?

 

If that is the case, would this also happen: If someone turned on the lights manually before sunset, and then at sunset the if statement would be re-evaluated, but would be false, so the lights would turn off, because of the Else statement?

Link to comment

I believe you are correct except that scenes do not have a status. You will need to use one or both of the switches to monitor the status.

 

That program will evaluate at

 

1) Sunset

2) 11 pm

3) any time the status is addressed (of whatever switch you choose to watch)

 

You would be better off to write a program that turns the lights on at sunset, and another program that turns them off at 11pm.

Link to comment

Thanks, I don't intend to add the 'if status off' line, I was just trying to expand my knowledge of the programming. From reading on here, the last thing you said makes sense, it seems better to have separate programs for on and off (if you have an and/or in your if statement), and not use the else because it likes to run every time the program is re-evaluated as false.

Link to comment

Sounds like you are starting to get the hang of this.

 

It takes a while and you will still make lots of mistakes and scratch your head saying "why the heck is it doing that?"

 

The ISY programming interface is very powerful but has a few quirks that aren't that intuitive. Once you get to know those things you will start to find it to be a fun challenge to get your programs to do all kinds of subtle things.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...