Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: Newbie - X10 Computer Interface  (Read 8369 times)

wxforecaster

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Newbie - X10 Computer Interface
« on: September 25, 2006, 01:19:25 PM »

We have a Visual Basic program for Windows that processes quite a bit of meteorological data. I have a client working in a large facility and may not be near his computer at all times. His request is straight forward -- when condition X is met, I would like to have the computer turn on an attached light or siren. There should also be the ability to turn it off.

It looks like I've come to the right place, but I'm lost in the millions of pages of information on this site. My basic questions are:

Where can I purchase such a light or siren? Do these decives require external power sources or are battery powered ones available?
Do they connect via serial port or USB? Where do I acquire code to tell the device to turn on or off?

I've done a lot of reading about X10 and understand just how powerful and diverse it can be. I'm just hoping that I posed in the right forum and that someone can help me understand the bare necessities to get such an interface functional. I'm sure this has been done thousands of times over, so excuse my ignorance.

Thanks in advance,
Evan
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 93
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: Newbie - X10 Computer Interface
« Reply #1 on: September 25, 2006, 10:34:16 PM »

We have a Visual Basic program for Windows that processes quite a bit of meteorological data. I have a client working in a large facility and may not be near his computer at all times. His request is straight forward -- when condition X is met, I would like to have the computer turn on an attached light or siren. There should also be the ability to turn it off.

It looks like I've come to the right place, but I'm lost in the millions of pages of information on this site. My basic questions are:

Where can I purchase such a light or siren? Do these decives require external power sources or are battery powered ones available?
Do they connect via serial port or USB? Where do I acquire code to tell the device to turn on or off?

I've done a lot of reading about X10 and understand just how powerful and diverse it can be. I'm just hoping that I posed in the right forum and that someone can help me understand the bare necessities to get such an interface functional. I'm sure this has been done thousands of times over, so excuse my ignorance.

Thanks in advance,
Evan

I gather you understand the general idea behind X10 signals sent over the AC powerline.

The potential problem in a "large facility" is that the powerline may not be clean enough for reliable transmission of X10 signals due to noise or signal loss due to other equipment.  Or there may be numerous branches of the powerline which meet only at a distribution transformer, with little opportunity for an X10 signal to bridge the gap between branches.  X10 signals can be transmitted via RF, but the range is somewhat limited - I wouldn't count on more than 20 feet.

If the potentially limited RF range doesn't faze you, and assuming that you can execute a command line from your Visual Basic program at the appropriate time, here something you can try at minimal expense where you can test both powerline and RF transmissions:

1. Purchase the CK18A 4 piece "Firecracker" kit ($46 from X-10 or $26-$30 from eBay X10 dealers, shipping included).
  I've dealt with this eBay dealer several times and had very good service, including once when I needed a replacement under warranty:
      http://stores.ebay.com/The-Home-Automation-Store

2. Download a copy of this (free) software:  http://stafney.com/~tstafney/opensource/cm17a/win32/cm17a.zip

Here's more of a description of the Firecracker kit: http://www.x10.com/firecracker/fc_sitting2_br1ab.htm

Action plan for testing:
Plug the CM17A Firecracker RF transmitter from the kit into serial port COM1
Plug the TM751 Transceiver from the kit into a nearby AC receptacle and plug an incandescent lamp into the TM751.  Leave the TM751 houscode dial set on 'A'.
Execute the command \path-to\cm17a.exe   com1  on   A  1
The lamp should turn On.
Use the HR12A "PalmPad" RF remote from the kit (needs  4 AAA batteries) to turn the lamp Off.
Plug the LM465 Lamp Module from the kit into a more remote AC receptacle and plug the lamp into it.  (Hopefully this receptacle will be on the same branch of the AC circuit as the TM751 Transceiver.)  Leave the dials on the LM465 set on housecode A, Unit 1.
Again execute the above command.
If the X10 powerline signal from the Transceiver is reaching the Lamp Module, the lamp should again turn On.

In short, what we're doing above is using the CM17A Firecracker to send an RF signal to the TM751 Transceiver (which has a built-in appliance module on Unit code 1), and then the TM751 is sending a powerline signal to the Lamp Module.

