Please login or register.

Login with username, password and session length

Author Topic: Using motion detector to switch on light while person is in a room (via macro)  (Read 7573 times)

SimonW

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7

For background.. my current home UK X10 setup looks after all the lighting (both main ceiling lights via wall switches and lamps via plug-in lamp modules) in a 3 of my rooms: lounge, master bedroom and guest bedroom.  Manual control is via a number of the stick-on wall switches in each room.  Automated timer control and macros are now provided by a recently purchased CM15 interface (branded as CM15Pro in the UK, although I’m led to believe this is the same as a CM15A); this being an ‘upgrade’ from the original CM12 interface I was using a number of years back and which I didn’t bother to re-instate following a house move last year – I’m pleased to say I’ve having much more success so far with the CM15 (touch wood seemingly!), personally I believe this is due to an improvement in both the AHP software as well as the interfaces further development.  I have also now disconnected my TM13U transceiver module and instead just have the CM15 doing all my transceiver activity across the necessary house codes – the TM13U was set to capture All House Codes and I found this was causing endless loops when used with macros in the CM15 (which I can kind of understand).

Now.. to my question (finally!):

I am attempting to make use of some spare X10 components I have never got round to using, specifically one of the motion sensors.  My objective is to have the lamp in my home-office automatically switch on when entering the room (when dark obviously), stay on while I’m in there (important!) and switch off when I’ve left.  I’ve got this mostly sorted now but I do have a concern.

I’ve achieved this my connecting my lamp to a plug-in lamp module (FYI programmed to D7).  I have then placed the motion sensor on top of my computer monitor (which also points at the door to the room) with the following settings: mode of operation = 1 (daytime PIR =on, night/day signalling = off), delay = 4 minutes, programmed to D5.  Within the CM15 I have the following two macros:

Macro 1 (Office lamp on with motion)
Trigger: D5 = ON
Conditions: Night time, Device status (D7) = off
Action: Turn on D7

Macro 2 (Office lamp off with no motion)
Trigger: D5 = off
Action: Turn off D7

My explanations / thinking (!): I only want the lamp to come on when it’s dark (ie. natural light from the window is not sufficient).  I’d ideally like to use the built-in photocell within the motion sensor so as not to have it triggering all the time during the day, although unfortunately I found the main problem with this is that if I turn off the ‘daytime PIR detection’ then it works fine for the first trigger but then does not capture any further movement while the light is on (assumingly it thinks it is ‘daytime’!!!), thus the light will always go off after the delay before then coming on again at the next movement – no use at all for me!!  So instead I have it operating 24hrs (daytime PIR diction = on) and I believe this sends the D5 = ON signal every time it detects movement (and then sleeps for 10 seconds before looking for movement again etc).  My CM15 macro is then triggered which both checks for it being night time AND the lamp being switched off (I was originally doing this with flags instead of a status check however as I don’t use the monitored house code functionality for anything else then I thought what the heck I’ll try out this feature!) before switching on the light (sending a D7 = ON).  So a person enters the room (after dusk) and triggers the above.  While being in the room further movement will trigger a D5 = ON and the macro will run again but the device status condition will prevent the macro from pointlessly attempting to switch on the already illuminated lamp (and thus prevents flooding my line with unwanted extra X10 commands).  This will continue until there has been no movement for 4 minutes, at which point a D5 = OFF will be sent and the macro triggers the light to be switched off (sending D7 = OFF).  This all works pretty well (FYI I’ve found it almost impossible to be in the room working away at my desk without triggering the sensor within 2 minutes, probably 1 minute even, however I went with 4 to be save).  The whole dusk timing thing isn’t perfect, the light probably comes on a little too early in the evening, but we’re only taking 20 minutes or so and this also compensates for particularly ‘dull days’.

My only concern surrounds the fact that whenever someone is in the room the motion sensor will be flooding my CM15 RF with D5 = ON commands (potentially every 10 seconds if they’re particularly active, although in practise about once every 30 – 60 seconds), and that each time this is causing it to do some processing.  Will this interfere with the operation of the rest of my X10 system?  I don’t mind a tiny bit more of a delay, but what I don’t want (for example) is a macro I have for lights to switch off on timer to be not sent, or someone else in the house having to repeatedly press a RF wall switch to turn off lamps because the CM15 is too busy listening to RF signals from the motion sensor.

