Please login or register.

Login with username, password and session length

Author Topic: help w/ macros, flags, MS14's, & ghost triggers  (Read 6142 times)

Hubbidaddy

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
help w/ macros, flags, MS14's, & ghost triggers
« on: March 16, 2008, 08:15:57 AM »

I got hooked on x-10 after I used it to design an interactive display for the Smithsonian A&S. Now I have used about 60 unit codes and still going in my home. I can usually just read posts to get my answers, but this one has got me.

I have 600W of recessed lighting in my kitchen that has multiple entrances, and 4 kids that are incapable of turning off the lights when they leave. I didn't want the lights to come on with motion, just turn them off after everyone has left the room. Kitchen lights use a 3 way WS paddle set to A2. MS14's are set to B10 & B12. Macros = [B10 on = set flag 4] : [B12 on = set flag 5] : [B10 off = if flag 5 is clear, clear flag 4 then A2 off, else clear flag 4] : [B12 off = if flag 4 is clear, clear flag 5 then A2 off, else clear flag 5]. C11 was set up the same way, current code is listed above.

It works 50%, but usually turns off while there is plenty of motion several times a day. I have added and since removed a 3rd MS to increase coverage to no avail, I have increased the time delay for the MS off command to no avail, and finally spent a whole weekend monitoring it and capturing log files. here are some events;

313 03/09/2008 9:47:43 Receive RF C11 On
314 03/09/2008 9:47:43 Receive C11 (K Motion north)
315 03/09/2008 9:47:44 Receive C On (K Motion north)
316 03/09/2008 9:47:44 Receive RF B12 On
317 03/09/2008 9:47:45 Receive B12 (K.Motion East)
318 03/09/2008 9:47:45 Receive B On (K.Motion East)
319 03/09/2008 9:47:47 Receive RF B10 On
320 03/09/2008 9:47:47 Receive B10 (K Motion West)
321 03/09/2008 9:47:48 Receive B On (K Motion West)
322 03/09/2008 9:49:03 Receive RF C6 On
323 03/09/2008 9:49:52 Receive RF C6 Off
324 03/09/2008 9:49:52 Receive RF C6 Off
325 03/09/2008 9:51:23 Receive RF C11 Off
326 03/09/2008 9:51:24 Receive C11 (K Motion north)
327 03/09/2008 9:51:24 Receive RF C11 Off
328 03/09/2008 9:51:24 Receive C Off (K Motion north)
329 03/09/2008 9:51:31 Receive RF B12 Off
330 03/09/2008 9:51:32 Receive B12 (K.Motion East)
331 03/09/2008 9:51:32 Receive B Off (K.Motion East)
332 03/09/2008 9:51:41 Receive RF B10 Off
333 03/09/2008 9:51:42 Macro A2 (Kitchen Lights)
334 03/09/2008 9:51:42 Macro A Off (Kitchen Lights)

It worked there ^

But not here v

362 03/09/2008 9:57:14 Receive RF B12 On
363 03/09/2008 9:57:14 Receive B12 (K.Motion East)
364 03/09/2008 9:57:14 Receive RF C11 Off
365 03/09/2008 9:57:15 Receive C Off (K Motion north)
366 03/09/2008 9:57:30 Receive RF B10 Off
367 03/09/2008 9:57:31 Receive B10 (K Motion West)
368 03/09/2008 9:57:31 Receive B Off (K Motion West, K.Motion East)
 
and I get these occasionally

70 03/09/2008 9:30:52 Receive ExtendedDataTransfer

which is.........?

because of line 368 I have placed each MS on an unused house code, placed the AHP module in the kitchen, and have the same trouble.

I have an almost identical system in my basement and it works fine. I am not using the MS +1 codes.

I have been looking at the positive loop feedback using MS code +1 for an additional flag....
Any suggestions would be appreciated!


« Last Edit: March 16, 2008, 08:18:21 AM by Hubbidaddy »
Logged