If the Lamp Module works and your client also wants sound, I recommend adding an X10 UM506 Universal Module configured for momentary chime operation - it's generally loud enough to be heard but not ear-shattering like an X10 siren (which would probably have everyone in the place scrambling for the exits.)

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

wxforecaster

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Newbie - X10 Computer Interface
« Reply #2 on: September 26, 2006, 10:03:20 PM »

Charles,

Thank you so much for your reply.

Actually the biggest issue that I may have is the Serial port. As I'm sure you, and most forum members are aware, fewer and fewer PCs come with serial ports anymore in lieu of 4-8 USB2.0 ports.

I had come across a USB controller at SmartHome.com, but when I talked to their reps, they weren't sure whether or not the USB device could be accessed via command line. Apparently it comes with software that communicates with the device.

From what I've read, most users access X10 in 3 manners:
1.) Manual button pressure through a device or software
2.) An automated timer through a device or software
3.) A trigger from an external device (i.e. motion sensor, 5" of rain in a rain gauge, etc...)

It seems that the software for the USB controller expects 1 of these 3 conditions to be utilized.

Unfortunately, as stated earlier, I need to programatically turn on/off the device based on conditions that are known to me (and my software) but totally external to X10.

I think a serial port driven device will work fine (since I can fire it command line arguments), but I was hoping there was a similar approach with a USB X10 controller to make the software more applicable in universal/future settings as the obselecense of serial ports becomes too great.

Thanks in advance. I am in the process of checking out the components you recommended. Certainly worth the monetary investment for testing/exploratory purposes. By the way, I think they are looking for a siren that will "knock their socks" off.

I had two questions:

1.) I assume there's a similar command line argument to turn the device "off" if a RF unit is not handy and they want to do so via computer?
2.) Do you have to plug specific devices into the control? (i.e. can I go buy any obnoxious sounding device and/or light that fits into the socket??)

By the way, when I mentioned large facility, it's actually under construction. The only electricity in use is for construction tools at this juncture.

Thanks,
Evan
« Last Edit: September 26, 2006, 11:08:30 PM by wxforecaster »
Logged

TakeTheActive

  • Hero Member
  • *****
  • Helpful Post Rating: 126
  • Posts: 1047
  • Old !@#$% Tinkerer!
Re: Newbie - X10 Computer Interface
« Reply #3 on: September 26, 2006, 10:24:02 PM »

Actually the biggest issue that I may have is the Serial port. As I'm sure you, and most forum members are aware, fewer and fewer PCs come with serial ports anymore in lieu of 4-8 USB2.0 ports.

Send a PM to: JimC  ;)

My work horse computer has 6 serial ports (all in use) and 8 USB ports ( most in use). It also has 2 video cards, two monitors and two sound cards. It is only an 880 machine but it work fine for what I need.
Logged
Low Post Count != Low Knowledge - High Post Count != High Knowledge ;)

ADVICE TO X-10 NEWBIES FROM AN X-10 OLD-TIMER

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Newbie - X10 Computer Interface
« Reply #4 on: September 27, 2006, 12:46:10 AM »

Evan (wxforcaster),

Active Home Pro (AHP) and the included CM15A USB interface has both a command line interface and a COM / ActiveX compatible component that can be accessed with Visual BASIC.

I have used the COM / ActiveX component in both Visual BASIC and scripting with good results.

You can order AHP with the CM15A here:
    http://affiliates.x10.com/?property=affiliates&aposition=text12&lineid=xtenafftxt12&affid=x10_11165386421&type=href

You can get the AHP SDK here:
   http://www.activehomepro.com/sdk/index.html

Send me an email if you need help, or have questions.  bill@wgjohns.com

Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 93
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: Newbie - X10 Computer Interface
« Reply #5 on: September 27, 2006, 01:13:06 AM »

Charles,

Thank you so much for your reply.

Actually the biggest issue that I may have is the Serial port. As I'm sure you, and most forum members are aware, fewer and fewer PCs come with serial ports anymore in lieu of 4-8 USB2.0 ports.

I had come across a USB controller at SmartHome.com, but when I talked to their reps, they were sure whether or not the USB device could be accessed via command line. Apparently it comes with software that communicates with the device.

