X10 Community Forum

ActiveHome Pro => ActiveHome Pro General => Software Problems & Bugs => Topic started by: LAF on October 06, 2018, 06:20:43 PM

Title: A timer problem that has shown up
Post by: LAF on October 06, 2018, 06:20:43 PM
I have had an AHP system for several years now and it has worked very well but I have run into a problem with two timers that issue commands to appliance modules at the same time of day.  The problem is one or both don't seem to trigger or they both trigger and the commands don't get thru.  I initially had both set for 9:00 AM and solved the problem by setting one to 9:01.

Should that be necessary??  I would think the CM15 would be smart enough to issue the commands sequentially with sufficient time between them to allow the first command to complete(??).

Also, what happens if a timer issues a command and someone pushes a button on a remote control device?  Do the two commands step on one another?

Thanks for any assistance.
Title: Re: A timer problem that has shown up
Post by: JeffVolp on October 06, 2018, 06:52:23 PM
Also, what happens if a timer issues a command and someone pushes a button on a remote control device?  Do the two commands step on one another?

Yes, we call that a "collision", and it is likely that both commands will be lost.

Jeff
Title: Re: A timer problem that has shown up
Post by: brobin on October 06, 2018, 06:58:23 PM
I'm not an AHP expert but I think if you add the two commands in one macro they should execute sequentially.  If they're on the same Housecode you can send i.e., A1,A2,ON and both will turn on.
Title: Re: A timer problem that has shown up
Post by: LAF on October 06, 2018, 08:40:12 PM
I'm not an AHP expert but I think if you add the two commands in one macro they should execute sequentially.  If they're on the same Housecode you can send i.e., A1,A2,ON and both will turn on.

That is correct - AHP seems able to handle that but timers that trigger at the same time, apparently not.  Pretty surprising if that's the case.
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 07, 2018, 08:10:57 AM
Why not add all the modules to one timer?
Title: Re: A timer problem that has shown up
Post by: LAF on October 07, 2018, 11:06:50 AM
Why not add all the modules to one timer?

The two modules have different timing requirements.  One triggers twice per day on the hour (first is "on" at 10:00 PM, second is "off" at 9:00 AM), the other triggers every hour ("off" commands only).

I would still like to know if multiple separate triggers at the same time will work properly.
Title: Re: A timer problem that has shown up
Post by: dhouston on October 07, 2018, 11:50:24 AM
I would still like to know if multiple separate triggers at the same time will work properly.

NO!
Title: Re: A timer problem that has shown up
Post by: LAF on October 07, 2018, 02:19:24 PM
I would still like to know if multiple separate triggers at the same time will work properly.

NO!

