Please login or register.

Login with username, password and session length

Author Topic: ActiveHome Pro SDK (ahcmd) random error.......  (Read 11529 times)

gpio

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
ActiveHome Pro SDK (ahcmd) random error.......
« 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
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: ActiveHome Pro SDK (ahcmd) random error.......
« Reply #1 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.

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

gpio

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: ActiveHome Pro SDK (ahcmd) random error.......
« Reply #2 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

Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: ActiveHome Pro SDK (ahcmd) random error.......
« Reply #3 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.

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

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: ActiveHome Pro SDK (ahcmd) random error.......
« Reply #4 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!

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

gpio

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: ActiveHome Pro SDK (ahcmd) random error.......
« Reply #5 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   
Logged
 

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