Hope all this makes some kind of sense.  Any thoughts / input would be most welcomed!

Cheers, Simon
« Last Edit: December 29, 2008, 09:06:35 AM by SimonW »
Logged

USdangerboy

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 32

Had the same problem, solved it with a flag. I had the problem in my kitchen.  Here's the post:

"Motion Sensor & Macro to dim/raise lights when in kitchen "
http://www.x10community.com/forums/index.php?topic=17102.msg94178#msg94178

Basically, you use a FLAG to "start" the logic for the process.  So, you have the ON macro trigger test for time (after dusk) and set the flag ON.  Now all you have to do is work with the flag, when no motion, turn light off and clear flag.  I actually went a step further now; I have a "Dusk Setup" macro that runs 10 mins after dusk and sets the lights/flags where I want them, then use the flags as testing.

Alternatively, you can set the motion sensor to D7 and let it fire the light on/off if after dark on it's own and that avoids all the "trigger on" commands to your AHP. 

FYI: You can use the Activity Monitor in AHP to see what commands are running around your system; this helps to see if your conditions/macros are firing as expected.  Nice debug tool.

Let me know if this helps :-)
« Last Edit: December 29, 2008, 09:25:35 AM by USdangerboy »
Logged
If at first you don't succeed, skydiving is not for you.

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991

You gotta be careful when responding, SimonW is in the U.K., not the US.  X10 is X10 but the U.K. software and modules are different. AHP is not distributed there, they have their own software.
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

Jsnlong

  • Hero Member
  • *****
  • Helpful Post Rating: 17
  • Posts: 351
    • XKAR

You gotta be careful when responding, SimonW is in the U.K., not the US. X10 is X10 but the U.K. software and modules are different. AHP is not distributed there, they have their own software.
Yes UK don't have the AHP as we know it  but they do have Active home just not with all the plug-ins. Or maybe its just Active home and not Active home pro.
This site just say Actice home
http://www.uk-automation.co.uk/computer-interface-version-p-997.html

When telling people to "be careful in responding" you should be careful on how people would take that comment. You might scare them away from posting all together.
Never be afraid to post even if you think it can help. It might and if it don't then you learn from it  >!

Logged
People are afraid of robots taking their jobs......The same jobs they complain all day about doing!!

Join the chat at http://www.bdshost.com/ac/

Coach of XKAR
Xenia Kids And Robots
www.xkar.org

USdangerboy

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 32

Good to say, but no worries for me personally.  My skin is quite a bit tougher than that :-)  If only I could specifically determine my biggest problem to be an insult (NOT this one, this was someone mentiong a valid aspect) on a web post!!

Nevertheless, the bottom line is, it does not matter what country the unit resides in, it still uses power and transmits signals.  Accepting that premise as true, and, as per my post, there is a log available of these signals, then it can be debugged, regardless of its location. 

Occam's razor is a powerful tool, when not glossed over for our subliminal demand to seek out complication, i.e., "One should not increase, beyond what is necessary, the number of entities required to explain anything."

IMHO!  AND, if my initial premise is wrong, then I'm a complete idiot (which has yet to be effectively disproven actually) and that problem is bigger than any other!!

Good luck.
« Last Edit: December 29, 2008, 09:13:20 PM by USdangerboy »
Logged
If at first you don't succeed, skydiving is not for you.

Boiler

  • Guest

Actually, Marmitek in the UK distributes a European version of both the CM15a and ActivehomePro (X10 modules are tailored for the European market).  Their version of ActiveHomePro is currently at 3.236 (same as ours) and it comes with SmartMacros included. 

Furthermore, the software is free for download (without any screwy registration process).  I've downloaded it and run it from one of my spare PC's while troubleshooting a problem for one of our friends on the other side of the pond.

While the powerline interface is 230V/50Hz and the RF carrier is 433Mhz, the guts of the CM15a is the same.  Same capabilities, same problems. 

If you're interested, here's the link: UK ActiveHomePro

