Jump to content

Program triggers other programs unexpectedly

Recommended Posts

HI all,


I am not new, but still somewhat inexperienced with programming (and no one has ever accused me of being a genius, but I'm a nice guy).


I have a program called "North Door (Door)" that looks for an switched-on event for "North Door Sensor" and then...


- checks to see if the "South Lights" are off




-checks to see if it is night time


If so, it runs the THEN function that calls a program called "!Lights/Beep" that turns on lights and makes the switches beep.


If not, it runs the ELSE function that calls a program called "!Beep" that just makes the switches beep.


This works fine. But...


I have two other similar programs for a second door sensor (South Door - Door) and a motion sensor (South Door - Motion) . When I run the THEN function of the first program, it seems to kick off the second two programs leading to a confusing barrage of lights and notifications. If I disable the second two programs, both the THEN and ELSE of the first program work fine.


Attached are the relevant programs, if anyone can give me some pointers I would sure appreciate it. If you need more info, I'll provide.


Thanks in advance.





Link to comment

Beep is an option that does nothing. I don't know why it's still there, maybe to support much older devices like the 9 minute ramp rate option still exists. If you want an alert, then you'll need to use something such as a light or a BuzzLinc.


BTW, you can right click on the program name, select Copy to Clipboard and paste a program to the topic page.

Link to comment

Thank you for the reply - I may eventually decide to use something different for the "beeping", but for now the chirp that emits from the (possibly older) switchlinks I have is enough to alert me that something is happening.


The problem I cannot solve is that after the initial program ("North Door (Door)") starts correctly, it seems to cascade into other programs (attached: South Door (Door) - [iD 0073] and South Door (Motion) - [iD 0070]) running unexpectedly. If I disable the other two programs that monitor for a sensor event, the original program works as expected. When they are all three enabled, the initial program seems to trigger the other two into action.


I notice that all three programs have the same "Parent". Not sure if that is relevant.


Also, I am open to other ways of achieving my goal which is to be alerted in one way (lights/beeps) when it is past sunset and the light (Outside / South Lights) isn't already on, and alerted another way (beeps) when the outside light is on or it is daytime.


Thanks again for taking a look.

Link to comment

This is expected.


When any device changes state in the IF, it triggers evaluation of the IF and either Then or Else is executed.


So, one of your programs is causing others to run the Else...


For instance, if any program turns ‘South Lights’ on, your program in the first post will trigger, and run ‘Else’ - which is what you are seeing.

Link to comment

Your South Door (Door) program and South Door (Motion) are identical except the From..To in the former ends with Next Day and the From..To in the latter ends with Same Day. That would make the Motion program False and always run the Else statements.

Link to comment

I would break the controlled device status filters (lights) into separate programs that are disabled so they cannot be triggered by changing their statuses.


You can call the Program If section and have a common program between at least two of your sensing programs decide whether to Beep or Beep/Lights.


Also your time frame If lines need to be in disabled programs if you want to use the Else section for code. You may have already noticed that your Else sequences are triggered every  morning or every night when the "to" time is encountered.




....Controlled MS is switched on



....run 'If' program 'filters'




Filters (DISABLED)


....Status gate is On

....From sunset

....To sunrise



.....do something



....do something else

Link to comment


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

  • Create New...