Jump to content

motion program syntax


chachdog

Recommended Posts

Posted
 

Is there a way or a better way to do this with 1 program? It works but it also triggers on time events as false due to the motion not being triggered but the time changed. 

 

 

motion sensor on a fan/light on an fanlinc

 

day- motion triggers fan only. 

 

night - motion triggers light and fan. 

 

 

If 1.5 hr from sunset to sunrise next day. 

and control motion sensor is on. 

 

then

set outside fan on 

set outside lights on 

wait 5 min 

set outside fan off

set outside lights off

 

 

Else

set outside fan on

wait 5 min 

set outside fan off

 

Posted (edited)

As per oberkc above.

 

If 1.5 hr from sunset to sunrise next day.   <---this will always trigger else

and control motion sensor is on.

then

set outside fan on

set outside lights on

wait 5 min

set outside fan off

set outside lights off

 

Else

set outside fan on

wait 5 min

set outside fan off

 

 

Time frames are a gotcha' in ISY. They need to be disabled to NOT trigger the else at the end of the filter condition.

If
   control motion sensor is switched on.   <----requires triggering enabled
Then
   run (if) Program2
Else
   --

Program 2 (disabled)
---------
If 1.5 hr from sunset to sunrise next day. <--requires triggering disabled=filter only

 then
   set outside fan on 
   set outside lights on 
   wait 5 min 
   set outside fan off
   set outside lights off

Else
   set outside fan on
   wait 5 min 
   set outside fan off
Edited by larryllix
Posted

 

As per oberkc above.

 

If 1.5 hr from sunset to sunrise next day.   <---this will always trigger else

and control motion sensor is on.

then

set outside fan on

set outside lights on

wait 5 min

set outside fan off

set outside lights off

 

Else

set outside fan on

wait 5 min

set outside fan off

 

 

Time frames are a gotcha' in ISY. They need to be disabled to NOT trigger the else at the end of the filter condition.

If
   control motion sensor is switched on.   <----requires triggering enabled
Then
   run (if) Program2
Else
   --

Program 2 (disabled)
---------
If 1.5 hr from sunset to sunrise next day. <--requires triggering disabled=filter only

 then
   set outside fan on 
   set outside lights on 
   wait 5 min 
   set outside fan off
   set outside lights off

Else
   set outside fan on
   wait 5 min 
   set outside fan off

 

I was thinking an else if would do it which is essentially what you have there. 2 programs will also do it. Just trying to make sure I wasn't missing something easy.

 

thanks

Posted

You mean I posted and editted two compleyr programs, verified the posting and now the mahor part of the code is missing,?

 