Edit: Corrected European Voltage and typos
« Last Edit: December 30, 2008, 11:10:31 AM by Boiler »
Logged

Boiler

  • Guest

Simon,

There can be a concern when using motion sensors in a very high activity area.  I have "upset" my CM15a by using multiple sensors (3) in my Kitchen/dinette. This normally occurred when the CM15a was trying to process multiple RF inputs and transmit on the powerline at the same time.

In your installation (single sensor tripping once every 10 seconds) I would not think this would be a problem.

One comment to check on your Macro - using the Device status may not work with certain types of X10 modules due to a AHP bug (at least our version has had this bug for years).  The affected devices are the higher end units that incorporate the Soft Start and preset dim features.  AHP uses a different X10 command set for these units.  Unfortunately if your macro sends a bright command of less than 100%, it will not set the Module Status to ON.  If you are using one of these devices replace your Module Status qualifier with a Flag.

Simple devices like the LM12 lamp dimmer are not affected since they use the standard command set.

Boiler

« Last Edit: December 30, 2008, 11:08:47 AM by Boiler »
Logged

tjosan

  • Jr. Member
  • **
  • Helpful Post Rating: 1
  • Posts: 11



While the powerline interface is 220V/50Hz and the RF carrier is 433Mhz, the guts of the CM15a is the same.  Same capabilities, same problems. 

If you're interested, here's the link: UK ActiveHomePro



The standard voltage in EU is actually 230V/50Hz.
Logged

SimonW

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7

Thanks for the input one and all!

Indeed (from my own experience at least!) here in the UK we do have a subset of ‘like-for-like’ X10 components available to us (main distributor is Marmitek) which have been tailed for the UK market in terms of suitable powerline interface voltage and RF frequencies.  Apart from this they should be pretty much identical – however as is evident in even the US domestic market X10 seem to have a habit of changing the specification/makeup of various components on the fly and without incrementing the product code in any way, so I guess the UK variants just add a further twist to the guessing game at times!  :)

FYI to clarify the voltage at which the UK operates on, well this is a bit of a quirky minefield tbh!!  230v 50Hz is now the European standard that everyone in Europe is working towards and has been ‘standard’ for new installations in the UK for approximately 10 years now.  Previous to that the UK standard was 240v 50Hz.  However due to allowed tolerances in practise most installations are pretty much of a muchness (ie. there’s no real widespread program to retrofit older installations).  Also, for the record, nearly all homes run in a single phase supply and with 3 phase supplies being reserved for commercial premises on an on-demand basis.  This isn’t to say 3 phase to a home is unheard of (it is available on request if needed by consultation with the local supplier) but would definitely be considered unusual / not the norm.  If anyone is especially interested I found the following while double checking the facts in this post to make sure I’m not talking rubbish: http://en.wikipedia.org/wiki/Electrical_wiring_(UK)

Cheers, Simon
Logged

SimonW

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7

Boiler / USdangerboy,

Thanks both for the pointers.

Seems I’m roughly working along the right sort of track then.  I actually expanded my macro last night so as to enable the night/day photocell of the motion sensor and then create an ELSE condition similar to the ON one as per above only instead of the NIGHTTIME condition this one queries the current night/day status (again by module status check) – the result being my lamp now also switches on when the room is just dark but not necessarily at night time (ie. when I entered the room this morning to open the blind – was daylight outside but I still risked tripping over things on my way to the window!).  I’ll see how things play out over the coming few days/weeks, however for now I’m quite happy with my lighting setup in this room!  :)

Boiler, thanks for the tip re. the device status not working with some extended commands etc.  I've already come unstuck with this one in other parts of my setup (using newer wall switches and plug in lamp modules in other rooms) and so have enabled the simplified option in the settings menu.  However for this room in question I'm using an old plug in lamp module (literally making use of old X10 stuff I found while sorting out a box of what I thought was just electrical extension cables etc from the garage over the Xmas break lol).

One question USdangerboy: in your post you suggested I could if I wished simplify things by having the motion sensor talk directly to my lamp module and make use of the built-in native night/day sensor (ie. disable the daytime PIR detection so as it only operated when dark).. this is indeed how I originally planned to use it (and indeed assumed the purpose for which it was manufactured for) however I came across the following issues:

- Firstly the light would never actually stay on!!  This if you think about it kind of makes sense: motion is detected, sends the ON command to the lamp, the room is lit up, the motion detector goes into ‘daytime’ mode and does not detect any more movement, the delay is reached (in my setup 4 mins) so the sensor sends the OFF command, the room is plunged into darkness, the motion detector goes into ‘nighttime’ mode and is ready for sensing again, the person in the room curses quite a bit and looks around to see what’s going on, motion is detected, sequence starts again!!  So in most interior setups this would never work as intended; however I could maybe see it working externally assuming the senor wasn’t located in the direct ‘path’ / zone of the light it was triggering.  Make sense?

- Secondly my main concern was potential unnecessary ‘noise’ I might be creating by the motion sensor sending an RF command up to every 10 seconds (“he’s moving”, “he’s moving again”, “yup he’s still moving”) and thus tie up the CM15 controller both in terms of RF transeiving and macro processing (“it’s already on, ignore it”, “yup again it’s already on, ignore it” as per my condition settings).  If I went for the simpler approach then wouldn’t the unnecessary noise be even worse – in that while I wouldn’t have the macro processing repeatedly (but which I’m fairly confident the CM15 can adequately handle and queue other requests) I would instead STILL be sending the same amount of RF commands but this time as well with each one being transceived and flooding my powerline with the (completely unnecessary) ON command.. I personally would think this would be a worse position to be in due to the one-way ‘fire and forget’ nature of X10 commands across the powerline coupled with the fact more often than not other devices behave in an ‘impolite’ manor – this creating the potential for once every 10 seconds (I’m assuming someone is dancing up and down in my office now btw!) other X10 commands to get trodden on!!  :)

As always any comments are greatly appreciated!!

Cheers, Simon
« Last Edit: December 30, 2008, 08:56:41 AM by SimonW »
Logged

USdangerboy

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 32

Simon,

First, I'll agree that your premises are valid and correct, as such:
1) X-10 devices, regardless of where they exist, are used primarily on alternating current (AC) based systems
2) X-10 devices, regardless of where they exist, transmit signals on the wiring used by the systems in premise #1
3) The intended design and manufacture of X-10 devices is such that the signals sent in premise #2 are used primarily to turn devices on and off.

This being said, I'll cut to the chase.

Before I begin, and in response to YOUR post, I understand the jist of it to be a problem with the OFF command.  Correspondingly, the "OFF" command, in my experience, is INDEPENDANT of lighting condition.  Only the ON signal depends on lighting, but the OFF command does not.  Makes sense right?  So, looking at how the EE is thinking, in a "psuedo-code" fashion, it's like this:

1: IF I sense motion Then ...
2: Send ON signal via RF to whatever code I am set to.
3: Now that I sent a code, I need to wait for no motion so I can send an OFF code.
4: While I sense no motion for whatever time I am set to wait in minutes, I will ...
5:   Keep waiting, unless I I sense motion during this time and if I do then I will ....
6:    Restart my wait time as if I just sent my ON code, which means I will now start over at line 4 now otherwise, I will continue to line 7.
7:  I'm done counting my wait period and I have not detected any motion so ...
8: Send OFF signal on whatever code I am set to.
9: Start waiting for motion again and if I sense motion, go back to line 1 and start processing.

This is the basic logic of an EE unit and how it thinks in pseudo-code, or english enhanced programming syntax.  So you can see, the OFF code conditions are not dependant on "dark", they only deal with time.  You can prove this by putting a sensor on night only and trying to trigger it during the day (fails) OR putting your EE directly next to the bulp in your lamp (back of EE to bulb of course) and watching it turn off after no motion.  Also important are angles of reflection of sensor waves off of glass and plastic.  I have found that sensors do NOT travel through glass, but they will travel through plexi-glass (clear plastic).  I replaced two panels in my French Doors with Plexi so the sensors would work through them :-)

OK, so back to the dissertation.  I had similar problems, and others, with my system trying to enjoy a myriad of setups.  Ultimately, I settled on the following, and it works 100%.

STEP ONE : GET IT WORKING PERFECTLY (see diagram)