From what I've read, most users access X10 in 3 manners:
1.) Manual button pressure through a device or software
2.) An automated timer through a device or software
3.) A trigger from an external device (i.e. motion sensor, 5" of rain in a rain gauge, etc...)

It seems that the software for the USB controller expects 1 of these 3 conditions to be utilized.

Unfortunately, as stated earlier, I need to programatically turn on/off the device based on conditions that are known to me (and my software) but totally external to X10.

I think a serial port driven device will work fine (since I can fire it command line arguments), but I was hoping there was a similar approach with a USB X10 controller to make the software more applicable in universal/future settings as the obselecense of serial ports becomes too great.

I just tried using that little cm17a program I mentioned with a USB->Serial adapter, with mixed results.  It works with an el-cheapo adapter but doesn't work with  a Keyspan adapter at twice the price.  Go figure.  I think the problem is that the RTS and DTR serial lines (which both power and actuate the CM17A) are being returned to the "inactive" state too quickly at the conclusion of the program.  If your VB program can default these two lines to "active", that may solve the problem.

An alternative approach is to use the USB  ActiveHome Pro CM15A Interface ($50).  The (free) Software Development Kit you can download for it from X10 has a command line program.  The CM15A can send RF as well as powerline signals.  You would use the ActiveHome Pro GUI only to setup the interface, then afterwards use the command lines:
  (For RF commands)      \path-to\ahcmd.exe  sendrf  A1  on  (or off)
  (For PLC commands)   \path-to\ahcmd.exe  sendplc  A1 on (or off)

One possible hangup with the ActiveHome Pro is that you MUST have an Internet connection to install or upgrade the software.

If you decide to try this route, you'll have to get the other components separately (i.e., TM751 Transceiver, AM486 Appliance Module, HR12A PalmPad remote).  The idea behind having both the TM751 and AM486 is that if the powerline is dirty, you can fall back on the TM751 and use RF signals, whereas if the powerline is "clean", you can get greater distance from the computer with the AM486.  Note: The TM751 and AM486 both have 2-prong polarized sockets.  If you need 3 prong grounded for OSHA, get the AM466 Appliance Module instead of the AM486.

Quote
Thanks in advance. I am in the process of checking out the components you recommended. Certainly worth the monetary investment for testing/exploratory purposes. By the way, I think they are looking for a siren that will "knock their socks" off.

The X-10 sirens will do that,  but requires a continuous stream of PLC commands to keep sounding.  If the client wants something that will keep sounding until turned off, he'll probably be better off with any sounding device that will operate immediately when powered up on 120 VAC, which  could be plugged into either the TM751 or an X10 AM486 Appliance Module.

Quote
I had two questions:

1.) I assume there's a similar command line argument to turn the device "off" if a RF unit is not handy and they want to do so via computer?
2.) Do you have to plug specific devices into the control? (i.e. can I go buy any obnoxious sounding device and/or light that fits into the socket??)

Yes to question 1. 

Either a 120 VAC sounding device or a lamp (or both) can be plugged into an AM486 Appliance Module.  Only an incandescent lamp can be plugged into a LM465 Lamp Module.

One final comment:  If the siren and/or lamp need only be a few feet from the PC, it would seem that all you'd really need is a relay board of some sort which could be turned On and Off by having your VB software toggle one of the serial control lines on either a serial port or a USB->Serial adapter.  I'm sure such a board must be available, but can't offer any suggestions.  You might try posting a query on the comp.home.automation Usenet newsgroup.

Quote

By the way, when I mentioned large facility, it's actually under construction. The only electricity in use is for construction tools at this juncture.

Thanks,
Evan
Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

wxforecaster

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Newbie - X10 Computer Interface
« Reply #6 on: September 27, 2006, 02:53:57 AM »

What a wonderful forum, thanks for all the help!

On the serial port front -- the good news is that I found the protocol and even raw ActiveX code for both the CM11A and CM17A controllers to give me some great out-of-the-box options. Indeed the serial commands from Visual Basic are simple, setting the RTS and DTR lines to true or false as needed based on command received. In both programs, the code defaults to setting both the RTS and DTR to true to keep the port active in perpetual standby until another X10 command is received (or the program terminated). One would *think* this perpetual standby would suffice to solve the problems inherent to some USB-serial adapters?

