X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Software Problems & Bugs => Topic started by: gpio on October 15, 2008, 06:07:29 AM

Title: ActiveHome Pro SDK (ahcmd) random error.......
Post by: 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
Title: Re: ActiveHome Pro SDK (ahcmd) random error.......
Post by: Charles Sullivan on October 21, 2008, 10:55:38 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.

Title: Re: ActiveHome Pro SDK (ahcmd) random error.......
Post by: gpio on October 21, 2008, 11:26:32 AM
Thx,

Can you be more specific about the SDK classes?

Quote
Another 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

Title: Re: ActiveHome Pro SDK (ahcmd) random error.......
Post by: Charles Sullivan on October 21, 2008, 12:08:28 PM
Thx,

Can you be more specific about the SDK classes?

Quote
Another 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.

Title: Re: ActiveHome Pro SDK (ahcmd) random error.......
Post by: -Bill- (of wgjohns.com) on October 22, 2008, 01:23:07 AM
Thx,

Can you be more specific about the SDK classes?

Quote
Another 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:

Code: [Select]
// 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!");
}

Code: [Select]
// 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!

 >!
Title: Re: ActiveHome Pro SDK (ahcmd) random error.......
Post by: gpio on October 23, 2008, 08:47:26 AM
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