Code: [Select]
My Setup (see diagram for more)
P5 is an Eagle Eye sensor set as follows:
-> Only respond to dark, or 24 hr operation OFF
-> 4 minute delay

P5 lamp module connected to a lamp on the nightstand
-> Plugged directly into module, no extension cord or power strip

When motion occurs in the room, the lamp turns on, after 4 minutes of inactivity, it turns off.  This only occurs at night.

This is now a working system that responds and acts the way I expect, all the time.  Quite frankly, there is only one way simpler of setting up probably no more simpler way of setting something up other than using a push button controller plugged into the same outlet/power strip

STEP TWO : FIGURE OUT WHY IT WORKS

The following things were done to make this work.

1) Anything on house code P has nothing to do with my AHP software.  In other words, nothing on the P house code is even listed, responded to, or controlled by anything in AHP. 
--> This effectively ISOLATES this setup from the AHP so I know it is operating independantly and shortcomings are solubale by addressing TWO components, the EE and the lamp module.

2) The motion sensor was strategically placed to only see motion as necessary; for example, it is near the floor facing away from my wall unit in the bedroom.  See diagram attached.
--> THis gaurantees accuracy of the sensor response/transmissions.

3) If I get up at night to go to the restroom, light goes on, after four mintues, it goes off.  If I go in the room, then the bathroom to brush my teeth, shower, then go to bed ... when I come out of the bathroom, the light is off, it goes on, I get in bed, turn on TV, light goes out after four minutes.
--> Sensor placement, battery condition, and nighttime only setting are attributed to this

4) When it is dark, and the light is off, and I move around in the bed, the lights do not go on.
--> Sensor placement

NOTE) The batteries are regularly replaced in my EE (WHEN WILL THEY PROVIDE WIRED EE's?!?!)
--> EE sensor is not reliable and not prone to random behaviour

NOTE) I did not need any other issues addressed as I have lights on my ceiling fans that operate via remote control from the bed so if I want reading lights, I use those, turn them off when I'm done and never need the nightstand light.
--> Solves issues around trying to get tricky with sensor placement to try and solve two different needs.

STEP THREE : CONSIDER WHAT MY NEW NEEDS ARE

Now that I know I have a fallback, and a base to work from, I can start doing more.  If I get complicated, and things start going haywire, I can always put it back to this position and it will work.

SO ... let's talk about getting fancy, as if:

1) I'm sitting on the bed watching TV and reading a book, so you want the light to stay on while you read (in this case, not using my ceiling fan lights for example)

2) I'm in the room, doing some work on the other side of the room, like my taxes or something else exciting and fun, all spread out on the floor, with minimal motions and sometimes 2-4 minutes of sitting still reading something.  Here, I'm outside where my particular sensor is set to sense motion, but I want the light to stay on.

3) I go through the deck doors and sit out on the patio outside the room and watch the TV on top of the wall unit having a cigar, but I want the the light to stay on.

4) I'm on the cell phone, walk in the bedroom to get something, and decide to sit down on the couch and complete my call and want the light to stay on, again, outside the range of the sensor.

5) I decide to use the lamp on the other nightstand (currently activated by the light switch) as part of my room X10 setup.

6) I decide I want to control the lights on my ceiling fans with my X10 system.


STEP FOUR : PROGRESS FORWARD

Meeting ALL the requirements above requires multiple sensors, macros with conditions, and some physical rewiring of my fans to bypass the current remote and wire them directly to an X10 unit which I would need to place in my ceiling, above the drywall.  I, of course, must consider how much time and effort I have for such a complex setup and think about the cost-benefit ratio: cost being time to implement and debug and benefit of having a fancy system and, of course, not having to press that so difficult button on my ceiling fan remote  :-)

Is this what you're interested in?  Need I go on? 

I can continue, but for now, I'm off to dinner with friends.  Also, the way I got these things to work may NOT be helpful or applicable to a UK unit as the reason for the system working may be due to the configuration I have working in the US but the same setup may not work due to differences in the UK systems that, unknown to me, prohibit the proper operation of MY particular setup in the US.  Additionally, use a service written on my XP PC to do this for me, outside of AHP, although AHP could do most of it (I did not mess with the ceiling fans B/T/W).

