X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: EL34 on January 06, 2007, 02:11:30 PM

Title: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 06, 2007, 02:11:30 PM
I just added/DL'd smart macros a couple days ago.

I did a search and found several post where nighttime/daytime conditions were not working properly.
I can't get them to work either.
It seems they are reversed? Night triggers during the day.
I have the correct time zone set, correct lon/lat, the time shows correctly in the AH hardware config.
I always download the timers and macros before testing.
I am using a custom motion sensor and a power flash to trigger P1.
Nothing else is on P1.
I watch the activity in the activity monitor to see what was triggered after waving my hand in front of the motion sensor.

I created two P1 macros to test this.
One is Day one is Night.
Night is an else of Day.
Setting daytime as the condition for the Day macro results in the Night macro triggering.
Setting Nighttime as the condition for the Night macro results in the day macro triggering.

I'm not having any better luck using dawn and dusk.
I set after dawn and before dusk for the Daytime macro
I set after dusk and before dawn for the Nighttime macro.
Same results, my night macro is being triggered right now at 2:00 in the afternoon.

What the heck? Does AH have a problem doing time math?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 06, 2007, 02:25:53 PM
Good information... can eliminate the obvious questions.  ;)

I created two P1 macros to test this.
One is Day one is Night.
Night is an else of Day.
Setting daytime as the condition for the Day macro results in the Night macro triggering.
Setting Nighttime as the condition for the Night macro results in the day macro triggering.

You should not need any conditions in the 2nd macro. Night macro will only run if the Day did not. Maybe try eliminating the 2nd condition.

Macros can be very quirky, so if that doesn't work maybe post your 2 macros as well as what you are seeing in the Activity Monitor. Then it will be easier to test / suggest something else.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 06, 2007, 03:36:34 PM
There is no condition on the second macro.
AH automatically creates an else to your first macro if you have the same trigger.
Anyway's it should not matter, conditions are either true or false and they are tested and then run or din't run.
If I had the day divided into four parts instead of dusk and dawn I would have to have a time condition at the top of four macros.

I just tried another way of doing it by using a dusk dawn timer on a phantom module and then setting flags.
Then testing for flags. still no go.

I tried doing it very simply, dusk to dawn, turns on one module.
The else of the above macro, turns on another module.
The first macro executes even though it's not dusk to dawn, it dawn to dusk here now.

It seems like AH thinks I am in a different hemisphere, not in north america.
Day is night, night is day.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: -Bill- (of wgjohns.com) on January 06, 2007, 04:04:05 PM
EL34:

No insult intended, but sometimes we miss the simplest things...

Are you sure the clock, timezone, etc. on your PC is set correctly?   ;)

Just a thought.

Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 06, 2007, 04:52:37 PM
Setting daytime as the condition for the Day macro results in the Night macro triggering.
Setting Nighttime as the condition for the Night macro results in the day macro triggering.

There is no condition on the second macro.

You can see where the 2nd macro condition assumption came from.  ;)

Quote
AH automatically creates an else to your first macro if you have the same trigger.

Are you running ActiveHome (AH) or ActiveHomePro (AHP)? I better not assume again.  :-

Quote
Anyway's it should not matter, conditions are either true or false and they are tested and then run or din't run.

As I stated above:

Macros can be very quirky...

If your times / locations are correct, then a screen shot of your macros (or even text based) will help to find your problem.  :)
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 06, 2007, 05:02:25 PM
Thanks Bill, Yes that's all correct, Checked it 10 times cause it all made no sense. Was pulling my hair out.

Ok, I did a few things and now the daytime macro seems to exectuting correctly.
What I did was abandon dusk/dawn- daytime/nighttime conditions in the macros themselves.

I set up a phantom appliance module on H16.
I do not really have a module on H16 and H16 is not used by any other X10 item.
Then I set up a timer for the H16 appliance module.
The H16 timer is on at dawn, off at dusk.
My custom motion sensor triggers a powerflash which triggers P1 on and P1 off.
The day macro runs if P1 is on and H16 is on
The night macro runs if P1 is on and H16 is off.
If P1 off is triggered a different macro triggers that shuts off all lights that were turned on when P1 on was triggered.

I won't be able to tell if H16 shuts off and the P1 on night macro works properly until it's after dusk this evening.

