Please login or register.

Login with username, password and session length

Author Topic: Trigger X10 Commands remotely over your LAN with no special software  (Read 4361 times)

djsdjs

  • Newbie
  • Helpful Post Rating: 1
  • Posts: 1


I have the CM15A attached to computer in the house near the best location to send x10 commands.  Sometimes I would just like shortcut on another computer that turns a specific code on or off - but without installing server software and other things.

I work with WMI and vbscript so I have worked out what appears to be the simpliest approach.  The three lines of code below simply use WMI to start ahcmd.exe on the computer where it is installed (also attached):

Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\YOUR_CM15A_COMPUTERNAME_HERE\root\cimv2:Win32_Process")

errReturn = objProcess.Create ("C:\Program Files\Common Files\X10\Common\ahcmd.exe sendplc m4 off", null, null, intProcessID)

if errReturn <> 0 Then wscript.echo "Couldn't execute the command."

I had been testing VBScript built in remote capabilities as well, but got this working first.  VBScript remoting also requires a registry key be changed for it to be enabled.
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Trigger X10 Commands remotely over your LAN with no special software
« Reply #1 on: September 07, 2007, 12:00:39 AM »

Neat idea!   8)

I clicked you a "Helpful".  ;)
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!
 

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