That is a pretty strange shortcoming IMO.  Is such a deficiency documented anywhere (I've never seen any mention of it)?  If multiple, i.e. more than one, timers are configured to trigger at the same time of day, I wonder why AHP can't simply issue the commands sequentially?  What does it do anyhow, try to send the commands all at once or only send one of them??

Is the workaround simply to make sure no two or more timers are configured to trigger at the same time?
Title: Re: A timer problem that has shown up
Post by: dave w on October 07, 2018, 05:04:48 PM
I have had an AHP system for several years now and it has worked very well but I have run into a problem with two timers that issue commands to appliance modules at the same time of day. 
So did this work for several years and now suddenly start suddenly start OR did you just add the second timer and that caused the problem. Does the log show the commands being sent ?
In other words I am wondering if this is actually a CM15A/AHP problem, OR is something happening in your house (noise) that is making the signals hit or miss.
Title: Re: A timer problem that has shown up
Post by: LAF on October 07, 2018, 05:32:22 PM
I have had an AHP system for several years now and it has worked very well but I have run into a problem with two timers that issue commands to appliance modules at the same time of day. 
So did this work for several years and now suddenly start suddenly start OR did you just add the second timer and that caused the problem. Does the log show the commands being sent ?
In other words I am wondering if this is actually a CM15A/AHP problem, OR is something happening in your house (noise) that is making the signals hit or miss.

It appeared to start after I added the second timers.  I didn't have the logging turned on so don't know if commands were sent.  The fail wasn't a once-off - it failed on several separate times upon which I removed all identical trigger times (which "cured" the problem)

Now I'm not sure what is going on - I set up a test program that switched 3 modules on & off via timers set for the same time values and it worked as one would expect - the commands were sent sequentially in the order the timers were created and all commands were successful, both on and off.  However, I did have do a reset of the CM15A (unplugged and removed a battery) b/f I ran the testing so that may have accounted for the problem (I had tried to install a lamp module and had it incorrectly configured to the new type - this resulted in an endless stream of status requests or some-such which I could only shut off by resetting the CM15).

So, I have reverted my program back to the timers triggering at the same time and will see what happens. :)
Title: Re: A timer problem that has shown up
Post by: SkipWX10 on October 07, 2018, 06:23:38 PM
I  have five light modules/switches that are all set to turn on at one hour before sunset and two sets of two each at different times off at the same time at night. This is in AHP with timers residing on my CM15a. They have operated flawlessly this way for 13 years in this house. When turning on, the light go on and then dim to set brightness in order of module number (i.e.: A1 goes on, dims, A2 goes on, dims, etc, etc) When turning off, all set to go off at the specified time go out simultaneously. What this tells me is that with dimming setup, the codes are sent individually: A1 on, A1 dim, A1 dim, A2 on, A2 dim, A2 dim, etc and that simultaneous off codes are sent in groups: A1, A2 Off.

I assume then that the ON codes you are sending are just as described and setting them one minute apart would avoid collisions
Title: Re: A timer problem that has shown up
Post by: LAF on October 08, 2018, 02:35:51 PM
Well, this issue appears it might fall into the "wild bug" category.  My test program had no problems but reverting the second timer in my "main" program to the same trigger time as another timer resulted in the same failure.

