Author |
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 13 2007 at 18:48 | IP Logged
|
|
|
As far as I can tell extended rf (security sensors) can't be used with multi-x. If there is any mystical code I am missing please someone clue me in.
I'm trying to set up occupancy automation using modified door/window sensors tripping in series to count how many people are in a given room. I'm using motion sensors right now but it's been kludgy and if I can get multi-x to like the sensors I should have a much more reliable setup.
If it's not even possible, consider this a feature request Dave. :D
Edited by guerrand - February 13 2007 at 18:48
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 13 2007 at 19:10 | IP Logged
|
|
|
I do this now with two Hawkeyes!
You need to make sure that the X-10 devices are NOT specified in Setup for Multi-X to function.
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 13 2007 at 19:29 | IP Logged
|
|
|
I actually got the idea from you Tony. lol
I am doing a modified version of what you outlined in the other post. I have one watching a common hallway, and one on each of two doorways. What I want to do tho is use the door/window sensors, modified to use an optical switch, to more accurately track movements.
It's working pretty well as is but I always feel I can improve on things. lol
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 13 2007 at 20:28 | IP Logged
|
|
|
Ah! I got you now. Door/window sensors... <pay attention, tony>
The only issue I have with the motion sensors is the recycle time (takes about 6 seconds). I thought I saw a hack once that added a transistor to activate the On button to bypass that, but I can't find it anymore.
Have you tried controlling virtual X10 devices?
If that does not work, you may need to track this with a few GV's (maybe DWP0, DWP1) and a timer.
Edited by TonyNo - February 13 2007 at 20:29
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 13 2007 at 20:43 | IP Logged
|
|
|
6 seconds eh. I was playing around with one and it seems to be about 1 second for an open/close cycle(based on time codes in ph stat window.
Virtual x10 could be worth looking into.
Globals sound like a good possibility. Just tie them to some triggers and it might do the trick.
I'll be sure to update on any progress, and of course full details on the final masterpiece. :D
__________________ VuMe
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 15 2007 at 00:27 | IP Logged
|
|
|
Ok, so some progress has been made.
I have completed the assembly of the detector and a preliminary emitter.
The Detector.
Don't mind the extra hole next to the actual ir photoreceptor. I was trying to have an all in one rangefinder setup but found it works better with a separate emitter acting as a 'tripline'
The Emitter.
Don't mind the big ugly crack in it. It decided to complain about me drilling a hole in it. lol
I have the detector set up in ph to a virtual x10 and it is responding correctly. The sad fact I have come across is that I can't find a straightforward way of plugging it into my existing multi-x macro. It don't like the virtual x10.
I might have to go the route of gvs and a timer as you suggested Tony. However I'm not sure exactly how to set it up for it to maintain the count and take appropriate action. If I could get a general example of the setup I would be able to have it set up in no time I'm sure.
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 15 2007 at 07:45 | IP Logged
|
|
|
How do you have the macro set up? Take a look mine. Motion detectors are F1 (outside) and F3 (inside).
Code:
Goto Label ph_multix ( "F", 1, 2 )
Goto Label "Out"
Comment IGNORE
Label F030200000
Label F0302F0303
Label F0102F0103
Label F0102F0102
Label F010200000
Goto Label "Out"
Comment IN
Label F0102F0302
Set Global MASTER BR OCC {MASTER BR OCC}+1
Goto Label "Out"
Comment OUT
Label F0302F0102
Set Global MASTER BR OCC if( {MASTER BR OCC} = 0, {MASTER BR OCC}, {MASTER BR OCC} - 1)
Jump if( {MASTER BR OCC} = 0, 1, 999)
Device Control INSTEON+MBR LIGHT+OFF
Label Out |
|
|
I have a trigger that fires when MASTER BR OCC changes to >0 to turn the light on (I should clean this up a bit).
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 15 2007 at 11:06 | IP Logged
|
|
|
As you've found out, multi-x only works on standard X10 commands and doesnt work with virtual X10. However, it would be real easy to set this up.
First, create a trigger that fires on "X10 RF In Ext" with trigger ID and Number of "(Any)" and "Any Command". Have this triggers action be a "Raw Formula" with the following formula:
Code:
ph_setglobal_s("MULTIEXT",string([TEMP3],"000") + string([TEMP4],"000") + left("{MULTIEXT}",114)) |
|
|
Next create a global variable called "MULTIEXT". Set the initial value to 120 0's (000000 repeated 20 times).
The global variable MULTIEXT is your incoming extended queue. The trigger updates this queue with each incoming extended command. Incoming extended command are in the format of unit (0 to 255) and command (0 to 255). So if unit 145 send a command of 32, the trigger would update the MULTIEXT queue with an entry of 145032. Each incoming multi-ext command is 6 characters long and the queue holds the most recent 20 entries. The newest entries are at the beginning with the older entries at the end.
You can even make this more familiar by creating a macro to simulate the standard ph_multix function. Do this be creating a macro called "MULTIEXT". Create a single line of command type "Set System" with ID of "[LOCAL1]". Set the formula to:
Code:
mid("{MULTIEXT}",(LOCAL1] * 6 - 5,[LOCAL2] * 6) |
|
|
Thats it. Call the macro using the ph_macroparmret function and it will work just like the ph_multix function. For example, if you want a string of the last two multi-ext commands, use the following syntax:
ph_macroparmret("MULTIEXT",1,2,0,0,0)
This will return a string of 12 characters in the format detailed above.
HTH,
Dave.
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 15 2007 at 11:10 | IP Logged
|
|
|
Dave.... you ROCK.
I'm gonna set that up now and test it out.
__________________ VuMe
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 17 2007 at 00:49 | IP Logged
|
|
|
Well, I'm happy to repot that it's working perfectly. I just needed to make a couple changes to get it working exactly the way I wanted.
I dropped holding all the values from the sensors and have it reset after each cycle. I also set it to only pay attention to the open signals. I didn't need the close for the sys to work.
It is now completely fault tolerant. anyone that pokes their head halfway into my room don't throw off the count any longer :D
You might want to look into it Tony. It's really easy to mod the door/window sensors for this. Also, I found that the mini sensors sold at radio shack (see the reciever above) work great for this since you can have it act as 2 sensors in one. Just wire one ir pohotoreceptor in place of the magnetic switch built in and connect the second to the terminals at the bottom. One unit, two passageways! :D
Of course anyone else that might be interested in doing this, I'll post full details of the final setup if there's an interest.
I just need to do more testing on the lifetime of the emitters. I might end up redoing those if the battery life isn't as good as I want.
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 17 2007 at 12:06 | IP Logged
|
|
|
Hmm. So that's a 49-1001.
Are there two codes sent, one for each input?
What phototransistor did you use and how did you connect it (any pull-up's or bias resistors)?
What about the emitter side? Is that off-the-shelf, or did you make it?
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 17 2007 at 13:07 | IP Logged
|
|
|
That's the one Tony.
Yup, two distinct device codes come from it. One code refers to the built in magnetic switch and the other is for the screw down terminals at the bottom of the unit.
I used the basic 276-142 ir pair. No extra parts, just wired straight in. On the receptor polarity doesn't even matter.
My rule is, why buy it when you can make it yourself. :D
The emitter was made with the emitter from the pair I mentioned above. I'm prolly going to make some changes to that half but for now it's built into a 2 aa enclosed holder, one aa slot is used for the emitter holder and the power switch. I'm going to change it to a 4 or more qq setup with the batts connected in parallel to maximize the life of the emitter.
You just have to remember to not exceed 1.7 volts for it. I made that mistake just once. Not many things sound like an exploding led. lol
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 17 2007 at 16:16 | IP Logged
|
|
|
This is perfect and just what I have been wanting to make! I may just ditch making the angled brackets to hold two Hawkeyes.
Once device + two unique inputs = directional sensing
I'll pick one up today. Thanks again.
Edited by TonyNo - February 17 2007 at 16:18
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 17 2007 at 16:20 | IP Logged
|
|
|
no problem.
I was doing the bracket type thing for a bit too. but it was so sensitive to presence I kept getting false hits. With this it won't go off unless you actually pass directly between. Just make sure it's not in a place where it gets hit by direct sunlight. It makes ir too after all. hehe
If you have any questions just let me know.
__________________ VuMe
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 17 2007 at 16:40 | IP Logged
|
|
|
I put all the code details in the repository including an export of my light control macro. For anyone interested. hehe
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 17 2007 at 20:42 | IP Logged
|
|
|
Good going!
I think I'm doing this a bit differently and will put two phototransistors into one unit.
Edited by TonyNo - February 17 2007 at 23:43
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 17 2007 at 23:45 | IP Logged
|
|
|
That RS emitter seems to not have functional range beyond about 8". I'm driving it with the rated current of 150mA.
Once I find a good way to light it up, it should be great.
Edited by TonyNo - February 18 2007 at 00:05
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 18 2007 at 00:27 | IP Logged
|
|
|
Nice install job on those. Very clean.
That way is good if you just want it to handle one door. On mine I have them angled from each other to have one act as half of two different doors that just share this little hallway.
I have mine running on a single aa for now and that spans a doorway no problem. Make sure you have the polarity sorted on that. The positive is the longer one on the emitter. What are you using for your emitter rig?
__________________ VuMe
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 18 2007 at 11:10 | IP Logged
|
|
|
I need one set per door. It's too likely that anything else would cause problems here.
You have no current limiting resistor? I don't think that will last very long!
I'm using both ir led's from the pairs mounted in a small enclosure lid, to be surface-mounted to the door frame, powered by a wall wart.
Emitter Front
Emitter Rear
|
Back to Top |
|
|
guerrand Senior Member
Joined: December 18 2005 Location: United States
Online Status: Offline Posts: 106
|
Posted: February 18 2007 at 14:45 | IP Logged
|
|
|
Nice. If you have both photoreceptors in the one rat shack unit you could probably get by with just one emitter in the rig. As long as it's not a wider span than a normal door. I've found that mine are reliably received about 6 inches beyond the width of a door.
Yea, you're right about the resistor. Both my emitters are doa now. lol. Should be an easy fix tho. They were just quickies for testing anyway. Whenever I take on a project like this it goes through a few stages of evolution.
I'm assuming those leads go to a battery pack somewhere off stage.
__________________ VuMe
|
Back to Top |
|
|