Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: This SDk works with a CM19A?  (Read 62219 times)

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
This SDk works with a CM19A?
« on: March 09, 2006, 12:21:20 AM »

I have a CM19A and I'm trying to send a simple command as a test, in an ASPX wrote in C# but it doesn't work...

I tried this:

I put a buttom, and in the buttom's click a put this code:

private void Button1_Click(object sender, System.EventArgs e)
{
   Type t = Type.GetTypeFromProgID("X10.ActiveHome");
   ActiveHomeClass control = (ActiveHomeClass)Activator.CreateInstance(t);
   object o = control.SendAction("sendrf", "a3 off", null, null);
   Console.WriteLine("Result="+o.ToString());
}

The result is zero, but no command is sent. (The red led doesn't get on at any time)


Any help.
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #1 on: March 09, 2006, 04:48:17 PM »

Is any body supporting this forum?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10523
  • I don't work for X10, I use it successfuly!
Re: This SDk works with a CM19A?
« Reply #2 on: March 09, 2006, 08:56:00 PM »

I don't think this SDK will work with the CM19A others have tried and switched to the  CM17a firecracker  because there are many example codes posted all over the Web. see SDK control of CM15a vs CM19a using VB  I realize your not using VB but this is just an example! ;) ;D
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: This SDk works with a CM19A?
« Reply #3 on: March 09, 2006, 08:57:59 PM »

I was pretty sure that the SDK should work with the CM19A. I'll check and see.
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #4 on: March 09, 2006, 11:08:38 PM »

Thanks, I'll be waiting for you   ;)
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #5 on: March 11, 2006, 10:25:29 PM »

I found something weird, it receives events from the CM19A, but it cannot send commands.

Is there any setup to indicate to the SDK to use the CM19A?

I don't understand why it can receive but no to send. ???

Any comment????

------------------------------------------------------------------------------------------------
By the way, in the first post I didn't explain very well what I did:  :-\

I built an ASPX (ASP .Net) with a button on the C# language, and in the button's click event I dispatch a command to the X10 units.  8)

Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: This SDk works with a CM19A?
« Reply #6 on: March 13, 2006, 03:13:30 PM »

I tested and was able to send RF with the CM19A. I used ahcmd.exe (included with the SDK) and just did "sendrf a1 on" and a few other commands and they were transmitted correctly. Can you try that and see if it works for you?
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #7 on: March 14, 2006, 08:54:19 PM »

I tried these commands:

C:\Program Files\AHSDK\bin>ahcmd sendrf a1 on

C:\Program Files\AHSDK\bin>ahcmd sendrf a3 on

C:\Program Files\AHSDK\bin>ahcmd sendrf a2 on

No one works, I'm trying to activate some wireless cameras, and I have windows XP Profesional with Service Pack 2 installed.

Is there any configuration tool for these SDK?
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #8 on: March 14, 2006, 09:13:34 PM »

i found something new....

If the "X10 Device Network Service" is stopped, I can send a command (ex: C:\Program Files\AHSDK\bin>ahcmd.exe sendrf A3 On) and it works, but it starts the service, and I cannot send more commands.

I stop the service again and I can sent another command. But again it starts the service and fun is over.

Any comment???

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10523
  • I don't work for X10, I use it successfuly!
Re: This SDk works with a CM19A?
« Reply #9 on: March 14, 2006, 09:32:51 PM »

Its been along time since a SDK update perhaps it's due! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

VBMarc

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: This SDk works with a CM19A?
« Reply #10 on: March 14, 2006, 10:25:08 PM »

Hi everyone,

I have spent a lot of time monkeying with this, here's what I've been able to figure out:

The ahcmd.exe (included with the SDK) will support the CM19a, but only as a receiver, and not as a transmitter. I have never been able to use the SDK to make the sendrf command work. In contrast, it receives RF beautifully.

Then I tried the ActiveX component "hspi_CM19A_USB.ocx" from Patterson, which I obtained from x10.patterson.cx/x10/. With this component, I was able to send RF from the CM19A. The little red LED even lit up! The syntax for this component is very different from the X10 sdk, but once you get the hang of it, it makes sense.

Oddly, the receive function of the Patterson ActiveX component does poorly – it misses a lot of signals (e.g. it picks up the PalmPad, but not signals from the CM17a Firecracker).

So to have a fully functioning CM19a, I had to write an app that uses BOTH ActiveX components. One to handle sending, one to handle receiving.  Ugh!

In reply to the comment from X10 PRO that "I tested and was able to send RF with the CM19A": please, please read the posts on this forum. It is a constant complaint that "sendRF" does NOT work using the SDK for either the CM15a or CM19a.

As for me, I followed Dave’s advice, tossed all that junk, and used the CM17a Firecracker as described in the thread Tuicemen points to (see SDK control of CM15a vs CM19a using VB). As Tuicemen indicates, I used VB, but it should work for any PC language.  If X10 makes an activex component that supports "sendrf", then maybe I’ll go back to the CM19a. As Tuicemen says "Its been along time since a SDK update perhaps it's due".
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: This SDk works with a CM19A?
« Reply #11 on: March 15, 2006, 07:41:00 PM »

VBMarc: I read the posts, tested on my systemm, and was able to send RF with both the CM15A and CM19A. The original poster, cewongq, was also able to send RF via the CM19A, albeit only once before having to restart the process.

We do need to do an update to the SDK, as we have some code changes in (based on customer feedback) that we haven't released yet. I will make sure we do that soon, and then maybe you can try it again.
Logged

cewongq

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 11
Re: This SDk works with a CM19A?
« Reply #12 on: March 16, 2006, 10:48:48 PM »

Hey VBMarc, can you send me an example?.

I downloaded it, but I don't understand how it works.   ;D
Logged

VBMarc

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: This SDk works with a CM19A?
« Reply #13 on: March 17, 2006, 12:19:47 AM »

Hi cewongq,
Here is some stuff to get you started, I'll send you a zip as well.

1) Download and install the ActiveX component hspi_CM19A_USB.ocx from http://x10.patterson.cx/x10/
2) To work on a PC, you must also install the Firecracker drivers
   from http://www.x10.com/support/support_soft1.htm
   I used Version 2.0.0.82 xfire.exe

