ActiveHome Pro SDK (ahcmd) random error.......

Started by gpio, October 15, 2008, 06:07:29 AM

Previous topic - Next topic

gpio

I have installed ActiveHome Pro 3.23 & ActiveHome
SDK my appliances etc
I developed a program using  the SDK  (ahcmd) command.

But I have a major probem: Randomly, execution of ahcmd
pops up a windows error dialog box.

Tetsbed info:
WinXP SP2
CM15A
AM12

Charles Sullivan

Quote from: gpio on October 15, 2008, 06:07:29 AM
I have installed ActiveHome Pro 3.23 & ActiveHome
SDK my appliances etc
I developed a program using  the SDK  (ahcmd) command.

But I have a major probem: Randomly, execution of ahcmd
pops up a windows error dialog box.

Tetsbed info:
WinXP SP2
CM15A
AM12

You're not alone.  I experienced the same thing with ahcmd in AHP 3.206, especially when invoking the 'ahcmd sendrf' function, even from the command prompt.   I think ahcmd.exe is just too buggy to invoke from a program.

Another programmer informed me he had no problems like this when using the SDK classes and you may need to go that route.

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

gpio

Thx,

Can you be more specific about the SDK classes?

QuoteAnother programmer informed me he had no problems like this when using the SDK classes and you may need to go that route.

I have installed AH SDK but it is unclear to me how to use it...

More precisely it would be great if I manage to intergrate AH SDK into  my java project


Charles Sullivan

Quote from: gpio on October 21, 2008, 11:26:32 AM
Thx,

Can you be more specific about the SDK classes?

QuoteAnother programmer informed me he had no problems like this when using the SDK classes and you may need to go that route.

I have installed AH SDK but it is unclear to me how to use it...

More precisely it would be great if I manage to intergrate AH SDK into  my java project



Sorry, I'm not a Windows programmer and don't understand a lot of this stuff myself.  Perhaps one of the Windows programmers who frequent this forum can give you some guidance.

Using ahcmd seemed like a straightforward way of porting my Linux UX23A and UX17A IR control programs (which employ the CM17A "Firecracker") to Windows using the CM15A or CM19A as the RF transmitters.   Unfortunately it didn't work out and I abandoned the effort.

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

-Bill- (of wgjohns.com)

Quote from: gpio on October 21, 2008, 11:26:32 AM
Thx,

Can you be more specific about the SDK classes?

QuoteAnother programmer informed me he had no problems like this when using the SDK classes and you may need to go that route.

I have installed AH SDK but it is unclear to me how to use it...

More precisely it would be great if I manage to intergrate AH SDK into  my java project



I'm not sure how helpful this will be as it is actually javascript code and I don't have much experience with writing code for java itself, but here goes:


// Create the X10 object
try {
var X10Obj = new ActiveXObject("X10.ActiveHome");
}
catch(exception) {
alert("This program requires that you have X10's ActiveHome Pro software installed!");
}



// SendCommand(sID, sCommand) function:
// This function uses the X10 object's SendAction() function to send the command via PLC
// sID = the X10 module address (i.e. "A1" - "P16")
// sCommand = the X10 command to send (i.e. "On", "Off", etc.)
function SendCommand(sID, sCommand) {
try {
X10Obj.SendAction( "sendplc", sID + " " + sCommand );
}
catch(exception) {
}
}


I'm not sure how (or indeed if) you can get java to create an instance of an ActiveX or COM object like the above javascript code does.

At any rate, I hope that gives you a few clues, and if you get it working in java, please post back and let all of us know how it is done!

Good luck, and may the programming gods smile upon you!

>!
-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!

gpio

There are some open source libraries that allow you to call from Java directly .dll methods.

I will try them (hopefully during next weeks) and I will come back with my results.

Thx for the info.

gp   

SMF spam blocked by CleanTalk