Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 2 3 [4]

Author Topic: New AHP Version 3.296 Released 11/06/2010  (Read 26412 times)

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #45 on: November 24, 2010, 10:16:15 AM »

... Did cause a question tho:  condition DAY or nite says requires "2 entries" so I added AND weekday...  just removed the AND weekday and macro still works with just 1 entry "dawn."  What does this mean?

The "Is it day?" or "is it night?" conditions MUST use two of the condition slots, because of how they REALLY work:
1. "Is it day?" really means:
    a) is it AFTER Dawn?
    AND
    b) is it BEFORE Dusk?
2. "Is it night?" really means:
    a) is it BEFORE Dawn? (between 12:00 AM and Dawn)
    OR
    b) is it AFTER Dusk? (between Dusk and 11:59 PM)

Since AHP uses midnight as the cutoff for each day, any conditions based on day/night must cross that threshold, so they need to use two condition slots.
For the same reason, conditions that will cross Midnight need to be split. For example, if I want a conditon based on "Between 10 PM and 2 AM", I need to write it as:
    a) After 10 PM (between 10:00 PM and 11:59 PM)
    OR
    b) Before 2 AM (between 12:00 AM and 2:00 AM)
If you used an "AND" instead, it would never work (The two blocks of time are on opposite ends of the day)

To get around this, you can use a Dusk/Dawn timer to set a flag, and use that flag as your condition.
That would only use one condition slot ("is the flag set?").

I hope the way I explained it makes sense.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1030
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #46 on: November 24, 2010, 10:23:59 AM »


Did you kill the x10nets process before you reopened AHP?
The restart would have done this and it is my guess that is why it is now working after updating the ICities.xml file.

ah, prob right.  altho thought I read ver 3.296 finally kills x10nets when program quits now.  tnx
Logged

J.B.

  • Hero Member
  • *****
  • Helpful Post Rating: 16
  • Posts: 319
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #47 on: November 24, 2010, 10:52:29 AM »

I'm running version 3.299 (plug-ins) and x10Nets is still running when I exit AHP. This was probably the case.
If it's working though, that's a plus.  >!
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #48 on: November 24, 2010, 11:33:22 AM »

...  altho thought I read ver 3.296 finally kills x10nets when program quits now.  tnx
If they killed the x10nets service, then none of the SDK-created programs (or even the manual control using ahcmd) would work. Those all require the service to be running.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1030
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #49 on: November 24, 2010, 12:44:14 PM »

OK Noam, now I'm still being dense I am sure...  I of course understand how making DAY or its NITE would work behind the scenes on a 12 hour clock (vs not needing 2 tests for 24 hour clock) but I am not programming the ahp internal software so I really don't care how many checks they need to do to make it work.  to use it I simply drag "DAYTIME" to my condition block to use it.  I don't drag two things, just one thing.  So why does it say it requires 2 things?  that is my question.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #50 on: November 24, 2010, 01:19:17 PM »

OK Noam, now I'm still being dense I am sure...  I of course understand how making DAY or its NITE would work behind the scenes on a 12 hour clock (vs not needing 2 tests for 24 hour clock) but I am not programming the ahp internal software so I really don't care how many checks they need to do to make it work.  to use it I simply drag "DAYTIME" to my condition block to use it.  I don't drag two things, just one thing.  So why does it say it requires 2 things?  that is my question.
Yes, YOU only drag one block over. However, that one block takes up two spots.
And you would still need the two tests for a 24-hour clock, too. The CM15A, and most electronic devices, use an internal 24-hour clock.
If "Day" meant the time from 12:00 AM until 11:59 AM, and "Night" meant the time from 12:00 PM until 11:59 PM, then you could use only one condition (is it AM or PM). However, since "Day" means "after Dawn and before Dusk," and "Night" means "before Dawn or after Dusk", it still requires two conditions.

Once again, using a timed macro to set a flag would allow you to use that flag as your one-and-only condition for day/night macros.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1030
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #51 on: November 25, 2010, 07:56:18 AM »

Noam,  I gotta respectfully disagree with your reasoning why DAYTIME condition says "requires 2 entries."  How they program a condition internally is none of the users business or concern.  I just thought of why I believe they wrote that on the condition:  it is a typo by the programmer!  It should not be there!  Here's why I say this...

Looking at condition DATE RANGE, it says "requires two entries." And it does!  The user has to enter two entries - the start and the end dates.  Ditto for conditions holiday & time range.  But for daytime and nighttime conditions, the program automatically puts in & uses the two entries -  dawn & dusk!  Now if there was an edit button on these 2 conditions that allowed us to change the 'timer' from dawn/dusk to TWO ENTRY times of our choice, then yes, that note would be correct on the conditions.  But no edit button, so no two entries required! 

Hence it is a programming typo no one ever told them about, so they have not yet fixed it!  Hopefully the new programmers see this for next version....
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #52 on: November 25, 2010, 12:19:09 PM »

Noam,  I gotta respectfully disagree with your reasoning why DAYTIME condition says "requires 2 entries."  How they program a condition internally is none of the users business or concern.  I just thought of why I believe they wrote that on the condition:  it is a typo by the programmer!  It should not be there!  Here's why I say this...

Looking at condition DATE RANGE, it says "requires two entries." And it does!  The user has to enter two entries - the start and the end dates.  Ditto for conditions holiday & time range.  But for daytime and nighttime conditions, the program automatically puts in & uses the two entries -  dawn & dusk!  Now if there was an edit button on these 2 conditions that allowed us to change the 'timer' from dawn/dusk to TWO ENTRY times of our choice, then yes, that note would be correct on the conditions.  But no edit button, so no two entries required! 

Hence it is a programming typo no one ever told them about, so they have not yet fixed it!  Hopefully the new programmers see this for next version....
Mike - That's a very creative explanation. I'm not saying it is wrong, but it isn't the answer I was given by X10.
I asked the developers about this when I was beta-testing the SmartMacros add-in before they released it back in 2004.

"Entries" refers to the condition slots in the top portion of the macro, not the dates or times you enter into the condition itself.
Each macro can have up to three condition "entries." Using one of the "time range" or "date range" conditions uses up two of those slots (entries), because one is used for the "after" time at the beginning of the range, and the other for the "before" time at the end of the range.

"Daytime" and "Nighttime" are really the same as using the "Time Range" condition. It uses up two of the slots, or entries, in the conditional part of the macro.

You can try it yourself. Put in two conditions (for example, a "flag status", and a "day of the week"), and THEN try to add "daytime" or "nighttime". It won't let you.

I think you're right that the wording could be better. Perhaps the word "slots" would have been a better choice.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1030
Re: New AHP Version 3.296 Released 11/06/2010
« Reply #53 on: November 25, 2010, 01:47:17 PM »

Ya, maybe it should say USES two entries huh?

OK, you win :)

Logged
Pages: 1 2 3 [4]
 

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