Anybody else see more than one line of code in my post? :(

  • 1 month later...
Posted

I was under the impression that if you disable a program it can't run on its own. I have a motion #2 program that is disabled but still runs the else. Is this by design or am I missing something? 

 

 

This program is disabled but runs the else when I turn off the living room lights. But when I turn the living room lights on, it doesn't trigger the "then" 

 

 

Kitchen Motion 2 - [iD 0013][Parent 0014][Not Enabled]
 
If
        Status  'Living / Living Room Lights' is not Off
 
Then
        Set Scene 'Kitchen / Kitchen Lights' On
        Wait  5 minutes 
        Set Scene 'Kitchen / Kitchen Lights' Off
 
Else
        Set Scene 'Kitchen / ~Kitchen Cabs' On
        Wait  5 minutes 
        Set Scene 'Kitchen / ~Kitchen Cabs' Off
 
Is this by design? I thought if it was disabled it would not run with triggers unless something told it to run from a program. 
Posted

here is a event viewer on 3 starting from an OFF to the living room lights. 

 

Tue 12/08/2015 01:07:00 PM : [iNST-TX-I1  ] 02 62 38 8E 0E 0F 13 00
Tue 12/08/2015 01:07:00 PM : [iNST-ACK    ] 02 62 38.8E.0E 0F 13 00 06          LTOFFRR(00)
Tue 12/08/2015 01:07:00 PM : [iNST-SRX    ] 02 50 38.8E.0E 38.FF.95 2F 13 00    LTOFFRR(00)
Tue 12/08/2015 01:07:00 PM : [std-Direct Ack] 38.8E.0E-->ISY/PLM Group=0, Max Hops=3, Hops Left=3
Tue 12/08/2015 01:07:00 PM : [D2D EVENT   ] Event [38 8E E 1] [sT] [0] uom=0 prec=-1
Tue 12/08/2015 01:07:00 PM : [   38 8E E 1]       ST   0
Tue 12/08/2015 01:07:00 PM : [D2D-CMP 0013] STS [38 8E E 1] ST op=6 Event(val=0 uom=0 prec=-1) != Condition(val=0 uom=0 prec=-1) --> false
Tue 12/08/2015 01:07:00 PM : [D2D-CMP 0008] STS [38 8E E 1] ST op=6 Event(val=0 uom=0 prec=-1) != Condition(val=0 uom=0 prec=-1) --> false
Tue 12/08/2015 01:07:00 PM : [D2D-CMP 000E] STS [38 8E E 1] ST op=6 Event(val=0 uom=0 prec=-1) != Condition(val=0 uom=0 prec=-1) --> false
Tue 12/08/2015 01:07:00 PM : [D2D-CMP 0010] STS [38 8E E 1] ST op=6 Event(val=0 uom=0 prec=-1) != Condition(val=0 uom=0 prec=-1) --> false
Tue 12/08/2015 01:07:00 PM : [D2D EVENT   ] Event [38 8E E 1] [RR] [27] uom=0 prec=-1
Tue 12/08/2015 01:07:00 PM : [   38 8E E 1]       RR  27
Tue 12/08/2015 01:07:00 PM : [All         ] Writing 1 bytes to devices
Tue 12/08/2015 01:07:00 PM : [38 8E E 1   ] Memory : Write dbAddr=0x0021 [1B] cmd1=0x2E cmd2=0x00
Tue 12/08/2015 01:07:01 PM : [iNST-TX-I2CS] 02 62 38 8E 0E 1F 2E 00 01 05 1B 00 00 00 00 00 00 00 00 00 00 B1
Tue 12/08/2015 01:07:01 PM : [iNST-ACK    ] 02 62 38.8E.0E 1F 2E 00 01 05 1B 00 00 00 00 00 00 00 00 00 00 B1 06        (00)
Tue 12/08/2015 01:07:01 PM : [iNST-TX-I1  ] 02 62 00 00 2D CF 11 00
Tue 12/08/2015 01:07:01 PM : [iNST-ACK    ] 02 62 00.00.2D CF 11 00 06          LTONRR (00)
Tue 12/08/2015 01:07:01 PM : [Ext MH      ] Unexpected Ack imCmd=62 cmd1=LTONRR 0x11
Tue 12/08/2015 01:07:01 PM : [iNST-SRX    ] 02 50 38.8E.0E 38.FF.95 2F 2E 00           (00)
Tue 12/08/2015 01:07:01 PM : [std-Direct Ack] 38.8E.0E-->ISY/PLM Group=0, Max Hops=3, Hops Left=3
Tue 12/08/2015 01:07:06 PM : [iNST-TX-I2CS] 02 62 38 8E 0E 1F 2E 00 01 05 1B 00 00 00 00 00 00 00 00 00 00 B1
Tue 12/08/2015 01:07:06 PM : [iNST-ACK    ] 02 62 38.8E.0E 1F 2E 00 01 05 1B 00 00 00 00 00 00 00 00 00 00 B1 06        (00)
Tue 12/08/2015 01:07:07 PM : [iNST-SRX    ] 02 50 38.8E.0E 38.FF.95 2F 2E 00           (00)
Tue 12/08/2015 01:07:07 PM : [std-Direct Ack] 38.8E.0E-->ISY/PLM Group=0, Max Hops=3, Hops Left=3
Posted (edited)

I don't have that many programs what do you mean with FInd? 

Right click on the suspect program and select Find/Replace. In that box you will find methods to select programs, variables, scenes, devices. Select program, pulldown the menu and select the offending program and click find several times. ISY will take you through every occurrence of the program name.

 

Hopefully you will find usage of your program somewhere else that is causing your problem.

Edited by larryllix
Posted

I don't have that many programs what do you mean with FInd? 

 

Right click on My Programs to initiate a search (Find/Replace).

Posted

The find found just the Kitchen Motion 1 which calls the kitchen 2 upon motion. . 

 

I was testing some more and found that If the kitchen 1motion is disabled and then enabled, it runs the "then" which fires kitchen2. (unless it is running the if and thinking motion was detected which it shouldn't be)

 

I canreplicate this issue. Why would enabling a program cause it to run? there is no motion in the kitchen when enabling it. Is it skipping the if and running the then?  

 

Any way to capture the logs to see if this is what is happening? 

 

Kitchen Motion 1 - [iD 001A][Parent 0014][Not Enabled]

 
If
        Control 'Kitchen / Motion-Sensor' is switched On
 
Then
        Run Program 'Kitchen Motion 2' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 
 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 
 
Kitchen Motion 2 - [iD 0013][Parent 0014][Not Enabled]
 
If
        Status  'Living / Living Room Lights' is not Off
 
Then
        Set Scene 'Kitchen / Kitchen Lights' On
        Wait  5 minutes 
        Set Scene 'Kitchen / Kitchen Lights' Off
 
Else
        Set Scene 'Kitchen / ~Kitchen Cabs' On
        Wait  5 minutes 
        Set Scene 'Kitchen / ~Kitchen Cabs' Off
Posted (edited)

 

The find found just the Kitchen Motion 1 which calls the kitchen 2 upon motion. . 

 

I was testing some more and found that If the kitchen 1motion is disabled and then enabled, it runs the "then" which fires kitchen2. (unless it is running the if and thinking motion was detected which it shouldn't be)

 

I canreplicate this issue. Why would enabling a program cause it to run? there is no motion in the kitchen when enabling it. Is it skipping the if and running the then?  

 

Any way to capture the logs to see if this is what is happening? 

 

Kitchen Motion 1 - [iD 001A][Parent 0014][Not Enabled]

 
If
        Control 'Kitchen / Motion-Sensor' is switched On
 
Then
        Run Program 'Kitchen Motion 2' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 
 

 

Enabling a program should NOT make it run and doesn't on my ISY.

What is your indicator that causes you to think it is running?

Edited by larryllix
Posted

If you enabled the program when you were within range of the MS, then the 2nd program may run. BTW, did the THEN or ELSE execute?

Posted

Actually what I think is happening is that the program becomes enabled, runs the If, finds that the motion sensor is "on" and then goes on.  I have another motion sensor and it says off but this one always says on. it has a 1 min timeout but never seems to say off. 

Posted

If you enabled the program when you were within range of the MS, then the 2nd program may run. BTW, did the THEN or ELSE execute?

 

i enabled the program from the isy across the house way after a 5 minute window. I think the motion sensor is stuck "on" status maybe. it shuts off the light after x minutes though but the console always says on. so maybe after enabling it, it says hey motion is on. go to then.  

Posted (edited)

The first program Then clause should only trigger on a signal from the MS and only at the exact instant of the On signal. The MS status isn't being checked with the "switched ON" parameter.

 

This shouldn't be possible unless your MS is sending out continuous signals.

 

Have a look at your event viewer to see Insteon traffic.

Edited by larryllix
Posted

Enabling a program should NOT make it run and doesn't on my ISY.

What is your indicator that causes you to think it is running?

because it is the only program that calls kitchen motion 2. if 2 can't run on its own due to being disabled. something is making the If run. must be the sensor on/off status and it is checking after enabling it or so it seems. 

Posted

because it is the only program that calls kitchen motion 2. if 2 can't run on its own due to being disabled. something is making the If run. must be the sensor on/off status and it is checking after enabling it or so it seems. 

I have to assume the kitchen lights are operating then and this is assumed to be the Kitchen 2 program run from Kitchen 1.

 

View the event viewer for excessive Insteon traffic.

If that isn't the case I would try power cycling your ISY with a few seconds shut down.

Posted

i enabled the program from the isy across the house way after a 5 minute window. I think the motion sensor is stuck "on" status maybe. it shuts off the light after x minutes though but the console always says on. so maybe after enabling it, it says hey motion is on. go to then.  

 

If the program is enabled when the conditions are met, then it will run.

Guest
This topic is now closed to further replies.

×
×
  • Create New...