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]

Author Topic: Query plc does work, but.................  (Read 36427 times)

abreup

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Query plc does work, but.................
« Reply #15 on: November 23, 2009, 09:22:05 AM »


I'm also trying to change from .exe to the .dll on a VB .NET code. Is there any new API compliant whith the .NET platform?

Thank you,

From Brasil:

Abreup
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: Query plc does work, but.................
« Reply #16 on: January 03, 2010, 04:29:23 PM »

I was doing a little playing with the SDK today with some PHP.  I wanted to test the sample PHP script just to see what it looked like.  I copied the PHP folder from the SDK under program files over to my web folder, which by the way contained a copy of ahcmd.exe.  When I tried it, it did not work for me.  With some looking, I noticed that the ahcmd.exe file that was in the PHP folder was 9.00Kb in size and was version 3.0.0.159.  The version that was in the c:/.../AHSDK/bin folder was 60.0Kb in size and was version 3.0.0.183.  When I copied that over to my web folder, it worked like a charm.

I have written a little PHP/MySQL script that uses the queryplc command to show me a map of my house with any lights/appliances that are on.  The ahcmd.exe file is what does all the work.  I could be wrong, but I don't think the ahscript.dll file has any interaction with the ahcmd file.  I have seen posts on here that people have changed their ahscript.dll file to version 3.0.0.200 and got things working.  I have tried different versions of the .dll file and have had no change in function with my PHP script.

I did notice though that the highest version of the ahscript.dll that I have is 3.0.0.234, but the highest version of the ahcmd.exe file is 3.0.0.183.  Is there an updated ahcmd file out there somewhere?  Not that it matters that much because this one is working, but if there is one with more features, I am all for new features.

Dan
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

Martyn

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Query plc does work, but.................
« Reply #17 on: January 24, 2010, 03:36:49 AM »

.. not for me Dan...

I too have both versions of ahcmd.exe, but neither of them return anything when I command <ahcmd queryplc "a2 on">

However, i only have the older version of ahscript.dll (3.0.0.183) and can't find 3.0.0.200 or greater anywhere. If anyone has this please can you send it to me?

Still floggin' that dead donkey i'm afraid....     >*<
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: Query plc does work, but.................
« Reply #18 on: January 24, 2010, 04:45:12 AM »

martyn,

I am guessing that you are using PHP.  Here is the little code function that I am using that works well.

/*
execute an X-10 command
types : sendplc, queryplc, sendrf

For queryplc command, return[1] will be either -1 (unknown), 0 (off), or 1 (on)
when sending "on" to the $action parameter
*/
function x10cmd($type$hcode$ucode$action$time="") {
	
$cmd $type." ".$hcode.$ucode." ".$action." ".$time;
	
exec(".\bin\ahcmd ".$cmd$return[0], $return[1]);
	
return 
$return;
//End function x10cmd


To use this with queryplc on module A1, use:

$status 
x10cmd("queryplc""A""1""on");

From there you would check $status[1] for either -1 (unknown), 0 (off), or 1 (on)

Make sure that you point the exec line to the folder that you have ahcmd.exe in.  In my example, I have the file in a folder called bin relative to where the script is executed from.  Also, remember to check that you have version 3.0.0.183 of the ahcmd.exe and that the file size is 60.0kb.

If you need any more assistance with this let me know.

Dan B.
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

AidinEslami

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Query plc does work, but.................
« Reply #19 on: March 20, 2010, 10:46:39 PM »

hi
please mail me version 3.0.0.200
aidin.eslami[at]gmail.com

thank you soooooo much
Logged
Pages: 1 [2]
 

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