Create a form in VB (sorry, don't know C)
Add a reference to the ActiveX component hspi_CM19A_USB.ocx
At the top of the module add

      Dim WithEvents oFC As hspi_CM19A_USB.cFirecrackerUSB
'though you can leave out withEvents since they haven't been overly useful

' In the Form_Load sub, add:

    Set oFC = CreateObject("hspi_CM19A_USB.cFireCrackerUSB")
    debug.print "Is the CM19a Connected? " & oFC.Connected


' add some buttons that call the subs below
' housecode is "A", or "B",... etc
' devicecode is  1, 2, etc

Sub lightOn(housecode As String, devicecode As Byte)

    oFC.command = cON
    oFC.housecode = housecode
    oFC.devicecode = devicecode
    oFC.SendCmd
   
End Sub

Sub lightOff(housecode As String, devicecode As Integer)

    oFC.command = cOFF
    oFC.housecode = housecode
    oFC.devicecode = devicecode
    oFC.SendCmd

End Sub
~~~~~
cON and cOFF are enums included in hspi_CM19A_USB.ocx
So instead of the syntax of "sendrf A1 on", the syntax here is to
create an object. Then for that object,
set the command property, the housecode property, the devicecode property,
and THEN use the method SendCmd
A little awkward, but it works.

Let me know if that helps / if it works for you.
Logged

billy

  • Sr. Member
  • ****
  • Helpful Post Rating: 7
  • Posts: 110
Re: This SDk works with a CM19A?
« Reply #14 on: March 20, 2006, 10:23:17 AM »

cewongq,

X10Pro is correct the CM19A does work!  I have been using the CM19A to SEND commands to my Ninjas, UX21A VCR Commander, and to the CM15A (not connected to my PC).  I RECEIVE the RF activity from my remotes, motion sensors and from another PC running Mister House(CM17A/MR26A).  The Mister House software uses the CM17A & MR26A to communicate to the CM15A for the PLC commands, and handles my web interface for my IA Audreys and remote access to my house.
 
Make sure you have installed the driver for the CM19A listed as: "X10 USB Firecracker Interface V2.36" listed in Device Manager.

X10nets.exe process needs to be running to use ahcmd.  "X10 Device Network Service" listed in services = "X10nets.exe" in Processes window of the Task Manager. If I kill the process and try the "ahcmd.exe sendrf l8 on" windows will restart the X10nets.exe process automatically and then turn on L8.   It's normal for the service to be running. I can execute many ahcmd functions right after another.

You can try the Javascript example in the SDK for the PalmPad, just change "sendplc" to "sendrf" in the html file.

ActiveHomeObj.SendAction("sendplc",commandString);
ActiveHomeObj.SendAction("sendrf",commandString);

Works Great for me.

Little known fact the CM19A/CM15A CAN also send & receive security system commands, but not with the X10 drivers.

Good Luck!
Logged
"I would rather live my life as if there is a God and die to find out there isn't, than live my life as if there isn't and die to find out there is."  Albert Camus
Pages: [1] 2
 

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