Boiler

  • Guest
Re: help w/ macros, flags, MS14's, & ghost triggers
« Reply #1 on: March 16, 2008, 09:37:14 PM »

Hubbidaddy,

Programming displays for the Smithsonian - that's definitely the big time.  If you have time to fill us in, please do.  We're always looking for fresh ideas.

A few comments about your setup -

313 03/09/2008 9:47:43 Receive RF C11 On
314 03/09/2008 9:47:43 Receive C11 (K Motion north)  Transsceived event
315 03/09/2008 9:47:44 Receive C On (K Motion north)
316 03/09/2008 9:47:44 Receive RF B12 On
317 03/09/2008 9:47:45 Receive B12 (K.Motion East)  Transsceived event
318 03/09/2008 9:47:45 Receive B On (K.Motion East)
319 03/09/2008 9:47:47 Receive RF B10 On
320 03/09/2008 9:47:47 Receive B10 (K Motion West) Transsceived event

From the log snippet it appears you are receiving all of your RF via the CM15a.  I'd call that a good thing - the fewer receivers the better.

It also appears that all of your RF is being transceived onto the powerline.  That may be a bad thing - it's not accomplishing anything for you and it's clogging the line.  If at all possible, disable transceiving  for these housecodes or move your sensors to a housecode that you can disable.


362 03/09/2008 9:57:14 Receive RF B12 On
363 03/09/2008 9:57:14 Receive B12 (K.Motion East)
364 03/09/2008 9:57:14 Receive RF C11 Off
365 03/09/2008 9:57:15 Receive C Off (K Motion north)
366 03/09/2008 9:57:30 Receive RF B10 Off
367 03/09/2008 9:57:31 Receive B10 (K Motion West)
368 03/09/2008 9:57:31 Receive B Off (K Motion West, K.Motion East)

From your description, I assume that your lights turned off after line 368.  I don't see a B12 off anywhere - shouldn't that have prevented the lights from turning off?  Is this possibly a logic problem - you obviously have some rather complicated macros.

70 03/09/2008 9:30:52 Receive ExtendedDataTransfer

Best guess is a status response from a 2-way capable module.  Do you have any Leviton 2-way units or PR511 flood lamps?

Other general suggestions -
1) More motion sensors may not = better coverage.  You need to make sure that two motion sensors can't be triggered at the same (or nearly the same) time.  There's no collision detection for RF.  Multiple signals may collide and prevent reception.
2) Make sure that your detectors are not facing windows or other direct light sources.  This can prevent triggering.  You mentioned that a similar setup works in your basement.  Have a good look at your detector placement VS light sources there.
3) In general, areas of "high activity" can be problematic for motion sensors and the CM15a.  It's been quite a while since I played with this, but I can remember overwhelming my old CM15a ('04 model) with RF from a single motion sensor in my Kitchen.  Eliminating the housecode transceiving should help.

