Please login or register.

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

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

kesyni

  • Newbie
  • Helpful Post Rating: 1
  • Posts: 4
Help whit SKD queryplc command
« on: May 02, 2008, 11:24:46 AM »

Hello,

I traing to use the querryplc comand in my personal program, i´m using delphi to do it,
but the porblem is: i can use other comand like sendplc to turn on and off modules, but i cant check the data base of cm15a whit the comand querryplc.

here is a part of mi code in delphi, in this part i use the querrylplc

  resp:=ahObj.SendAction('queryplc',HouseCode+DeviceCode+' on');
   ShowMessage('queryplc '+HouseCode+DeviceCode+' on');
   edtEdo.Text:=resp;
   ShowMessage(resp);
   resp:=ahObj.SendAction('queryplc',HouseCode+DeviceCode+' off');
   ShowMessage('queryplc '+HouseCode+DeviceCode+' off');
   edtEdo.Text:=resp;
   ShowMessage(resp)

I need help

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: Help whit SKD queryplc command
« Reply #1 on: May 02, 2008, 10:19:08 PM »

Hello,

I traing to use the querryplc comand in my personal program, i´m using delphi to do it,
but the porblem is: i can use other comand like sendplc to turn on and off modules, but i cant check the data base of cm15a whit the comand querryplc.

here is a part of mi code in delphi, in this part i use the querrylplc

  resp:=ahObj.SendAction('queryplc',HouseCode+DeviceCode+' on');
   ShowMessage('queryplc '+HouseCode+DeviceCode+' on');
   edtEdo.Text:=resp;
   ShowMessage(resp);
   resp:=ahObj.SendAction('queryplc',HouseCode+DeviceCode+' off');
   ShowMessage('queryplc '+HouseCode+DeviceCode+' off');
   edtEdo.Text:=resp;
   ShowMessage(resp)

I need help



Don't know Delphi, but over all, it looks right.  Should return a string of "0", "1", or "-1".  Doesn't it?
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!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10510
  • I don't work for X10, I use it successfuly!
Re: Help whit SKD queryplc command
« Reply #2 on: May 11, 2008, 06:39:19 PM »

The SDK will only supply an accurate query for 2 way devices!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

kesyni

  • Newbie
  • Helpful Post Rating: 1
  • Posts: 4
Re: Help whit SKD queryplc command
« Reply #3 on: May 17, 2008, 04:21:47 PM »

no,

 the program only return "0" or "-1" but never "1", he return "-1" when i use the program and don't connect the CM15A, and  that's OK because the status of the device A1 is unknown.  When i connect the CM15A, and check status of A1 the program return "0", that's OK too because the device A1 is off, but when i send comand to turn on device A1, the program return "0", the divice A1 is ON,  but the program return "0". please help   ???.
« Last Edit: May 17, 2008, 04:24:46 PM by kesyni »
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: Help whit SKD queryplc command
« Reply #4 on: May 18, 2008, 11:53:16 PM »

kesyni,

What are you using to turn A1 on and off?  A RF remote, the AHP program, a SDK SendAction() command?
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!

kesyni

  • Newbie
  • Helpful Post Rating: 1
  • Posts: 4
Re: Help whit SKD queryplc command
« Reply #5 on: May 19, 2008, 05:26:06 PM »

I use the sdk comand SendAction(), but i try too whit AHP program  to turn on/off A1.  And then ask to my program about the status of A1 whit queryplc command. but the answers are the same   ???
Logged

mauritouch

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Help whit SKD queryplc command
« Reply #6 on: August 15, 2008, 09:35:33 AM »

Hello,

Has anyone found the solution to get QueryPlc work with the latest SDK?

I heard that we need a two module, but AHP software can do it without...

I've use: SendAction("queryplc", "a2 on")
Also tried: SendAction("sendplc", "a2 statuson")

But the system always returns 0

Any help?

M
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: Help whit SKD queryplc command
« Reply #7 on: August 17, 2008, 04:21:13 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!   >*<

 >!
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!

mauritouch

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Help whit SKD queryplc command
« Reply #8 on: August 17, 2008, 07:28:21 AM »

Hi Bill and thank you for your help !

The monitored housecode on AHP is set to A (Interface is updated as well). With the CM15 Pro I'm able to send X10 orders to my X10 plugs without any problem (On, Off, Dim...). However, in order for me to receive the status of the plugs when the computer is on (Everything is managed by the software I'm doing based on a French coding software called Windev) the "queryplc" always return the value 0.

With both software opened (Mine and AHP) on 2 different screens, when I switch a plug on with my software, AHP automatically detects the status of the plug on updates the switch picture in the room display. Is it because AHP is simply monitoring the last order that went through the CM15? Because it also get all the proper status on system start up....

What I would like to know is if I'm using the proper SDK. Where can I download the latest one where "queryplc" doesn't have any known problem?