I will be purchasing some various equipment to test on. The Home Automation Store link looks like a winner with prices of $30 for the CK18A kit.

The CM15A USB seemed like the best idea, but I would like to keep all code internal to my program. Assuming the AHP SDK is all that is required, then this may ultimately work. Unfortunately the same code provided here: http://www.activehomepro.com/sdk/index.html appears to be written in Visual Basic .NET and not standard VB6.
 
Charles, who did you recommend for serial to USB adapters?

Evan
« Last Edit: September 27, 2006, 03:03:53 AM by wxforecaster »
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 289
  • Posts: 12729
Re: Newbie - X10 Computer Interface
« Reply #7 on: September 27, 2006, 07:11:05 AM »

Just remember that the CM11A is not being carried by many dealers anymore and I don't think you will find it on the X10 sales pages. They where pushing the interface with the RCA logo [OEM] recently for like $9.99 [if memory is not gone completely]  ::)
Logged

JimC

  • Hero Member
  • *****
  • Helpful Post Rating: 41
  • Posts: 631
Re: Newbie - X10 Computer Interface
« Reply #8 on: September 27, 2006, 07:25:58 AM »

wxforecaster,

I am currently using the USB to serial adapter located at the following link. Although I have never used it on a CM11A I have used all four of its ports on numerous types of equipment including radios and WX stations with no problems. It came with a CD for setting up the ports and only took minutes to get it going.

http://www.usbgear.com/ALL_usb_serial_cables/usb_serial_quad_port_converter.html
Logged
_ _ ...  ..._ _

wxforecaster

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Newbie - X10 Computer Interface
« Reply #9 on: September 27, 2006, 12:04:09 PM »

Brian,

Isn't the difference that the CM11A actually lets the device trigger an X10 signal back to the computer (2-way street), versus the 17a which is a one way outbound street? Granted the 17a more than solves my application needs, but for my personal home use, I can think of dozens a way I'd want a flip of a switch, etc... to trigger something to occur on my PC. If the CM11A isn't the correct product for that task, then what are folks using?


Jim, thanks for the USB-serial adapter link.

Evan
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 93
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: Newbie - X10 Computer Interface
« Reply #10 on: September 27, 2006, 12:43:05 PM »

What a wonderful forum, thanks for all the help!

On the serial port front -- the good news is that I found the protocol and even raw ActiveX code for both the CM11A and CM17A controllers to give me some great out-of-the-box options. Indeed the serial commands from Visual Basic are simple, setting the RTS and DTR lines to true or false as needed based on command received. In both programs, the code defaults to setting both the RTS and DTR to true to keep the port active in perpetual standby until another X10 command is received (or the program terminated). One would *think* this perpetual standby would suffice to solve the problems inherent to some USB-serial adapters?

I will be purchasing some various equipment to test on. The Home Automation Store link looks like a winner with prices of $30 for the CK18A kit.

The CM15A USB seemed like the best idea, but I would like to keep all code internal to my program. Assuming the AHP SDK is all that is required, then this may ultimately work. Unfortunately the same code provided here: http://www.activehomepro.com/sdk/index.html appears to be written in Visual Basic .NET and not standard VB6.
 
Charles, who did you recommend for serial to USB adapters?

Evan


I hesitated to recommend the ActiveHome Pro at first because of the extra software complexity required for such a simple job.  If the CM17A will work that's still my best choice.  (I had run into that DTR/RTS inactive problem with other software so suspect that's the problem here, but no guarantees.  A serial breakout box showed the lights flashing the same with both USB->Serial adapters.)

The RCA HC60RX (RCA branded CM11A) is still on sale at X10 for $10  plus $6 S&H, or was still up on their sale page last night.  If you can't find it there, try calling them and asking for SKU: HC60RX-VT-KIT-TEL. 

The Firecracker kit includes a Lamp Module.  Pick up an AM486 or AM466 Appliance Module from the same source to operate the siren.

I got my el-cheapo USB->Serial adapter from Sewell (http://www.sewelldirect.com).  ($17.95) However I know the (Prolific) chipset was upgraded since I got mine.  You can also check ByteRuneer (http://www.byterunner.com).  They have one for around $10 as I recall.  My Keyspan is model USA-19HS ($40).

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org
 

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