Jump to content

Can one program turn a devices on & off?


RichTJ99

Recommended Posts

Posted

Hi,

 

I am trying to use a program for Echo.  

 

Living Room Program:

Turn Light 1 - Fast On

Turn Light 2 - Fast off

 

Is there a way for me to use a single program to alter the lights state?  

 

So if the light is off, saying turn on will run the program, or if the light is off, turning the program off will run the program (changing the lights to the opposite state)?  

 

Basically I am running out of links on my PLM so I am trying to get rid of a scene - plus the devices seem to work for fast on only (different issue).

 

Thanks,

Rich

Posted (edited)

Hi,

 

I am trying to use a program for Echo.  

 

Living Room Program:

Turn Light 1 - Fast On

Turn Light 2 - Fast off

 

Is there a way for me to use a single program to alter the lights state?  

 

So if the light is off, saying turn on will run the program, or if the light is off, turning the program off will run the program (changing the lights to the opposite state)?  

 

Basically I am running out of links on my PLM so I am trying to get rid of a scene - plus the devices seem to work for fast on only (different issue).

 

Thanks,

Rich

Turn On and Turn Off run the same program. On runs Then section. Off runs the Else section.

 

 

If

....---    = nothing required for Echo vocals

 

Then

....turn light On

....Wait 6 hours = lest yee forget.

....turn light Off

 

Else

...turn light Off

 

You can turn on scenes or use direct commands for any quantity of devices. Slight ramp rates cover up different reponse times, to the human eye.

Edited by larryllix
  • Like 1
Posted

Thanks - that is great!  I run into issues where due to a communication problem something doesnt run as expected.  Is there a better way to 'repeat'?  I want a triple on & a double off - is there a better way?

 

Outside Echo
 
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Set Scene 'Scenes / Outside' Fast On
        Wait  8 seconds
        Set Scene 'Scenes / Outside' Fast On
        Wait  8 seconds
        Set Scene 'Scenes / Outside' Fast On
        Wait  3 hours 
        Set Scene 'Scenes / Outside' Fast Off
        Wait  8 seconds
        Set Scene 'Scenes / Outside' Fast Off
 
Else
        Set Scene 'Scenes / Outside' Fast Off
        Wait  8 seconds
        Set Scene 'Scenes / Outside' Fast Off
Posted (edited)

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Repeat 3 times
           Set Scene 'Scenes / Outside' Fast On
           Wait  8 seconds

        Repeat 0 times   <--- this keeps the 3 hour wait from repeating

           Wait 3 hours

        Repeat 2 times
           Set Scene 'Scenes / Outside' Fast Off
           Wait  8 seconds

 

Else
 

Edited by stusviews
Posted (edited)

If

   - No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

        Repeat 3 times

           Set Scene 'Scenes / Outside' Fast On

           Wait  8 seconds

        Repeat 0 times   <--- this keeps the 3 hour wait from repeating

           Wait 3 hours

        Repeat 2 times

           Set Scene 'Scenes / Outside' Fast Off

           Wait  8 seconds

 

Else

 

...Repeat 0 times

may have undetermined results.

 

You should use

...Repeat 1 times

as a UDI documented method.

 

https://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Action

Edited by larryllix
Posted

I am curious - if i wanted a button to do the same thing - i could duplicate the program (which I did).

 

I have it 

If control keypad A is on

Then

Else

 

Off doesnt seem to run else.  Pressing A runs the "Then" (when its lighted), pressing "A" again to turn it off doesnt do anything?

 

Thanks,
Rich

Posted (edited)

I am curious - if i wanted a button to do the same thing - i could duplicate the program (which I did).

 

I have it 

If control keypad A is on

Then

Else

 

Off doesnt seem to run else.  Pressing A runs the "Then" (when its lighted), pressing "A" again to turn it off doesnt do anything?

 

Thanks,

Rich

Control devicename is switched On is not ever false if it causes the re-evaluation of the logic in that program.

Control devicename is switched On calls the attention of the ISY logic engine upon receiving the On signal from a device, so while the line  is being evaluated it is always True = running Then.

 

 

Statuses have two states, usually On and Off.

Control devicename is switched ON has two states = active and not-active.

Control devicename is switched Off has two states = active and not-active. Note two different signals to detect

 

 

Now just to complicate things. :)

If

...control devicename1 is switched On

...AND

...control devicename2 is switched On

        can never be True = never run Then.  While one line is being evaluated, due to it triggering the evaluation, the other line will always be False (at that time) and the combo will run Else.

 

So there are two ways to do this.

 

If

...status of devicename is On

Then

....set light On

Else

....set light off

 

If

....control devicename is switched On

AND

....control devicename is NOT switched Off

Then

....set light On

Else

....set light Off

Edited by larryllix
Posted

...Repeat 0 times

may have undetermined results.

 

You should use

...Repeat 1 times

as a UDI documented method.

 

https://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Action

 

My experience is that Repeat 0 times after a block of Repeat x times causes the statements that follow to run once (i.e, zero repetitions). Repeat 1 time causes them to run twice (one repetition).

Posted

My experience is that Repeat 0 times after a block of Repeat x times causes the statements that follow to run once (i.e, zero repetitions). Repeat 1 time causes them to run twice (one repetition).

It's a syntax error (grammaro) that has existed since Repeat was added to the ISY repertoire.

....Repeat 1 times

means execute once only.

 

I was using it in a few programs only to find out it had some problems. I don't recall what the problems were now. The discussion was  posted in a thread about a year back.

Posted

It's a syntax error (grammaro) that has existed since Repeat was added to the ISY repertoire.

....Repeat 1 times

means execute once only.

 

I was using it in a few programs only to find out it had some problems. I don't recall what the problems were now. The discussion was  posted in a thread about a year back.

 

You are correct. You jolted my memory. I've used Repeat 0 times to emulate a REM.

Posted

You are correct. You jolted my memory. I've used Repeat 0 times to emulate a REM.

V5 has comment lines but they take too much space vertically, so far. End of line remarks would be nice.
Posted

In particular, I mean REMing an executable statement so that it doesn't run when troubleshooting a program.

Posted

In particular, I mean REMing an executable statement so that it doesn't run when troubleshooting a program.

ahhhhh.. This would fit in with the checkbox at the end of every line idea, to enable/disable it. It would have a slightly different function in the If section.

Guest
This topic is now closed to further replies.

×
×
  • Create New...