Hope that all made sense?
I found plenty of other post here about daytime/nighttime conditions not working properly.
Not sure if that was older post and it's supposedly fixed or what.
I also re-installed the smart macro module and then re-booted.
Between all of those things, the day macro seems to be triggering fine right now. (fingers crossed)
Can't say which one item fixed the day macro, I'm in a hurry and have to leave the house so I didn't have time to do one at a time and test between them.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: ajleduc on January 06, 2007, 10:35:39 PM
Daytime/Nighttime and Dusk/Dawn has not worked for me either.
Seems like I also had a problem with the specific time condition, using the before and after a time.
I just stopped using them waiting for a software update and will try again.
I have way to many other things to make work first.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 07, 2007, 05:53:17 AM
It seems that the dusk/dawn timer in AH pro is working but the dusk/dawn condition in smart macro is not.

I am not at home right now to check this but I did notice that a 24 hour clock is used in some places and not in others?
Could be a simple am/pm clock/math problem?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 12, 2007, 07:32:39 AM
I ended up not letting smart macros decide when dusk and dawn was.
Instead I used AHP's timer mode by setting up a dawn-on dusk-off timer on a phantom aplliance module.

All my day night macros now check the status of this phantom module as part of the decision making process.
I need to do a flow chart to describe the whole process, but it's all working now.

Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Chris22 on January 20, 2007, 02:44:22 PM
My Nighttime/Daytime and Dusk/Dawn conditions in macros aren't working properly either.  At first I thought it was a phase or noise problem, but once I removed the conditions in the macro, everything worked perfectly.  The conditions I used were pretty simple: if nighttime, execute macro.  The macro turned on a light, delayed for 5 minutes, then turned it off.  No "elses" or "ORs". I'm using the latest version of the software.  I read EL34's patch solution using a phantom module and will try that.  However, what's up?  it doesn't appear that EL34's original query has been answered.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: EL34 on January 21, 2007, 07:54:24 AM
Hey Chris, the dawn/dusk timer turning on a phantom module has been working great since my post above.

The timer in AHP seems to have no problem turning the module on and off at exactly the dusk/dawn time you see listed in the Tools/Hardware config screen in AHP.

I guess we just have to wait for a software fix.
Seems like a rip to pay for smart macros and not be able to use all of it.

Don't they release small bug fix software updates like most other companies do?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: woodyworld on January 25, 2007, 05:47:34 PM
I have been an x10 user since early 80's, AHPro so far is the WORST damn software I have used EVER!! For 18 months now I have not been able to keep spot lights OFF during the day and ON during the night using ANY of the SMARTMACROS conditions, without using the so called PHANTOM module in a timer simulating dusk/dawn and then using it's status as the condition (I also have another PHANTOM module caalled "People Over" so I can prevent snapshots/stills and video and lights coming on for macro length when they are in yard or the like). I also have been experiencing a number of modules not in ANY timer or macro coming on when macro triggers, but the activity monitor and room modules show no indication of command(s). These modules DO NOT come on when ONLY the interface is running the show (i. e., AHPro OFF). I have been emailing and calling X10 since 7/05 when purchased and all I get back is CRAP (they seem to be good at insulting your intelligence) or NOTHING at all, of course until I contact them again. X10 SUCKS, I think we all should get a class action LAWSUIT toghether and get out $$ back PLUS $$ for having to play, tweak, try, experiment and gwet aggravated EVERY DAY. I cannot remember what it is like to come home and not look at those spots or other lights not in T/M's ON, and actually feel PROUD to have HOME AUTOMATION. (There, now I feel better).
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 18, 2008, 03:59:21 PM
What does it mean (requires 2 entries)
No, I can't get Daytime working either, but what does 2 entries mean?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 18, 2008, 07:06:44 PM
...and yep - I can't get any even simple macros OR TIMERS to use daytime/nighttime/dusk/dawn.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 18, 2008, 08:36:19 PM
What does it mean (requires 2 entries)
No, I can't get Daytime working either, but what does 2 entries mean?

Macros can have up to 3 conditions for determining if they are to execute; these time conditions use up 2 of the 3.

