walkman9999 Posted November 10, 2017 Posted November 10, 2017 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 and -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.
walkman9999 Posted November 11, 2017 Author Posted November 11, 2017 Sorry about that. Attached now. walker-programs.txt
stusviews Posted November 11, 2017 Posted November 11, 2017 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.
walkman9999 Posted November 11, 2017 Author Posted November 11, 2017 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.
MWareman Posted November 11, 2017 Posted November 11, 2017 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.
walkman9999 Posted November 11, 2017 Author Posted November 11, 2017 Thanks - I'm glad the behavior is expected and not a communication problem. Is there a smarter/better way to achieve my goal? Happy to research the feature if you would point me to it.
stusviews Posted November 11, 2017 Posted November 11, 2017 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.
larryllix Posted November 11, 2017 Posted November 11, 2017 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. If ....Controlled MS is switched on Then ....run 'If' program 'filters' Else ....-- Filters (DISABLED) If ....Status gate is On ....From sunset ....To sunrise Then .....do something Else ....do something else
walkman9999 Posted November 13, 2017 Author Posted November 13, 2017 Wanted to thank everyone for the help - I learned a lot. Things working as expected now.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.