X10 Community Forum

🖥️ActiveHome Pro => SDK => Topic started by: stevenb on November 06, 2009, 02:23:13 AM

Title: Controlling the ActiveHome hardware from an external program
Post by: stevenb on November 06, 2009, 02:23:13 AM
I am attempting to control the ActiveHome hardware from another program, but having trouble figuring out where to start.

I have tried to utilize the command prompt (ahcmd) to send commands outside of the ActiveHome GUI, but I keep reciving this error within the command prompt window:

ActiveScript Error: {sendplc | sendrawplc....| queryplc}

Hence, I can't really play with the command prompt. However, this is not my ultimate goal. Eventually, I want to send simple commands to the hardware from an external program (like MatLab, for instance.. still figuring out if there is a way to do this). I do not want to use any of the standard inputs to issue commands, as the commands that will be sent to the hardware will originate from another program (i.e., I am building a program that executes the appropriate ActiveHome command "Turn on light" when it receives an input command)

Any ideas?
Title: Re: Controlling the ActiveHome hardware from an external program
Post by: stevenb on November 06, 2009, 04:10:29 PM
I should elaborate: I want to create a program that receives a string via a local UDP port. Depending on the contents of the string, the program determines a specific command, and sends it to ActiveHome (i.e., sends "Turn light a1 on")

Title: Re: Controlling the ActiveHome hardware from an external program
Post by: abreup on November 23, 2009, 08:51:53 AM
Hi,

Can you specify the environment? OS, code language, PC/MAC, etc. After that I believe I can help you.
Title: Re: Controlling the ActiveHome hardware from an external program
Post by: joako on November 26, 2009, 06:38:11 PM
What I have heard (but not verified) is the AHP SDK is not a real SDK. The description that I read it seems more like an API.

Here is some documentation on the communications protocol and suggestions how to talk with the  CM15A hardware directly from Windows: http://www.linuxha.com/USB/cm15a.html
Title: Re: Controlling the ActiveHome hardware from an external program
Post by: Dan Lawrence on November 26, 2009, 09:12:00 PM
That does not work with Windows.    B:(
Title: Re: Controlling the ActiveHome hardware from an external program
Post by: EL34 on December 13, 2009, 05:00:04 PM
I control all my X10 devices using my own VB.net programs.
I have other software I have written that makes decisions and turns on and off devices.

If you can write your own software, you can control X10.
I don't even run the AHP pro software, except to set up a new device and download that to the CM15A.

Are you trying to control from outside your local network, via the web??
If so, you would have to have some sort of listener software that listens to a specific port.

Title: Re: Controlling the ActiveHome hardware from an external program
Post by: BitsNBytes on March 02, 2010, 10:54:12 PM
Depending on what language you are using maybe we can help. Once you decide on a language and get the API up and running you can do almost anything.

I talk to my CM15a via my phone and control the X10 devices remotely - the key is to decide what compiler you are going to use for the CM15a connection.
Title: Re: Controlling the ActiveHome hardware from an external program
Post by: Charles Sullivan on March 02, 2010, 11:39:41 PM
I am attempting to control the ActiveHome hardware from another program, but having trouble figuring out where to start.

I have tried to utilize the command prompt (ahcmd) to send commands outside of the ActiveHome GUI, but I keep reciving this error within the command prompt window:

ActiveScript Error: {sendplc | sendrawplc....| queryplc}

Hence, I can't really play with the command prompt. However, this is not my ultimate goal. Eventually, I want to send simple commands to the hardware from an external program (like MatLab, for instance.. still figuring out if there is a way to do this). I do not want to use any of the standard inputs to issue commands, as the commands that will be sent to the hardware will originate from another program (i.e., I am building a program that executes the appropriate ActiveHome command "Turn on light" when it receives an input command)

Any ideas?


The error message appear to indicate a syntax error in your usage of ahcmd.  What happens if you manually enter an ahcmd at the command prompt?  If any question, post an example here of an actual ahcmd line which produces the error.