jasonl99 Posted December 19, 2009 Posted December 19, 2009 I am working with motion sensors and still trying to find the best combination of flexibility and keeping traffic low. One of the things I am struggling with is what happens in this case. I have a program called "Upstairs Motion" which is used in a lot of other areas. it's simply this: if Status Kitchen Motion Detector is On Or Status Living Room Motion Detector is On then else I use this as a variable. However, here's the problem I seem to be running into: when the living room detector is already on, and someone walks into the kitchen, it re-runs the program and triggers all the dependencies even though the True/False state didn't change. This behavior seems to be causing all sorts of additional traffic. Any suggestions? On an unrelated note, any word on when alpha people can get a hold of the 2.7.7/2? Quote
Michel Kohanim Posted December 20, 2009 Posted December 20, 2009 Hi jason|99, Every time a program's state changes the conditions to which it's part of are re-evaluated. If I use the concept of Control vs. Status, programs only support Status. With kind regards, Michel Quote
slopdog Posted December 22, 2009 Posted December 22, 2009 Maybe you can create 1 variable (program) for each sensor, then another to determine the logic. I am just getting started my motion sensor/door sensor programming but haven't come up with a complete plan yet, still pondering ideas. So you would have 2 variable programs, then another one to test conditions: If motion A is on and motion B is off THEN... If Motion B is off and motion B is on THEN... If Motion A is on and motion B is on Then... Etc.... Variables would make programming much easier, I may wait until they are available, i think i read somewhere they are in the works. I would hate to do all of this programming using program variable, then have to go though it all again to replace with real variables. Quote
Michel Kohanim Posted December 22, 2009 Posted December 22, 2009 Hello again, Variables as well as some means of control vs. status for programs are in the works. This said, however, I cannot give you a firm date since - currently - we are adding so many features into the next release that it might take a little while. With kind regards, Michel Quote
slopdog Posted December 22, 2009 Posted December 22, 2009 Guess they won't be available anytime soon then, guess ill make due with what is available now, will be good practice on getting to know programs anyway. Thanks. Quote
Michel Kohanim Posted December 22, 2009 Posted December 22, 2009 Hi slopdog, They are surely on our plate for the release after next. I just cannot be firm on the date. Thanks so very much for your patience. With kind regards, Michel Guess they won't be available anytime soon then, guess ill make due with what is available now, will be good practice on getting to know programs anyway. Thanks. Quote
jasonl99 Posted December 22, 2009 Author Posted December 22, 2009 I am definitely excited about getting variables. That will largely solve this admittedly-minor problem. But I did confirm the behavior. Consider this: 1) You have to programs: ConditionA and ConditionB. They are used as true/false variables. 2) You have another program ConditionStatus which says If ConditionA is true or conditionB is true. So if either condition is true, ConditionStatus is true. 3) You have a third program which "does stuff." Let's say if ConditionStatus is True Turn On Lights Else Turn Off Lights. Here's the problem. Condition A goes true setting ConditionStatus True. The lights are turned on. Then ConditionB goes true. ConditionStatus is still true (the state never changed), but the lights get turned on again. Quote
Michel Kohanim Posted December 22, 2009 Posted December 22, 2009 Hi jason|99, Yes indeed you are correct. You should consider programs as Control variables. This means that every time the program is set to true (even if it was true before), all other programs that are evaluated based on this program are re-evaluated. Just like using Control Switch On in programs. With kind regards, Michel Quote
slopdog Posted December 26, 2009 Posted December 26, 2009 How about: If (Motion1 is On and Motion2 is NOT on) or (motion2 is On and Motion1 is NOT on) Quote
Michel Kohanim Posted December 27, 2009 Posted December 27, 2009 Hi slopdog, Are these statuses or controls? With kind regards, Michel How about: If (Motion1 is On and Motion2 is NOT on) or (motion2 is On and Motion1 is NOT on) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.