Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: Help whit SKD queryplc command  (Read 39491 times)

wizztjh

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Re: Help whit SKD queryplc command
« Reply #15 on: June 23, 2010, 10:14:18 AM »

mine also 183 version , can anyone send me the latest one?
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: Help whit SKD queryplc command
« Reply #16 on: June 24, 2010, 01:14:29 AM »

I just don't understand what the problem is.

I have used:
Code: [Select]
result = SendAction( "queryplc", "a1 on" )in my scripting code and it works perfectly.

For X10 modules that don't support two-way, it returns the last module state known by the X10 service.

This means that:
If the computer was not running at the time the module was last switched, it will return the last known state stored in the CM15A, if and only if the module's house code is the same as the CM15A's "monitored house code" as set in AHP.

If the computer was running at the time the module was last switched, it will return the last known state for all 256 possible module addresses.

Either way, the "last known state" will be based on the last signal for that module that passed through the CM15A. It will not reflect the status of wall switches that were manually switched unless the wall switch sends a X10 signal out when it is manually switched (most X10 wall switches to-date don't do that).

I hope this helps.

If not, maybe we need to examine the file-dates of the X10 support files and such.

Again, I just don't get why I'm the only one who can seem to get it working!   >*<

 >!


Bill,

Just so you don't feel alone in a corner, I too have used the queryplc command with much success.  I use it with my software RemoteWatch X10.  When I started using the queryplc command I was using it through the ahcmd.exe script, and it worked.  I had then heard of the problems with ahcmd hanging up on occasion and coded my own version of it in VB in which I use a SendAction command.  Using the new script named x10cmd.exe I can pass a queryplc command and get the proper result.

Here is the code that I used to create the x10cmd.exe file.

Module x10cmd
    Dim ActiveHomeObj
    Dim arrArgs
() As String Command.Split(" ")

    
Sub Main()
        
Dim intOutput As Integer
        ActiveHomeObj 
CreateObject("X10.ActiveHome")

        
intOutput = -2

        
If (arrArgs.Count 3Then
            Console
.Write("Incorrect number of arguments passed")
        Else
            
intOutput ActiveHomeObj.SendAction(arrArgs(0), arrArgs(1) & " " arrArgs(2))

            While 
intOutput = -2
            End 
While

            
Console.WriteLine(intOutput)
        
End If
    
End Sub
End Module

All the program does is pass the command line arguments to a SendAction command and returns -1, 0, or 1.  In my situation, I have my HA computer running 24/7 so that I can monitor all 256 H/U codes.  I have been using this for quite some time now without any issues.

The ahscript.dll that I have in "C:\Program Files\Common Files\X10\Common" is version 3.0.0.200.  I have posted a copy of this version of the file on my website.  Click here to download it.  I have not tried the 3.0.0.183 version, so I cannot comment on that version.

 >! Hope this post helps some of you out there.  >!

« Last Edit: November 16, 2010, 06:08:00 AM by dbemowsk »
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.
Pages: 1 [2]
 

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