OK, so with the disclaimer laid out, LOL, I did not realize how much time it takes to write, what one believes to be, a careful and readable post :-)  I must go, time for some food!!  Let me know if this helps!  Cheers!
« Last Edit: December 31, 2008, 10:17:41 PM by USdangerboy »
Logged
If at first you don't succeed, skydiving is not for you.

SimonW

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7

USdangerboy: many thanks for taking the time to give a detailed explanation and background thinking of your setup!  You clearly have a vast amount of experience in this area, the results of which seem to be a very fancy and successful setup!  Congrats – it just shows to what level of complexity such a relatively simple premise can be taken to with enough time / effort / creativity etc.

My requirements for this particular room that brought rise to this question are much simpler (light to turn on when it’s dark and someone is in the room!) however as per most things like this I’m also using this as a learning experience / experimenting opportunity (haven’t used the motion sensor in any setups before) and therefore might expand to more complex configurations for other rooms.  If/when such a time arrives I’ll no doubt be sure to call on your experience/wisdom again!!

Honing in on a very simple/specific point here, I follow your explanation and pseudo code 100% - the key to my misunderstanding being that the motion sensors logic regarding the sending of the OFF command after a specific time period of non-movement is completely independent of any night/day (or rather dark/light) function, and indeed this is how I originally thought the device should have been designed.  In my initial experiments with the sensor this did not seem to be the case, HOWEVER: I started experimenting using macros straight away (as opposed to my first step which probably should’ve been direct control of the device) and at that time I had incorrectly both my (then newly purchased) CM15 transceiving the same relevant house code as my existing TM13 transceiver, the result of which being macros where looping and other spurious behaviour.  I initially believed that such a setup would be valid, with enough logic built into the devices not to ‘double transmit’ RF commands to the powerline, and aid me in extending my RF range.. however I’ve found this not to be the case and in any event the CM15 RF range in my installation manages to cover the whole house on its own therefore I have disconnected my TM13 and macros now work as expected.  The result of all this being I’m now attributing my inaccurate findings re. the on/off commands of the motion sensor to looping macros  :)

I have a second motion sensor I’m not using which I plan to put to the same use in my library.. as soon as I’ve freed up the lamp module that I’ll be using with it and that’s currently operating my Xmas tree!!  I’ll therefore set this up the much simpler way as per you describe and see how that goes.  While I’m quite happy with my current macro functionality etc I’m also generally a big fan of simple setups (less to go wrong!) and would look to move to this if the results where like-for-like or at least equally fitted my requirements; I can also see a potentially battery saving in the sensor if it’s now transmitting unnecessarily.

One final question I have is when you’re using the built-in photocell for the darkness-sensing – how ‘dark’ does it need to be?  In my setup this will be used for controlling a light in a home office and therefore I’m ideally looking for the light to come on around the time when you’d normally notice it’s getting a little dark outside and not enough natural light is coming through the window and lighting up the room in order for you to be able to read etc comfortably.. not simply when is so dark you’d be tripping over things!  I’m not really fussy about the EXACT timing – I’m sure 20 minutes or so either side of my personal preference is fine (and I’m sure my personal preference is different than another family member who may be using the same room etc); however I’m currently operating with no other easily accessible switch/control for the lamp.. have a stick on wall switch on order I was going to use however I seem to be fine without it so far and ideally that’s how I’d like it to stay.

Cheers, Simon

Ps. Hope you got your well deserved food in the end! :)
Logged

USdangerboy

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 32

Glad to be of help "-) and thanks.  I actually got there a bit late and they were already driniking, ready to party so I had a couple drinks and let them go to South Beach, as I had to be up early.  If I would have gone with them, I'd just be getting home about now (8AM)  :P

FYI: The pseudo-code I put above is based completely on my experience with the EE available to me here in the US and testing it while watching the Activity Monitor.  Basic method of cause and effect and watching results then successfully reproducing the results numeous times to verify.  I put a little time into setups in the beginning and assume nothing!

