X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Software Problems & Bugs => Topic started by: JJtech on January 14, 2012, 07:45:58 PM

Title: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 14, 2012, 07:45:58 PM
If you use the “nighttime” condition with a “else”, you will be disappointed.  In the attached simple set of Macros, if it is nighttime, both Macros execute.

If you simply replace the “nighttime” condition with a “daytime” condition, it works as one would expect.

 B:(
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 14, 2012, 10:23:23 PM
I'll have to try and test this over the weekend (unless someone else here has time to test it before I do).
I don't like to add bugs to the list unless I (or someone else besides the original poster) can duplicate it.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 16, 2012, 05:24:35 PM
A little more insight:

It would now appear that the “daytime” condition works fine if it is night time.  When it was day time, it malfunctioned in the same manner as the “nighttime” condition.

Tomorrow during the day time, I will see if the “nighttime” condition works correctly.  I am betting it does!
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Dan Lawrence on January 16, 2012, 07:46:01 PM
That's either a bug or somehow your house's electricity has somehow had it's polarity reversed and is 12 hours out of sinc.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Knightrider on January 16, 2012, 08:01:05 PM
somehow your house's electricity has somehow had it's polarity reversed and is 12 hours out of sinc.

I hate when that happens.  Reminds me of the time my DeLorean took a lightning strike, reversed the polarity of the flux capacitor and I ended up in 1885, instead of 1985, or the time I plugged the TV in backwards and the ground was in the sky.

Title: Re: Nighttime condition does not work <--- BUG!
Post by: dave w on January 16, 2012, 09:37:37 PM
or the time I plugged the TV in backwards and the ground was in the sky.
Didn't the First Edition, in 1968, cut a song about this phenomenon?
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Knightrider on January 16, 2012, 10:07:16 PM
or the time I plugged the TV in backwards and the ground was in the sky.
Didn't the First Edition, in 1968, cut a song about this phenomenon?

I'm not sure, my friend Ken "just dropped in", and I'll ask him, but first I'll have to find out what condition his condition is in.


The point of all this nonsense is that household polarity would hardly have effect on a 12 hour timer shift.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 17, 2012, 09:31:27 AM
Might the time and/or timezone in AHP, as well as the ones on the PC, not be set correctly?
Do simple time-based conditions (is it before 7:00 PM, or after 7:00 PM) work?

Are you storing the macro in the interface, or running from the PC?
Title: Re: Nighttime condition does not work <--- BUG!
Post by: dave w on January 17, 2012, 12:06:22 PM

The point of all this nonsense is that household polarity would hardly have effect on a 12 hour timer shift.
I think Dan just forgot to stick the little laughy face at the end of his humor.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 17, 2012, 10:30:40 PM
Might the time and/or timezone in AHP, as well as the ones on the PC, not be set correctly?
Do simple time-based conditions (is it before 7:00 PM, or after 7:00 PM) work?

Are you storing the macro in the interface, or running from the PC?
Hi Norm,

No, time and timezone are correct on both.

One test on time-based condition in and outside of specified time works OK.

Yes, AHP forces you to run it from the PC.

Have you tried it?

Thanks,

JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 18, 2012, 12:56:24 PM
No, I have not had time to test it myself.
From the screen shots you provided, it looks like you have the option to store the macro in the interface (assuming you have a CM15A).
However, depending on what steps you have it performing, that might not be an option once you add more steps to the macro.

What version of AHP are you running? There was a bug that reversed the logic of time-based conditions for macros run from the PC (but not for macros stored in the interface).
That bug was fixed in version 3.315. If your AHP is older than that, you probably have the bug.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 18, 2012, 01:27:08 PM
You are correct.  Once I add the “email” it forces you to store it in the PC.

3.318

OK, I have tested it both during the night and day light hours.  It will work if it is not the “time” that the condition it is set to test.  As an example, if you test to see if it is daytime and it is, both macros will execute.  When testing that exact macro at night, it works.  The reverse is true for the nighttime condition.

It appears not to make a difference where it is stored as I have tested daytime “store in interface” and “run from PC” and it still doesn’t work.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 18, 2012, 01:53:52 PM
Well, it makes sense that adding e-mail functions would force it to run from the PC - the CM15A can't send e-mail by itself.

3.318 should not have any bugs with time-based conditions, so we may have to dig a little deeper.

When you say that "both macros execute," are you referring to the buttons blinking in AHP,  or to the actual results you see with the steps being executed? There is a "cosmetic" bug that causes incorrect "blinks" in the AHP interface, but that isn't supposed to affect macro execution.

I just ran a test remotely on my home machine. since I cannot test with a PalmPad when I'm not there, I triggered the macro using AHCMD from the command line:
1. I created a macro O1, which sent me an e-mail, and turned on appliance module O2. That worked fine.
2. I added a condition (if Daytime), and it sent me the e-mail and turned on the appliance module.
3. I changed the condition to "if Nighttime", and it did NOT send me the e-mail or turn on the appliance module.
4. I added an "else" condition, for "if Daytime." I set the "Daytime" one to turn on the module, and the "Nighttime" one to turn it off. I also changed the text of the e-mails to indicate which macro was running. I tested it, and only the "Daytime" half executed. 

Perhaps you are doing something wrong when defining the conditions (not likely, but you never know). From your initial screen shots, everything looked okay to me.
I did notice from your original screen shots that you have one macro setting flag 13, and the other setting flag 14.
However, you I didn't see you clearing the other (unused) flag. So, after executing both macros one time, BOTH flags would be set.
If you clear both flags (using a separate macro), and verify they are both cleared (press F3 to load the Status report), and THEN test by executing the macro, do BOTH flags still get set?

Can you post new screen shots, showing the current macros?

--Noam
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 18, 2012, 04:47:11 PM
Hey Noam,

Definitely on “actual results you see with the steps being executed.”  The blinking problem occurs as well.

Yes, I clear and check every time to make sure both flags are off.

I will do better than that.  Attached is my AHX file.  You will see the 3 macros in the “miscellaneous” room labeled “NEW nighttime test, NEW daytime test and Clear flags 13 & 14.”  I had to change the extension to .doc.  Why don't they have AHX included in possible uploads?

Best,  JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Dan Lawrence on January 18, 2012, 08:33:45 PM
You have some kind of problem in the link you provided, it will not load.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 18, 2012, 09:36:58 PM
Hi Dan,

I just downloaded it, changed the extension to ahx and it comes up fine in AHP for me.

JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Dan Lawrence on January 18, 2012, 10:03:30 PM
Likewise!!!
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 19, 2012, 09:38:14 AM
JJ -
I downloaded and opened the file in AHP. I don't see anything that looks odd to me (but I'm at work, so I can't actually test it).
Both macros are set to "store in interface".
Have you been downloading them to the CM15A before testing?
Also, it looks like you have an L8 macro in the trash, that sets one of the flags. Even though it is an "L8 on," and your others are "L8 off," you might want to clear the trash and try re-downloading to the CM15A before testing again.
There have been lots of reports of strange stuff happening if you have timers or macros left in your trash.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 20, 2012, 02:52:30 PM
Hey Noam,

Yes between each test I download and clear flags 13 & 14.

Cleared trash but same buggy results as before.

Did you have a chance to try it yet?
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 21, 2012, 08:32:28 PM
Hey Noam,

Yes between each test I download and clear flags 13 & 14.

Cleared trash but same buggy results as before.

Did you have a chance to try it yet?
No, sorry. It's been busy this weekend, so I doubt I'll have time until next week.
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 25, 2012, 10:45:21 AM
Hey Everyone,

Is there any way to get this bug fixed?  Does X10 read these reports?  Is there any formal way of reporting this bug? 

Thanks,

JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on January 25, 2012, 12:52:10 PM
Hey Everyone,

Is there any way to get this bug fixed?  Does X10 read these reports?  Is there any formal way of reporting this bug? 

Thanks,

JJ

Possibly. The developers don't seem to be spending much time on AHP these days, so I usually don't get replies for at least a few weeks when I send things to them.
I wasn't able to try testing with your file over the weekend, but I tried to duplicate "daytime" and "nighttime" conditional macros on my own, and wasn't able to reproduce your results. I was only able to test during the day, but the conditions seemed to work fine for me.

Have you tried creating a brand-new file, creating ONLY those macros, and seeing if the results are any different?

If someone else here has the time to test this, it might help us determine if there really is a bug here or not (since nobody else has been reporting issues with conditional macros in the latest versions).
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on January 25, 2012, 03:34:19 PM
Thanks Noam!

Let me know if you test my simple "L8" flag macro.

I sent it in today but it is a rarity that anyone ever gets back to me.

Dan, did you have a chance to test it?

If anyone else wants to test it, it is a very simple macro and you can download the file via:  Reply #13 on: January 18, 2012, 04:47:11 PM

Thanks,

JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: JJtech on November 14, 2012, 03:12:59 PM
Hey Everyone,

Sorry, I dropped off the face of the earth for a while.

OK, had a little time to look at this more.

Here is the problem.

I started by taking Noam’s suggestion of creating a totally new file (thanks Noam!).

I set up a simple macro using Day/Night condition that toggled two lamps depending the time of day and condition set.  Works like a champ!

Here is the hick-up!  Try adding a email notification under the advanced functions.  There lies the problem!  Now if you test the same condition as the time of day (i.e. daylight condition at 2pm), it doesn’t work!  Nighttime condition run at 2pm works fine.

Here is an interesting twist, now delete the email notification, reload the interface (CM15A) and it still doesn’t work!  Clear the interface and reload, no dice.  It’s like it lost its virginity and there is now getting it back!  You have to start off with a whole new clean file.  That makes me wonder how many other things the email notification could effect.

As a side note, I executed these macros via a mini controller.  That works differently than if you try clicking on the macro in your ActiveHome interface on your PC.

As far as why some people got the original macro that I included in my first posting to work:

-   I had an email notification in that macro earlier.  I deleted it to make it as simple as I could.
-   What I didn’t realize at the time was what I mentioned above….even if you delete the email notification, it still screws it up.
-   Consequently, others that started off fresh and input the original macro as shown on my first posting would not find the problem!

Now, can we get this fixed is the real question????

Thanks everyone!

JJ
Title: Re: Nighttime condition does not work <--- BUG!
Post by: Noam on November 14, 2012, 10:14:34 PM
... As a side note, I executed these macros via a mini controller.  That works differently than if you try clicking on the macro in your ActiveHome interface on your PC. ...

Clicking on the macro in AHP ignores the conditions (well, evaluates them as "true," really). In order to test the conditions, you need to use an "external" trigger, like a motion sensor, remote, mini-controller, etc.