Thank you for your help again
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: Help whit SKD queryplc command
« Reply #9 on: August 22, 2008, 11:05:41 PM »

Hi Bill and thank you for your help !

....

What I would like to know is if I'm using the proper SDK. Where can I download the latest one where "queryplc" doesn't have any known problem?

Thank you for your help again


The current link to the SDK software is: http://www.x10.com/activehomepro/sdk/index.html

Technically, I'm not using the files provided by the SDK itself, but the files that AHP installed in: C:\Program Files\Common Files\X10\Common which are as follows:

File NameFile VersionDate ModifiedDate Created
ahcmd.exe3.0.0.183Wednesday, March 23, 2005, 6:11:50 PMSaturday, October 29, 2005, 5:58:51 PM
ahscript.dll3.0.0.200Thursday, February 02, 2006, 4:53:38 PMSaturday, October 29, 2005, 5:58:49 PM
rundll32.exe4.90.0.3000Tuesday, October 30, 2001, 7:41:42 PMSaturday, October 29, 2005, 5:12:58 PM
x10.exe1.0.0.1Tuesday, October 30, 2001, 7:36:42 PMSaturday, October 29, 2005, 5:12:40 PM
x10lv.dll3.0.0.82Friday, January 17, 2003, 11:44:58 AMSunday, March 23, 2008, 12:53:06 AM
x10net.dll3.0.0.204Wednesday, June 21, 2006, 11:10:32 AMSaturday, October 29, 2005, 5:12:40 PM
X10nets.exe1.0.0.1Monday, November 12, 2001, 2:31:48 PMSaturday, October 29, 2005, 5:12:40 PM
xcap.ax2.0.0.106Tuesday, May 13, 2003, 4:50:56 PMSunday, March 23, 2008, 12:53:06 AM
xsetup.dllNone shownFriday, November 04, 2005, 3:19:02 PMSaturday, October 29, 2005, 5:44:04 PM

For the most part, the "Date Created" seems to be when the file was first installed on my system.

Hope that helps at least some!

 >!
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!

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Help whit SKD queryplc command
« Reply #10 on: October 22, 2008, 01:48:00 AM »

I have emailed X10 about this problem.  There has been no response so far, but this might explain your problem:

The issue with the SDK is that the ahscript.dll file supplied in the SDK is version 3.0.0.183 while the version supplied with AHP is 3.0.0.200.  The most obvious problem with this is that software that uses the SDK version of the file gets erroneous results when attempting to use the “queryplc” command.  Many that have tried to develop software using the SDK have complained that the “queryplc” command always returns a result of 0.  Granted this is only an issue if the developer or end user doesn’t have AHP installed, or the developed software accesses a local copy of ahscript.dll instead of the one installed by AHP, but it does lead to a lot of frustration when trying to develop software and the “queryplc” command doesn’t appear to work.

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!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Help whit SKD queryplc command
« Reply #11 on: October 22, 2008, 10:36:06 AM »

I just did a test to see why query worked for me in my VB 2008 express app, the results are here in this post.
http://www.x10community.com/forums/index.php?topic=16677.msg91907
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

originalevil

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 52
  • We could do some watercolors together. You and I.
Re: Help whit SKD queryplc command
« Reply #12 on: January 21, 2009, 05:17:47 PM »



Technically, I'm not using the files provided by the SDK itself, but the files that AHP installed in: C:\Program Files\Common Files\X10\Common which are as follows:


Bill, you are a prince. I've been reading through threads for days looking for this tiny bit of information! Thank you for your helpful post!
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10510
  • I don't work for X10, I use it successfuly!
Re: Help whit SKD queryplc command
« Reply #13 on: January 21, 2009, 06:38:21 PM »



Technically, I'm not using the files provided by the SDK itself, but the files that AHP installed in: C:\Program Files\Common Files\X10\Common which are as follows:


Bill, you are a prince. I've been reading through threads for days looking for this tiny bit of information! Thank you for your helpful post!
This post got me looking! ::) I've been running the files from the SDK!
Never needed to use anything else for my apps.::) :' :'
The newest ahscript.dll file is 3.0.0.234
Wow -:) guess I should use the updated dll!
« Last Edit: January 21, 2009, 06:47:20 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Martyn

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Help whit SKD queryplc command
« Reply #14 on: January 17, 2010, 05:28:17 AM »

Sorry to resurrect this, but I can't seem to find ahscript.dll anywhere on the net as any version other than 3.0.0.183.

i have redownloaded the SDK from the X10 site, but I always end up with 3.0.0.183.

i have the same QueryPLC issue as the above and am hoping that 3.0.0.200 or 3.0.0.<later> will help me.

Can anyone point me in the right direction, or email it to me?

thanks
Logged
Pages: [1] 2
 

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