I haven't been able to log the commands, or lack thereof, because the first timer switches on power to my computer so, the computer is not running when the timers trigger.  I guess I will have to set up a test case within the main program such that AHP is running, and logging, when the timers trigger.

 B:(

BTW, on the topic of timers, has anyone noticed that a pop-up help balloon on the advanced timer window for "Store in Interface" is backwards?  At least as I understand it.  The wiki documentation for "Repeat" also seems incorrect.

Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 08, 2018, 05:55:38 PM
BTW, on the topic of timers, has anyone noticed that a pop-up help balloon on the advanced timer window for "Store in Interface" is backwards?  At least as I understand it.  The wiki documentation for "Repeat" also seems incorrect.
Not sure what you mean. The balloon info pop up appears when hovering over the check box if the box is checked or not. at least on my AHP copy it does.
The info balloon for repeat also displays correctly for me. maybe you AHP or AHX file has become corrupt.
Title: Re: A timer problem that has shown up
Post by: LAF on October 08, 2018, 09:08:07 PM
BTW, on the topic of timers, has anyone noticed that a pop-up help balloon on the advanced timer window for "Store in Interface" is backwards?  At least as I understand it.  The wiki documentation for "Repeat" also seems incorrect.
Not sure what you mean. The balloon info pop up appears when hovering over the check box if the box is checked or not. at least on my AHP copy it does.
The info balloon for repeat also displays correctly for me. maybe you AHP or AHX file has become corrupt.

Sorry, I meant the info in the Interface balloon is wrong, I think.  It says "Click to run this timer only from the computer" or maybe the caption is wrong "Store in Interface".  Anyhow, I have that check box clicked on all my timers and the timers all run with the computer turned off.

The balloon for "Repeat" is correct - it's the Wiki help description that is incorrect, I think.

One other thing I've noticed about "Repeat" is that it's grayed out for some of my timers and not others (for no reason that is apparent to me at first glance).
Title: Re: A timer problem that has shown up
Post by: Noam on October 09, 2018, 09:29:36 AM
Sorry, I meant the info in the Interface balloon is wrong, I think.  It says "Click to run this timer only from the computer" or maybe the caption is wrong "Store in Interface".  Anyhow, I have that check box clicked on all my timers and the timers all run with the computer turned off.

The balloon for "Repeat" is correct - it's the Wiki help description that is incorrect, I think.

One other thing I've noticed about "Repeat" is that it's grayed out for some of my timers and not others (for no reason that is apparent to me at first glance).

I haven't tested this myself, but if the box is checked, does the caption change? In other words, if the box is checked, is it telling you what will happen when you *uncheck* it?
"Store in Interface" works just fine for me.

As for the "Repeat" option, I know I've seen that disabled for certain types of timers. I don't remember if it's based on using the "Security" option, or if they are "old style" dimmers. I'd have to go back and take a look when I'm at home later.

Title: Re: A timer problem that has shown up
Post by: LAF on October 09, 2018, 11:22:35 AM
If the box is checked, neither the box label or the balloon text change.

When you say the "Store in Interface" works fine do you mean your timers run with the computer off or, as the balloon implies, only with the computer on?

On further looking at it, it looks like the "Repeat" box is grayed out when the timer triggers a macro.

I'm gonna leave the computer running with logging on to see what happens today (re the original problem).
Title: Re: A timer problem that has shown up
Post by: LAF on October 09, 2018, 04:10:53 PM
Looks like I may have found the problem.  One of the troublesome timers was a conditional macro timer which triggered on time but for some reason did not issue the command for the associated module (no matter if the flag condition was set to on or off).  Anyhow, deleted and regened the macro and it seems now to work properly.

I guess I had improperly assumed that since the problem arose when another timer was added to trigger at the same time as the macro, that was the cause of the problem.

BTW, how can one determine flag on/off status (w/o running a macro to test it)?  I ran a status report and all the Monitored House Code Status fields come up blank.
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 09, 2018, 05:58:07 PM
It has been over a year since using AHP and even longer since I was using flags. I seem to remember you could generate reports which would show status of everything including flags.
I believe that is located under file.
 >!
Title: Re: A timer problem that has shown up
Post by: LAF on October 09, 2018, 06:03:31 PM
It has been over a year since using AHP and even longer since I was using flags. I seem to remember you could generate reports which would show status of everything including flags.
I believe that is located under file.
 >!

Yeah, that's what I used but it shows blanks fields for each of the 16 flags.  The heading is "Monitored House Code Flag Status" which seems to imply there is a set of flags for each house code but, if so, I cannot figure out how to specify which house code to use.
Title: Re: A timer problem that has shown up
Post by: Noam on October 10, 2018, 12:23:58 PM
It has been over a year since using AHP and even longer since I was using flags. I seem to remember you could generate reports which would show status of everything including flags.
I believe that is located under file.
 >!

Yeah, that's what I used but it shows blanks fields for each of the 16 flags.  The heading is "Monitored House Code Flag Status" which seems to imply there is a set of flags for each house code but, if so, I cannot figure out how to specify which house code to use.

As far as I recall, AHP only allows one "monitored" house code, and one set of flags (total). The wording of the report is a bit confusing, but they never bothered to change it.
Title: Re: A timer problem that has shown up
Post by: LAF on October 10, 2018, 12:30:57 PM
Yeah, that's the way I understand it but the flag part of the Status report still shows blanks for all 16 flags whereas I would expect it to show Off or On for each one.
Title: Re: A timer problem that has shown up
Post by: Noam on October 11, 2018, 10:14:59 AM
Yeah, that's the way I understand it but the flag part of the Status report still shows blanks for all 16 flags whereas I would expect it to show Off or On for each one.
Try creating a macro to set all 16 flags, run it, and then check what the report shows for the flag status.
Then create another one to clear all the flags, run it, and see what the report shows.

Also, I seem to recall that conditional macros would ignore the condition if you triggered them from within AHP. You needed to trigger them with a timer or with an external command (like from a PalmPad), to test the conditions.
Title: Re: A timer problem that has shown up
Post by: LAF on October 11, 2018, 02:42:36 PM
Well, my conditional macro has returned to it's fail condition so regening it didn't seem to help (the timer triggers the macro on time but the module command within is not sent, according to the activity monitor).

As far as conditional macros ignoring the condition, that is not what's happening here as the condition was true but the module command was not transmitted.  I question whether conditional macros ignore the condition if triggered within as I have other conditional macros that work fine and the one in question worked fine until a while ago when I added a bunch of unrelated timers (all unrelated but two with the same trigger times as the failing macro).

:(
Title: Re: A timer problem that has shown up
Post by: Noam on October 12, 2018, 09:42:02 AM
Well, my conditional macro has returned to it's fail condition  ... and the one in question worked fine until a while ago when I added a bunch of unrelated timers (all unrelated but two with the same trigger times as the failing macro).

If you change the trigger time (either of the macro that isn't working right, or the new ones), does that change the behavior at all? When the SmartMacros first came out, one of the reliability fixes was to add a delay at the beginning, and/or delays before each command to be sent (even a 0 second delay was enough), because it forced the commands to be issued separately (instead of doing the "A1,A2,A3 A On" sequence). You might try that, to see if it makes any difference (if you're going to add delays, I'd start with 1 or 2 seconds, so you can observe the behavior better).
Title: Re: A timer problem that has shown up
Post by: LAF on October 12, 2018, 02:45:14 PM
The module timer always works.  The module command in the timer macro only works if the macro's trigger time is different from that of the module timer. 

Thanks for the suggestion.  I'll try adding a delay before the module command in the timer macro to see what difference that makes.
Title: Re: A timer problem that has shown up
Post by: LAF on October 12, 2018, 08:10:11 PM
The module timer always works.  The module command in the timer macro only works if the macro's trigger time is different from that of the module timer. 

Thanks for the suggestion.  I'll try adding a delay before the module command in the timer macro to see what difference that makes.

Didn't work either.   >*<
Title: Re: A timer problem that has shown up
Post by: Noam on October 15, 2018, 09:53:20 AM
The module timer always works.  The module command in the timer macro only works if the macro's trigger time is different from that of the module timer. 

Thanks for the suggestion.  I'll try adding a delay before the module command in the timer macro to see what difference that makes.

Didn't work either.   >*<
I'm  bit confused. Are you trying to trigger a module, and a macro that includes a command to that module, at the same exact time? Do they have the same House Code/Unit Code?
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 15, 2018, 10:34:49 AM
@ LAF if you can post a screen shot of you timer in question that would help clear some confusion.
A fresh set of eyes may spot something.
As well I notice the version of AHP was never mentioned. Everyone assumes 3.318 as that was the last build but I've come across others still using much older versions.
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 12:44:07 PM
OK, here's the situation.  I have two modules, an appliance module and a PRO universal module.  The universal module is triggered by a timer.  The appliance module is controlled by a conditional macro which is itself triggered by a separate timer.  The condition in the macro tests Flag 1.  If the condition is met, the macro switches the appliance module on.  The timer for the universal module switches it off.  The code for the appliance module is B3, the code for the universal module is E4.

If the two timers are set to trigger at the same time, the command to the universal module is sent.  The macro, according to the activity monitor, is triggered but, the command to switch the appliance module is not sent no matter what the state of Flag 1 is (Set or Clear).

If the timers are set to different times, both the appliance module and universal module commands are sent, depending on the Flag 1 state, as would be expected i.e. everything works properly.

If the condition is removed from the macro, everything also works properly, even when the times are set to trigger at the same time of day.

I have tested this both in my main program and a small test program which only contains the above described modules and timers.  I have reset the CM15A both with Tools and by unplugging and removing the batteries.  I'm not sure what else I can try save deleting and reinstalling the AHP software.  Maybe someone could try a test case on their AHP setup?

My AHP version is 3.318.  The product is registered to tuicemen, Last Update 30/09/2011.

I can't figure out how to include a screen shot here. Do you use Insert Image?



Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 15, 2018, 01:03:38 PM
How to insert a screen shot (http://forums.x10.com/index.php?topic=10516.msg60285#msg60285)
Post both the timer and macro I'm sure someone can test or spot the issue ;)
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 03:43:50 PM
Is there any way of attaching the program itself?  The attachments option doesn't allow .ahx files.

Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 15, 2018, 03:54:22 PM
you could save a AHX file renamed as a text file then post it. anyone wishing to look at or load it could rename it back to a AHX file
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 03:58:07 PM
Here's the screen shots.  Note that the other macro is used only to set or clear Flag 1 for testing.
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 05:01:32 PM
you could save a AHX file renamed as a text file then post it. anyone wishing to look at or load it could rename it back to a AHX file

OK, I didn't know they were text files.  I'll do that if anyone wants.
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 15, 2018, 05:24:58 PM
Posting the ahx file will allow anyone wishing to test run your setup an easy way. You didn't show what sets or clears flag 1 or why you use it other then testing.
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 05:49:48 PM
Posting the ahx file will allow anyone wishing to test run your setup an easy way. You didn't show what sets or clears flag 1 or why you use it other then testing.

Point is it doesn't matter what sets or clears the flag or why it's used otherwise.  I used a test case to try and narrow down the problem without complicating the issues by including the other stuff in my original main program.  I believe the test case has demonstrated there is a bug in AHP related to simultaneous timer triggering and conditional(s) in a related macro (unless my install of AHP has been corrupted in some weird way or my CM15A is screwed up somehow). 

The test program in any case takes only a minute to recreate and I wish someone would try it on their PC & CM15A to see if they get the same result.
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 15, 2018, 05:54:04 PM
Your screen shots show the setup has not been uploaded to the Cm15.
If that is indeed the case that is why things are failing
Title: Re: A timer problem that has shown up
Post by: LAF on October 15, 2018, 06:59:20 PM
Your screen shots show the setup has not been uploaded to the Cm15.
If that is indeed the case that is why things are failing

That's only because I reloaded the test prog to generate the screen shots.  I have always uploaded it to the CM15 when running a test.  Besides, the same macro & module timers fail in my main program.
Title: Re: A timer problem that has shown up
Post by: Noam on October 16, 2018, 09:52:33 AM
Just for testing, have you tried flipping the condition (of the flag is on, instead of it being off)? It's been a while since I edited any of my conditional macros, but I'm pretty sure there is an "else" option. You could try using the "flag is set" for the primary condition (and either put in a dummy module to activate, or I think just a delay would be enough), and then the "flag is set" could be the "else" condition. It should only take a few minutes to test that case.

Alternatively, if the universal module and the macro are always being triggered at the same time, why not put the universal module's trigger into the macro? Use the "else" option, so it gets triggered either way, and only have the flag affect the other module.

But even if it is a bug, there isn't going to be any further development of AHP, as the source code was lost in the transfer of the assets to Authinx. So the only options you have at this point would be to try and work around the problem, unfortunately.
Title: Re: A timer problem that has shown up
Post by: Tuicemen on October 16, 2018, 10:25:29 AM
I used a test case to try and narrow down the problem without complicating the issues by including the other stuff in my original main program.  I believe the test case has demonstrated there is a bug in AHP related to simultaneous timer triggering and conditional(s) in a related macro (unless my install of AHP has been corrupted in some weird way or my CM15A is screwed up somehow). 

The test program in any case takes only a minute to recreate and I wish someone would try it on their PC & CM15A to see if they get the same result.
If you cleared your CM15 Memory and loaded your test AHX file and it fails the issue is not your original AHX file. IF it works then the issue is your original AHX file.
I don't have AHP here to test but as Noam stated you may have to find a work around using else's.

Sadly any chances of AHP bugs being fixed are slim to none. :(

Title: Re: A timer problem that has shown up
Post by: LAF on October 16, 2018, 02:47:08 PM
Tried playing with the "else" option but the macro would not get past it either.  I set up an intermediate macro (with a timer only) that called the main macro and that worked.  However the easiest work-around is simply not setting the two timers to the same value (one minute apart either way works).

I'd still like to know though if the problem can be duplicated on someone else's set-up.

It's a shame the source code was apparently lost - wasn't it backed up anywhere for f sake when the servers were moved??  I guess not....   :o  :(