Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Pages: [1] 2 3 4

Author Topic: Send commands to CM15A via commandline over the network???  (Read 44118 times)

berniejr72

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 19
Send commands to CM15A via commandline over the network???
« on: November 11, 2008, 06:58:24 PM »

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.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #1 on: November 11, 2008, 07:20:27 PM »

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

berniejr72

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 19
Re: Send commands to CM15A via commandline over the network???
« Reply #2 on: November 11, 2008, 08:49:27 PM »

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?
Logged

berniejr72

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 19
Re: Send commands to CM15A via commandline over the network???
« Reply #3 on: November 11, 2008, 11:24:09 PM »

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

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

Thanks again.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #4 on: November 12, 2008, 08:15:59 AM »

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.
Logged

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Send commands to CM15A via commandline over the network???
« Reply #5 on: November 12, 2008, 06:22:36 PM »

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.
Logged
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

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 19
Re: Send commands to CM15A via commandline over the network???
« Reply #6 on: November 12, 2008, 11:53:50 PM »

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.
Logged

Talisman

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 27
Re: Send commands to CM15A via commandline over the network???
« Reply #7 on: July 28, 2011, 07:07:24 AM »

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.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #8 on: July 28, 2011, 08:48:15 AM »

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.
Logged

Talisman

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 27
Re: Send commands to CM15A via commandline over the network???
« Reply #9 on: July 28, 2011, 09:17:14 AM »

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
« Last Edit: July 28, 2011, 09:24:14 AM by Talisman »
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #10 on: July 28, 2011, 09:26:29 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.
Logged

Talisman

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 27
Re: Send commands to CM15A via commandline over the network???
« Reply #11 on: July 28, 2011, 09:37:03 AM »

no i dont the server is set as

HS

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

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #12 on: July 28, 2011, 10:11:38 AM »

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
Logged

Talisman

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 27
Re: Send commands to CM15A via commandline over the network???
« Reply #13 on: July 28, 2011, 10:18:50 AM »

exactly the same issue  :(
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Send commands to CM15A via commandline over the network???
« Reply #14 on: July 28, 2011, 11:09:33 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?
Logged
Pages: [1] 2 3 4
 

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