X10 Community Forum

🔌General Home Automation => Original ActiveHome => Topic started by: Chargin on November 10, 2010, 07:55:40 PM

Title: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 10, 2010, 07:55:40 PM
2 part question.
Firstly is there any sort of inbuilt hotkey setup in activehome?

Secondly how do I get batchfiles to work?

I made a bat with this

START "C:\Documents and Settings\SS\Desktop\lamps.EXE"

Lamps exe is just a shortcut a la

"C:\Program Files\Home Control\x10comm.EXE" a3 on

The shortcut works fine when I click it but when its called via a bat file it doesnt work.
Would a better way be to make a bat file that looks like this

"C:\Program Files\Home Control\x10comm.EXE" a3 on (I tried this but windows doesnt like the a3 on bit on the end?)
Title: Re: Hotkeys for activehome? and batchfiles
Post by: anthonylavado on November 11, 2010, 01:31:09 AM
@Chargin:

I've never used ActiveHome, so I can't comment on it for sure.
One thing I can suggest is that instead of:
Code: [Select]
"C:\Program Files\Home Control\x10comm.EXE" a3 onin a Batch file, try this instead:
Code: [Select]
"C:\Program Files\Home Control\x10comm.EXE a3 on"
Let us know how it goes!  :)
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 02:39:57 AM
yes I did try that but it didnt work, no error or anything and no lights either..
I read about batch files today and I think I understood the writeup to say I had to have a % before an argument, is that right? I tried %a3 on at the end but that didnt work either...
Title: Re: Hotkeys for activehome? and batchfiles
Post by: hawk1 on November 11, 2010, 10:10:26 AM
This is how I made a batch file for my camera software:

@echo
cd\
cd c:\program files\blue iris
ahcmd sendplc c1 on

Just an example you could go by.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: jrwhit on November 11, 2010, 11:59:11 AM
May we assume you have downloaded the ActivehomePro SDK?
This software interface allows you to use commands to interact with AHP and your CM15A via scripts.
I find this method of control works well sending all sorts of commands to my home automation PC from other PC's on my network.
Here is a typical command to make this work:

Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\YourPCNameHere\root\cimv2:Win32_Process")
result = objProcess.Create ("C:\Program Files\Common Files\X10\Common\ahcmd.exe sendplc d11 on", null, null, intProcessID)

This is a visual basic scripting file which I saved as D11On.vbs. A simple shortcut on the desktop of a networked PC, when double-clicked, turns the D11 module on.
There are more examples in the SDK documentation for other programming languages.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 05:13:39 PM
Ok I should have said, this is just activehome not pro, no sdk and its a cm12AU (same as cm11)
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 07:09:34 PM
Tried this

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe a3 on

Didnt work.

This is how I made a batch file for my camera software:

@echo
cd\
cd c:\program files\blue iris
ahcmd sendplc c1 on

Just an example you could go by.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: hawk1 on November 11, 2010, 08:06:49 PM
Put the command on a different line, like the example and try.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 08:10:17 PM
Still nothing.

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe
a3 on
Title: Re: Hotkeys for activehome? and batchfiles
Post by: ITguy on November 11, 2010, 09:38:38 PM
Looks like you have an extra "CD" in there!  You show:

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe
a3 on

It should probably be:

@echo
cd \
c:\Program Files\Home Control\x10comm.exe a3 on

ITguy
Title: Re: Hotkeys for activehome? and batchfiles
Post by: hawk1 on November 11, 2010, 09:49:47 PM
Oooppps.  Sorry!      B:(
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 10:22:28 PM
Ok tried that still nothing

@echo
cd \
c:\Program Files\Home Control\x10comm.exe
a3 on
Title: Re: Hotkeys for activehome? and batchfiles
Post by: hawk1 on November 11, 2010, 10:46:13 PM
Okay, how about this:

@echo
cd \
"c:\Program Files\Home Control\x10comm.exe"
a3 on


The other thing you can do is put a pause at the end, that way you might be able to see what the problem is.
If this doesn't work you might want to try a AutoHotKey script instead of a batch file.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: Chargin on November 11, 2010, 11:38:30 PM
OK IT WORKS!

@echo
cd \
"c:\Program Files\Home Control\x10comm.exe" a3 on

I tried adding the pause and then it worked, I took the pause out and it still works...
Maybe there was a space or something somewhere, I dont know if that would cause a problem.

Thanks all.
Title: Re: Hotkeys for activehome? and batchfiles
Post by: -Bill- (of wgjohns.com) on November 30, 2010, 10:52:36 PM
Since the path to the executable; c:\Program Files\Home Control\x10comm.exe contains a space, you must surround the whole thing in quotes, or Windows gets confused and stops at the space.  ;)
 >!