Let us know how things are progressing - and post your code if you can (I'd love to see it),
Boiler
Logged

Hubbidaddy

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: help w/ macros, flags, MS14's, & ghost triggers
« Reply #2 on: March 18, 2008, 07:50:38 PM »

I work for AAI in Hunt Valley MD. One of our most popular products is the Shadow 200 UAV system the Army uses to observe and identify objects of interest from the air. Our system has almost 300K flight hours and climbing since we have at least 6 air vehicles over Iraq every minute of every day. The Smithsonian is opening a new exhibit at the DC facility for UAV's. We have 2 in the exhibit, and they wanted one to be interactive. I was approached with the problem of making our video payload interactive from a custom ground station without the use of computers, and would not be allowed to make any major modifications to the AV (It has to be as it was flown). Since the public will be able to operate the payload and view it on a monitor, it had to perform 7 days a week, 10 hours a day. It was not designed to operate for that type of durations. I needed to be able to turn the unit on and off reliably without adding any wires. I modified a mini timer with a multi stage external push button so it would send the 'ON' code and activate a delay circuit I designed to activate the sleep function within the 4 second window for 15 minutes. A super socket located in the ceiling with the AV power supply turns on when the button is depressed, and it shuts off 15 minutes later. The AV (1026 Screaming Demon) has been hanging for just over a week, but the ground control station is still being built. I can control it from my prototype, but I always have to finish my testing before the museum opens. The exhibit is scheduled to officially open mid to late April.

I have made some mods to my macro system, removed some items, and added a chime so retriggers will be audible even if the lights are off. I will try to change my transceived codes after I stop the leak in my basement. I am also working on some reliable flood sensors for my basement.
« Last Edit: March 18, 2008, 07:59:02 PM by Hubbidaddy »
Logged

Hubbidaddy

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: help w/ macros, flags, MS14's, & ghost triggers
« Reply #3 on: March 18, 2008, 07:57:40 PM »

Attached is my code before I began butchering it tring to solve this problem.
Logged

Boiler

  • Guest
Re: help w/ macros, flags, MS14's, & ghost triggers
« Reply #4 on: March 24, 2008, 11:22:37 PM »

Attached is my code before I began butchering it tring to solve this problem.

Hubbidaddy,

Sorry for the delay.  I finally got a chance to look through the code that you posted.

I've been re-discovering a number of things while I was looking though your setup (this happens a lot at my age).  Over the years I've been very anal about not putting X10 commands on the powerline if they were not absolutely necessary ( I.E. - don't turn on a lamp that's already on).  I thought I had a good reason for that, and just
re-discovered why.

Statement:
The Cm15a microprocessor has a known fault that prevents it from using interrupts to service incoming X10 commands (and most likely RF).  X10 has "worked around" this problem by implementing a "polling" routine that samples incoming requests. 

Conjecture:
1) As a result of the above, I believe that macro statements should be viewed as a series of "callable" routines. 
2) Each of these routines can be separated by a "I/O Poll" to retrieve X10/Rf requests. 
3) If a "poll" occurs during a macro execution (say during a delay statement), a second macro could start executing (seemingly out of order).


Assuming the above is correct, your B10 macro would then become:

B10 ON
If B10 on
Set Flag 4
{check I/O Status}
Turn A2 ON

Pointers -
1) The CM15a will ignore RF transmissions while it is in the process of executing a X10 Macro command (it goes deaf to RF).  Try to prevent unnecessary ON commands when modules are already on (use flags to determine the on/off state)/
2) Dim/Bright commands extend the X10 transmission period and therefore extend the "deaf period".
3) Make absolutely sure that the menu item tools/preferences/macro options - "Issue On in place of bright 100% checkbox is selected".  Having this "unchecked" will cause the CM15a to issue a series of "bright" commands to achieve 100% at the lamp.  This will take roughly 5 seconds and the CM15a will be deaf to Rf during that time.

The following is a series of RF tests that I performed to document the behavior of the CM15a using different macros.

Sorry if this seems a bit flimsy at the moment.  I believe I have the data to support these suppositions.  I don't currently have the time to present them properly (way past my bedtime).

Boiler

« Last Edit: October 25, 2009, 05:27:54 PM by Boiler »
Logged

Hubbidaddy

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: help w/ macros, flags, MS14's, & ghost triggers
« Reply #5 on: March 25, 2008, 08:58:38 PM »

Boiler,

Thanks for your attention to my issue. It will take me a while to digest and apply your experience with macros and the cm15. It has taken a back burner to a bathroom renovation that evolved from a simple leak. I have applied your "do not transceive macro house codes and have tried to keep them on separate codes. I did notice that the kitchen lights have seemed to stabilize from turning off unexpectedly, but now have developed the habit of turning them on in the middle of the night. This is most peculiar because there is no code in any macro to turn them on. I am hoping to get back on it this weekend. Thanks for the help!

Logged
 

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