I posted a macro here (http://www.x10community.com/forums/index.php?topic=13842.0) showing how I use a flag for controlling daytime / nighttime conditions in macros. This method only uses 1 condition, and can often be including in existing flag conditions.

Quote
I can't get any even simple macros OR TIMERS to use daytime/nighttime/dusk/dawn.

This should be working... make sure your time in the CM15A is correct. If so, maybe post an sample one that we can work on with you.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 19, 2008, 06:05:48 AM
Trigger Conditions SH624=2 - Home Arm Instant and
It's daytime
End Trigger Conditions
WAIT for 1 Second
Turn Back Door Light ON
Turn Front Door Light - Outside ON
WAIT for 2 Seconds
Turn Back Door Light OFF
Turn Front Door Light - Outside OFF

This will not run.

The CM15A is plugged in, and it's clock is spot on.
The Front & Back lights are WS467's (soft start)
If I remove "Daytime" it works.

When there's an ELSE - the ELSE immediately runs, this never even lights-up.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 19, 2008, 01:41:54 PM
Trigger Conditions SH624=2 - Home Arm Instant and
It's daytime
End Trigger Conditions
WAIT for 1 Second
.
.
.

Sometimes starting a macro with a delay if that macro has ELSES can cause strange problems. Since there is already an inheritant delay in OnAlert macros, maybe remove the 1 second delay. Also, does the ELSE (assuming for nighttime) macro have the Nighttime condition? If not make sure it does. Make sure no condition can exist that can satisfy more than one macro in an ELSE sequence.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 20, 2008, 06:48:56 AM
Well, the problem really is that AHP timers won't turn on the soft-start WS467's >:(
Telling AHP they're LM14A's enables the timers to control the lights correctly, but their "status" is NOT reflected in AHP.
If I tell AHP they're LM465's, AHP reflects the timer commands & status, but the lights stay off.

C'mon x10 - fix the software!!!!!!!!!!!!!!
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 20, 2008, 07:36:28 AM
Ev Arms    SH624-2 - Home Arm Instant
Daytime    Delay for 1 Second
      (D8) Front Door Light - Outside    ON
      (D7) Back Door Light    ON
      Delay for 2 Seconds
      (D8) Front Door Light - Outside    OFF
      (D7) Back Door Light    OFF

---ELSE---

Lights Off-On    SH624-2 - Home Arm Instant
Nighttime    (D8) Front Door Light - Outside    OFF
      (D7) Back Door Light    OFF
      Delay for 2 Seconds
      (D8) Front Door Light - Outside    ON
      (D7) Back Door Light    ON
      Delay for 2 Seconds
      (D7) Back Door Light    Brighten then dim to 72%
      (D8) Front Door Light - Outside    Brighten then dim to 70%
---------------------------------------
This works - BECAUSE AHP has been lied-to! I told AHP that the WS467's are LM14A's !!!!
The modules in the room in AHP don't change from "OFF", but the real lights follow the macro correctly!
======================
caveat - this works during nighttime - the sun's coming up in 45 min.....

## - Update - When I stopped and restarted AHP, the correct status of the LM14A's is displayed.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 20, 2008, 08:01:14 AM
Here's another associated quirk - ???

With the working macro below - when I hit the security remote's Arm Home - the macro fires AND the DS7000 arms (as it should) - BUT the normal security-light-on-off sequence from the DS7000 only did an "ON" - and the security lights stayed on.
However, adding a 1-sec delay at the beginning of the ELSE fixed it.

Lights Off-On SH624-2 - Home Arm Instant
Nighttime Delay for 1 Second
(D8) Front Door Light - Outside OFF
(D7) Back Door Light OFF
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 21, 2008, 09:07:01 AM
If I remove "Daytime" it works.

Well, the problem really is that AHP timers won't turn on the soft-start WS467's >:(

 ??? You've confused me... I thought your first post above (http://www.x10community.com/forums/index.php?topic=11424.msg80081#msg80081) was about a problem with the daytime condition of the macro you presented. Now you state the issue is with timers. ???
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 21, 2008, 11:03:00 AM
YOU're confused!?!?!? - ;D You're an expert! (I'm more confused than you are!)

I've been trying to do 2 separate, but related, things.

1st: I have 2 outside, door entry lights, both run off soft-starting WS467's (addressed as D7 & D8). I want them to come on (100%) at dusk, then about 30 minutes later dim to about 75% - finally shutting off at dawn.

2nd: I'd like an outside visual indicator for my wife so that when she arms or disarms the DS7000. (The DS7000's L5 security lamps' flashing at ARM are hard to see through the windows, and don't flash on disarm) So I thought since she's usually standing by one of the outside doors, I'd have their lights flash just once, On&Off during daylight, and Off&On (then dim to 75%) during nighttime.

I'm using timers to #1: Turn D7 on to 100% at 4:30.
#2: Dim D7 to 70% at 5:30 and turn it off at DAWN.
#3: Turn D8 on to 100% at 4:30.
#4: Dim D8 to 75% at 5:30 and turn it off at DAWN.

These timers NOW Work correctly! ;D - but only when I changed the modules for D7 & D8 to indicate they are LM14A's.

I'm using a MACRO with an ELSE to flash the D7 & D8 lights whenever my wife arms/disarms the DS7000. (for testing purposes, I'm using my #2 SH624 as the trigger)

Ev Arms SH624-2 - Home Arm Instant
Daytime Delay for 1 Second
(D8) Front Door Light - Outside ON
(D7) Back Door Light ON
Delay for 2 Seconds
(D8) Front Door Light - Outside OFF
(D7) Back Door Light OFF

---ELSE---

Lights Off-On SH624-2 - Home Arm Instant
Nighttime Delay for 1 Second
(D8) Front Door Light - Outside OFF
(D7) Back Door Light OFF
Delay for 2 Seconds
(D8) Front Door Light - Outside ON
(D7) Back Door Light ON
Delay for 2 Seconds
(D7) Back Door Light Brighten then dim to 75%
(D8) Front Door Light - Outside Brighten then dim to 70%

Puck - I've done so much testing - changing - testing - changing, that I can't remember the exact configuration of these 2 macros or the modules before I got them working, but they NOW WORK CORRECTLY!!!

I always had the CM15A connected to the PC. I always downloaded timers & macros after I made a change. With the Modules as WS467's AND using DAYTIME in the first macro, the ELSE always fired (At that time I did NOT have any condition in the ELSE) - when I removed "daytime" the primary macro fired.
After changing the modules to LM14A's (to get the timers working) - the first MACRO did recognize DayTime and did fire correctly, HOWEVER without the Delay at the beginning of the ELSE, the DS7000 turned ON the security lights, but did NOT turn them off when the ELSE fired. With the delays in the macros, the DS7000's arming indicator of flashing the security lights works correctly.

These 2 macros now work correctly!! :) (I test by swapping the DAYTIME & NIGHTIME parameters.)


 
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on January 21, 2008, 11:40:40 AM
PajamaGuy: Thanks for clearing up the confusion... now I understand ALL that you are doing. :D

The (new) softstart modules have been causing lots of problems and work-arounds.

Because the DS7000 is not a polite device, and with the newer ones sending the armed on/off indication, any OnAlert arming macros have to take this into consideration to avoid signal collisions. In this case a preceding delay is required. Just be aware that starting a macro with a delay when elses are involved can cause reliability issues.

Whenever I have to start a macro with a delay, I place a Clear Flag 16 command in front of the delay. Flag 16 is not reliable since it is used internally, so this just acts as a dummy command so that the possible delay issue is mitigated.
Title: I lied! (...but not on purpose)
Post by: PajamaGuy on January 26, 2008, 03:51:54 PM
Those macros I listed - DON't WORK!

I've just spent 4 hours screwing with my system.... And I've learned some things.

1. Move your equipment as far from your PC and peripherals as possible. My CM15A receives MUCH better when I added a 16' USA extension and mounted it high up in a closet away from my desk/workstation. I also added an 18" piece of coat hanger.
2. I moved my DS7000 into the same closet. Prior to the move, although the Security Remotes worked well, the KeyChains did not work from outside the front door. Now they work from the sidewalk out front. And the closet is actually farther away!
3. Daytime/Nightime/Dusk/Dawn as CONDITIONALs don't work for me. Using FLAGS and PHANTOMs have the problem/issue almost fixed.

I now use timers to simply flip a PHANTOM (P10) - 2-pin appliance module on at Dawn and off at dusk.
Macros sense P10 and when flipped ON, set FLAG-1 to ON, and OFF when P10 goes OFF. Flag F1 indicates DAYTIME/NIGHTIME.

Any KeyChain ARM transmission flips PHANTOM P1 ON.
Macro On-Off is triggered by P1 and if FLAG-1 is ON, it turns my outside lights On for 2 seconds, then Off - and then turns P1 OFF.
ELSE Macro Off-On (also triggered by P1) and IF FLAG-1 is OFF, turns the outside lights OFF, then ON and resets P1 OFF.

It was important to include the IF FLAG-1=OFF in the ELSE! Wouldn't work without it.

The Outside light switches still MUST be identified as 2-Way Lamp Modules and NOT WS467's. AND the MACRO preference of "On instead of Bright 100%" must be checked.
The AHP Outside Light modules do NOT reflect the On-Off activity - but the lights themselves work.

So - the only issue left is that if I use the same KeyChain twice to ARM, the system will ARM correctly, and P1 will get flipped ON, but the ON-Off macros don't fire. Usually on second ARMing, the lights flash and P1 goes OFF, but not from the same KeyChain 2-times in a row - weird!

Time for some single-malt and reading the boards.... ;D

Title: Re: I lied! (...but not on purpose)
Post by: Puck on January 27, 2008, 01:19:58 PM
Back to confused....

1. Move your equipment as far from your PC and peripherals as possible. My CM15A receives MUCH better when I added a 16' USA extension and mounted it high up in a closet away from my desk/workstation. I also added an 18" piece of coat hanger.

Even though moving the CM15A as electrically far away from a PC as possible improves the reliability of it's operation, it will have no effect of your original issue of Daytime / Nighttime macro conditions not working. By the way, usng an X10 filter on the PC is the best way to elimate the PC's electric noise for your house wiring.

Quote
3. Daytime/Nightime/Dusk/Dawn as CONDITIONALs don't work for me. Using FLAGS and PHANTOMs have the problem/issue almost fixed.

I now use timers to simply flip a PHANTOM (P10) - 2-pin appliance module on at Dawn and off at dusk.
Macros sense P10 and when flipped ON, set FLAG-1 to ON, and OFF when P10 goes OFF. Flag F1 indicates DAYTIME/NIGHTIME.

Daytime / Nighttime Timer Flag Macro (http://www.x10community.com/forums/index.php?topic=13842.0) ;)
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Makaira on January 28, 2008, 02:28:38 AM
PJ Guy,

Thanks so much for posting the WS467 / LM14A work-around. I'm a new X-10 owner and have spent days trying to program the first X-10 unit I ever installed - a WS467 of all things - I thought I was going insane trying to make the damned thing work. . . called it an LM14A and voila!

Makes me a little nervous about installing the rest of the modules.

Thanks again.
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: PajamaGuy on January 28, 2008, 08:40:49 AM
Makaira - It wasn't me that "found" the workaround - I discovered it by searching and reading these boards!   ;)

There are some guys here that have many years experience in X10 stuff - and the best part is they're eager to share. 

Do searches, especially "Advanced Searches" - and ask questions - this forum has highest GoodGuys-to-dorks ratio I've seen.

Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: mike on November 12, 2008, 11:09:51 AM
I've developed a theory about ANY time conditions, be they dusk/dawn, before, after, or a range with so called smart macros:


No time condition works directly on any REAL module or function (send email etc).

A corollary to above:

Time conditions ONLY work in macros controlling a PHANTOM module.

So far, from KDR's 3 macro-to-send-email, many others with similar problems, my trying to record snapshot or video in 1 macro with time condition, and even macro turning on directly a real existing module, they just don't work.  But having the trigger with conditions turn on a phantom non-existent module, and then use THAT to trigger the event wanted, seems to work.

How can X10 be so incompetent!!???!!?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: dave w on November 12, 2008, 11:41:57 AM
How many times do you plan on cross posting this?
Title: Re: Nighttime/Daytime and Dusk/Dawn not working properly?
Post by: Puck on November 12, 2008, 12:19:17 PM
mike: Please do not repeat posts throughout the forum. It only takes once to be seen by all. More than once tends to be seen as hi-jacking someone else's thread. I have removed the others and left this one since it was your first.

If you feel your post would contribute to another thread, then please post a hyper-link to the original. This way when members sign in they know they read that message before.

Thanks