X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => OnAlert => Topic started by: chuck on March 18, 2008, 01:37:47 PM

Title: DS10A Heartbeat
Post by: chuck on March 18, 2008, 01:37:47 PM
I understand the Door/Window Sensor (DS10A) has an hourly heartbeat that is sends out.  I have two questions about this heartbeat:
1 - Does it always send a "door closed" signal, or does it simply rebroadcast the last true event (possibly door open if that was the last event that occured)?
2 - Does AHP have the ability to trap this event?  Or does it simply respond to the door closed event as if it were true door closed event?  Do I have to program something into my door closed macro to determine if this is the hourly heartbeat?

Thanks
Title: Re: DS10A Heartbeat
Post by: Tuicemen on March 18, 2008, 02:07:57 PM
I understand the Door/Window Sensor (DS10A) has an hourly heartbeat that is sends out. I have two questions about this heartbeat:
1 - Does it always send a "door closed" signal, or does it simply rebroadcast the last true event (possibly door open if that was the last event that occured)?
The sensor transmites it's current state
Quote
2 - Does AHP have the ability to trap this event? Or does it simply respond to the door closed event as if it were true door closed event? Do I have to program something into my door closed macro to determine if this is the hourly heartbeat?
If your using the closed event to trigger your macro then you'll need to use a flag  which is cleared when the sensor is opened and set on the closed event ;)
eg:
Trigger backdoor sensor closed
Condition if flag 2 clear
set flag 2
what ever else you have responding to this

Trigger backdoor sensor open
clear flag 2
what ever else you have responding to this
Title: Re: DS10A Heartbeat
Post by: chuck on March 18, 2008, 02:16:48 PM
Thanks.  I guess you could use the same logic to trap when a door has been left open, then generate an alarm or email as a result. 
Title: Re: DS10A Heartbeat
Post by: Tuicemen on March 18, 2008, 02:39:16 PM
Well you would want to add some else logic unless you didn't mind an e-mail being sent each and every  time the door was opened
so your open macros would look like:
Trigger backdoor sensor open
condition if flag 2 clear
send e-mail
what ever else you'd like to respond to this

else macro
Trigger backdoor sensor open
clear flag 2
what ever else you have responding to this

Note: The else macro would need to be the second in the string not the first macro as it has no conditions! ;)
Title: Re: DS10A Heartbeat
Post by: PajamaGuy on March 18, 2008, 03:57:44 PM
Tuicemen - I'm certainly not questioning your knowledge, but didn't you or Puck once post that one should include the conditions in an "ELSE" even when it's redundant?

I know I've had macros that simply wouldn't fire correctly unless the ELSE contained the alternative condition(s).

Or am I off base?
Title: Re: DS10A Heartbeat
Post by: Puck on March 18, 2008, 04:08:45 PM
Tuicemen - I'm certainly not questioning your knowledge, but didn't you or Puck once post that one should include the conditions in an "ELSE" even when it's redundant?

I know I've had macros that simply wouldn't fire correctly unless the ELSE contained the alternative condition(s).

Or am I off base?

I often recommend that.

Else conditions do not always work as one expects and under certain circumstances they will all execute in parallel; so the only way to guarantee that only the intended macro gets executed everytime is to make each one mutually exclusive by including alternate conditions. I recommend it because it eliminates ordering concerns and improves reliability.

When a macro sting of elses do not execute as expected, it should be the first troubleshooting step.

P.S. It's only redundant when 2 or more else macros have the exact same conditions; which of course should never happen.  ;)
Title: Re: DS10A Heartbeat
Post by: Tuicemen on March 18, 2008, 04:35:55 PM
Tuicemen - I'm certainly not questioning your knowledge, but didn't you or Puck once post that one should include the conditions in an "ELSE" even when it's redundant?
In most cases if an else won't fire it is because one preceding it had conditions that were matched!
Simple else macros such as the example posted shouldn't need conditions!
However as Puck has stated adding conditions to all eliminates ordering concerns(sometimes)! :( ::) ;) :D