As far as exact LUX level for activation, I am working on that myself at present, excellent question.  I'm sure at the engineering level, the sensor component has a value, but I don't know what it is or who may know that number.  I have found that placing a sensor under a counter for instance, that is shadowed during the day, sometimes fires.  So this has been a little bit of a moving target so far but I move the sensors and test to try and get the best placement.  If I can come up with a translatable value, I'll let you know, but I think this might be pure trial and error.

As far as "double transmits", they are difficult to actually nail down, here's a copy of my log of events for a sensor I have on the porch for example.  As you can see, the EE sends 6 signals to the system on motion ...

ID: 50                                                  12/31/2008 12:26:36 AM
RF   N10 Off    (0  ) Time: 12/31/2008 5:26:35 AM         P1: n/a   EXT: n/a

ID: 51                                                  12/31/2008 12:26:36 AM
RF   N10 Off    (-1 ) Time: 12/31/2008 5:26:35 AM         P1: n/a   EXT: n/a

ID: 52                                                  12/31/2008 12:26:37 AM
RF   N10 Off    (0  ) Time: 12/31/2008 5:26:36 AM         P1: n/a   EXT: n/a

ID: 53                                                  12/31/2008 12:26:38 AM
RF   N10 Off    (-1 ) Time: 12/31/2008 5:26:36 AM         P1: n/a   EXT: n/a

ID: 54                                                  12/31/2008 12:26:39 AM
PLC  N10 Off    (n/a) Time: n/a                           P1: n/a   EXT: n/a

ID: 55                                                  12/31/2008 12:26:40 AM
PLC  N10 Off    (n/a) Time: n/a                           P1: n/a   EXT: n/a
ALERT: 3+ alert!  W/T/F?  N10 had 6 transmits in a row!  Was that necessary?


Interestingly, see the placement below?  It's going off when cars drive by the front of the house!  So, this is interesting as the sensor is situated almost 45 feet (14 meters) from the street!!  I can sit there and watch a car drive by, and see the log report, over and over again.  Also, I think it is detecting some reflection of motion from time to time off the stucco wall by my palms behind the sensor!  So, trial/error, action/event continues, I'll post the finals on this when they are in!!

When I have concrete results on these items, I'll post it :)
« Last Edit: December 31, 2008, 08:48:37 AM by USdangerboy »
Logged
If at first you don't succeed, skydiving is not for you.

USdangerboy

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 32

Simon,

THought you might like to know, I did find one issue you might find interesting.

I tested the system and found a mistake

When the EE is set to DARK ONLY, it does go to "sleep" for the delay it is set and DOES NOT detect any further motion!!  So the US and the UK units operate the same, it appears.

So for example, if I have the EE set to dark only, and a 4 minute delay, the following happens:

On motion -> ON signal sent on the code the unit is set to
Delay time counter starts -> Motion sensor is off during this time
Delay time is reached -> OFF signal is sent on the code unit is set to

NOW ... if I set the EE to 24 hr operation, then the pseudo-code I mentioned in the previous post is accurate.  The EE will restart the timer every time it detects motion, and it keeps looking for motion ALL THE TIME!  So the following occurs under this setting (NOTE this is a revision of my previous post taking OUT the "if it is dark" condition):

1: If I sense motion Then ...
2: Send ON signal via RF to whatever code I am set to.
3: Now that I sent a code, I need to wait for no motion so I can send an OFF code.
4: While I sense no motion for whatever time I am set to wait in minutes, I will ...
5:   Keep waiting, unless I I sense motion during this time and if I do then I will ....
6:    Restart my wait time as if I just sent my ON code, which means I will now start over at line 4 now otherwise, I will continue to line 7.
7:  I'm done counting my wait period and I have not detected any motion so ...
8: Send OFF signal on whatever code I am set to.
9: Start waiting for motion again and if I sense motion, go back to line 1 and start processing.

So the only way to get your intitial system working is to use a FLAG, IMO.

I resolved this months ago with a macro which is why it is behaving like I said originally.  So in the logic I posted, the "If it is dark, and I am set to dark" is being handled by the macro as "After Dusk and before Dawn" with the EE set to 24 hr motion.  NOW, this, of course, kills batteries much quicker :)

The macro, in order to do this, HOWEVER, requires a FLAG!!

I was not keeping notes at that time, but I do remember that the macro kept firing and was making me crazy.  Finally, I solved it with a flag. 

