Send commands to CM15A via commandline over the network???

Started by berniejr72, November 11, 2008, 06:58:24 PM

Previous topic - Next topic

berniejr72

I know that I can use the ahcmd.exe to use command line instructions to control my CM15A, however is there a way for me to accomplish this from a different PC on my network?  The reason I'm looking for this is because I want to keep my automation laptop and my media server as separate machines.  I would however like the ability for my "media extender PC's" with a custom interface to control functions (lights and appliances) in the room in which they reside.

Noam

I do exactly that using "psexec". It is part of the free PSTOOLS package.
Look it up on the web.

berniejr72

Great stuff!!!!  Thanks!

So your coomand looks something like this

psexec \\activehomepc c:\ahcmd.exe sendplc a2 on   ??

Is ahcmd limited to only basic commands like on/off/dim/query?

Also if you dont mind can I ask what program you use these two utilities with?

berniejr72

 :)%   Noam you are the man!   :)%

I downloaded and tested the program and it works to perfection! 

Thanks again.

Noam

I've actually written a few CMD scripts for the commands I use most. I have a shortcut to those commands from one of the other PCs.
It works out very well for me.

EL34

I use remote desktop sharing to go to the PC that has my X10 control software running.
When you click on any RDP connection shortcut, you are looking at the desktop of that PC.


I have a 5 PC network here. Remote desktop is a pretty cool free program in XP

Not sure if that is what you wanted to do, just throwing out info.
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

berniejr72

EL34, thanks for the input.  I'm aware of RDP and VNC, and the likes.  The biggest hurdle that I was trying to get over is that I'm using a program called Xlobby to create a custom interface to control my A/V system via 3 touchscreen panels and a couple of PPC's throughout the house.  Being able to control everything including my automation items from a single interface is the ultimate goal.  PSEXEC and AHCMD combined will allow me to do this, as Xlobby can utilize command-line commands to perform functions.

Talisman

Hi ive just found this old topic.

Can anyone tell me how they got this to work as im struggling over my network.

im trying to send this

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

When it gets to the computer name HS it goes no further.

Noam

First of all, what operating system are you running on "HS"?
Can you execute the command locally on "HS"?
Can you execure the command manually (from the command prompt) at the remote PC?

This was a while ago, but when I moved my AHP over to a Windows 7 system, I remember there were some permissions issues with being able to use psexec to run AHCMD commands over the network. I did get it worked out, but I don't remember all of the details of how I did it.

If you are trying to run the command from within a script, perhaps you need to escape the quotes or something along those lines.

Talisman

the server is running XP currently

if i run this in cmd on server

C:\PStools\psexec.exe "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it works fine.

but if i try run it from another pc XP or Win7 with the server name HS

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it fails at HS saying

coundlt connect to hs:

the network path was not found

make sure that the default admin$ share is enabled on hs

Noam

Quote from: Talisman on July 28, 2011, 09:17:14 AM
but if i try run it from another pc XP or Win7 with the server name HS

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it fails at HS saying cannot connect.

Sounds like a permissions issue. Do the account name and password you are logged in with on the remote machine match an account and password that have rights on the server to run that command?
If not, you need to use the parameters to specify the account and password on the server that can run the command.
use -u [username] and -p [password] between the server name and the command and see if that works.

Talisman

no i dont the server is set as

HS

and the machines ill run from have no passwords and are called HTPC1 and HTPC2

Noam

So you'll need to change the psexec command to use the correct username and password for the user account on HS that you are using.
Try this (replacing the part in brackets with the actual username and password):

C:\PStools\psexec.exe \\HS -u [username] -p [password] "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON


Noam

Quote from: Talisman on July 28, 2011, 10:18:50 AM
exactly the same issue  :(

That's really strange.
Can the HTPC1 and HTPC2 systems see HS at all? (can they ping it, or connect to the file system?)

That sounds like you're still doing something wrong on the psexec end of things, but I can't figure out what.
Perhaps something to do with the Windows firewall on HS?

SMF spam blocked by CleanTalk