X10 Community Forum
🔌General Home Automation => Original ActiveHome => Topic started 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?)
-
@Chargin:
I've never used ActiveHome, so I can't comment on it for sure.
One thing I can suggest is that instead of:
"C:\Program Files\Home Control\x10comm.EXE" a3 on
in a Batch file, try this instead:
"C:\Program Files\Home Control\x10comm.EXE a3 on"
Let us know how it goes! :)
-
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...
-
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.
-
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.
-
Ok I should have said, this is just activehome not pro, no sdk and its a cm12AU (same as cm11)
-
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.
-
Put the command on a different line, like the example and try.
-
Still nothing.
@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe
a3 on
-
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
-
Oooppps. Sorry! B:(
-
Ok tried that still nothing
@echo
cd \
c:\Program Files\Home Control\x10comm.exe
a3 on
-
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.
-
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.
-
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. ;)
>!