Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: Single-trigger macro question / problem  (Read 7645 times)

PajamaGuy

  • Hero Member
  • *****
  • Helpful Post Rating: 32
  • Posts: 522
Re: Single-trigger macro question / problem
« Reply #15 on: March 16, 2008, 08:54:17 AM »

My brain's fried - but this might work.
(Note that for the conditionals, whatever is NOT on the monitored housecode would have to be a flag)
MS1 = Motion sensors – All set to same House/Unit code – doesn’t matter how many.  All delays set to 60 sec.
L1 = Light
Flag#1 & Flag#2 – If one is set, there’s motion.
Phantom switches:
P1 – Motion is happening – might want lights on
P2 – No motion – don’t need lights here - might want 'em off
S1 – Timerd OFF  (Delay offset = MS1 delay + 30 seconds – or whatever works)
L1 – Light indicator

MS1 = ON  (Motion is detected)
   If FLAG#1 = OFF
      Set FLAG#1 ON
      Set P1 On
   Else IF Flag#1 is ON
      Set FLAG#2 ON
      Set P1 On
   
MS1 = OFF (No motion has been detected – might want lights off)
   If FLAG# 1 = ON AND FLAG#2 = ON
      Clear FLAG#2
   If FLAG# 1 = ON AND FLAG#2 = OFF
      Clear FLAG#1
      Set P2 ON
   If FLAG# 1 = OFF AND FLAG#2 = ON –OR- (FLAG#1 AND FLAG#2) = CLEAR (OFF)
      Clear FLAG#2
      Set P2 ON

P1 = ON  (Something wants lights)
   IF L1 = OFF
      Set L1 ON
      Set P1 OFF
   ELSE IF L1 = ON
      Set P1 OFF

P2 = ON (Getting “no-motion” signals – may want lights off)
   IF L1 = ON AND (Flag#1 and FLAG#2) = CLEAR (OFF) –AND- S1 = OFF
      DELAY 90 seconds
      Set S1 ON
   ELSE IF L1 = OFF (Lights already off or S1 already active)
      Set P2 OFF
      Set S1 OFF

S1 = ON (It’s been 90 seconds since somebody wanted lights off)
   IF (FLAG#1 and FLAG#2) = CLEAR   (still off)
      Set L1 OFF
      Set S1 OFF
      Set P2 OFF
   ELSE IF FLAG#1 is SET (ON) –OR- FLAG#2 is SET (ON)
      Set S1 OFF
      Set P2 OFF
« Last Edit: March 16, 2008, 09:00:06 AM by PajamaGuy »
Logged
PajamaGuy
Win-7 - Dell XPS -Automation
VA12a on a dedicated desktop - Video
XTB-IIR & V572RF32

Remote via LogMeIn (FREE) and Ignition

eTreker

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Single-trigger macro question / problem
« Reply #16 on: March 17, 2008, 10:16:33 PM »

What it boils down to is even if does work, you have to still have to set a specific time in the sensor weather or not you choose to have an additional macro time. Why not just set the time only in the sensor and stick with a system that would be easier to change in the future if needed?

Well, aside from the fact that I just seem to like over-complicating things for some reason  :(, if I were only using one sensor, simply using the sensor's programmable time delay would definitely be the method of choice. I am going to all this trouble to have two (or more) sensors controlling the same light without stepping one on each other, so to speak. 

To PajamaGuy - Thanks for the code!!! I will give this a try sometime this week.
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Single-trigger macro question / problem
« Reply #17 on: March 18, 2008, 12:32:09 AM »

Well, aside from the fact that I just seem to like over-complicating things for some reason  :(, if I were only using one sensor, simply using the sensor's programmable time delay would definitely be the method of choice. I am going to all this trouble to have two (or more) sensors controlling the same light without stepping one on each other, so to speak. 

To PajamaGuy - Thanks for the code!!! I will give this a try sometime this week.
Hmm... I don't recall you mentioning that you would have more than one sensor triggering your event. That adds an even more interesting  wrinkle to you scenario. Let us know how things work out.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

eTreker

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Single-trigger macro question / problem
« Reply #18 on: March 18, 2008, 10:17:36 AM »

It was in my response (5 posts ago?) just before you asked. I had bolded multiple I/R sensors in it. I bet the timing of the posts was such that you missed it or...maybe I just didn't explain myself clearly. Sorry about that if that was the case. Sometimes communicating via these forums makes it harder to convey a point so that it can be clearly understood.
Logged
Pages: 1 [2]
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.