What I learned was, with 24 hr motion set EE's you must use flags or it will keep sending the signal over and over.  A FLAG setting lets the macro ignore the multiple sends and only do the work once.  Setting a flag to on when it fires the first time, and then testing for the flag status on each corresponding fire of the signal firing the macro, means it ignores it.  Once the delay time is reached, then you clear the flag and the process begins again.  Don't forget, you need an OFF macro as well, this is where you clear the flag.  Then the ON event will activate when it sends again b/c it passes the "is the flag clear" test.

Make sense?  If not, I'll do something detailed if you want to use a macro.  I'm sure there are other posts with brighter people in here on this, but now that it's back in my memory, I can write something if you need it.  Sorry to say, there is no way, as far as my tests show, to do what you want without a macro/AHP.  If you give me the codes of the units in play, I can write a little app you can use to test and prove what I'm saying.  Give me time though :)

Let me know if this is all clear, I'll write a little "White Paper" kind of thing at some point, but many things demand attention these days and committing to definite time frames is hard!!

Anyway, have to run to a New Year's party now, HAPPY NEW YEAR ... cheers!   :)




FYI: Here is my log from my final test.

Notice the following:
1) At ID 125 my N9 macro fired via motion turning on my kitchen lights at 10:30 PM
2) I went in and out of the kitchen and notice all the N9 ON commands, these were ignored by my macro due to the FLAG status
3) IF my EE were set to DARK ONLY, this unit would have rec'd an OFF command at 10:34 PM, it is on a four minute delay.
4) Notice at the end, ID 147, it turned off nearly 4 minutes exactly at 10:36 PM from the LAST ON transmit at ID 145.

The accurate time is on the same line as the ID number, b/t/w, the TIME:xxxx value is from the unit itself which is wrong, don't know why.

Hope this helps!!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 125                     12/31/2008 10:30:51 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:30:51 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 126                     12/31/2008 10:30:52 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:30:51 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 127                     12/31/2008 10:30:53 PM
PLC  M2  Bright (25 ) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen Hi-Hat Lights
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 128                     12/31/2008 10:30:54 PM
RF   N10 Off    (0  ) Time: 1/1/2009 3:30:54 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 129                     12/31/2008 10:30:55 PM
RF   N10 Off    (-1 ) Time: 1/1/2009 3:30:55 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 130                     12/31/2008 10:30:55 PM
PLC  N10 Off    (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 131                     12/31/2008 10:32:01 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:32:01 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 132                     12/31/2008 10:32:02 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:32:01 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 133                     12/31/2008 10:32:03 PM
PLC  N9  On     (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 134                     12/31/2008 10:32:15 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:32:15 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 135                     12/31/2008 10:32:16 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:32:15 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 136                     12/31/2008 10:32:17 PM
PLC  N9  On     (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 137                     12/31/2008 10:32:22 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:32:22 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 138                     12/31/2008 10:32:23 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:32:22 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 139                     12/31/2008 10:32:24 PM
PLC  N9  On     (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 140                     12/31/2008 10:32:28 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:32:28 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 141                     12/31/2008 10:32:30 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:32:29 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 142                     12/31/2008 10:32:31 PM
PLC  N9  On     (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 143                     12/31/2008 10:32:35 PM
RF   N9  On     (0  ) Time: 1/1/2009 3:32:35 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 144                     12/31/2008 10:32:36 PM
RF   N9  On     (-1 ) Time: 1/1/2009 3:32:35 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 145                     12/31/2008 10:32:37 PM
PLC  N9  On     (n/a) Time: n/a                        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 146                     12/31/2008 10:36:24 PM
RF   N9  Off    (0  ) Time: 1/1/2009 3:36:24 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ID: 147                     12/31/2008 10:36:25 PM
RF   N9  Off    (-1 ) Time: 1/1/2009 3:36:24 AM        P1: n/a   EXT: n/a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Kitchen EE Unit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALERT: 3+ alert!  W/T/F?  N9 had 17 transmits in a row!  Was that necessary?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
« Last Edit: January 01, 2009, 10:11:17 AM by USdangerboy »
Logged
If at first you don't succeed, skydiving is not for you.
 

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