home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Basic Home Automation via xAP BSC enabled devices (updated 9-01-2008)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ronsonol" data-source="post: 151094" data-attributes="member: 48959"><p>Patrick, I found of a couple of things,</p><p></p><p>first, the queryplc function as part of the ahcmd.exe is broken in the release I have. It always returns an errorcode of 0 (OFF) using this simple batch script.</p><p> </p><p>@echo off </p><p>call "c:\Program Files\Common Files\X10\Common\ahcmd.exe" queryplc d1 on</p><p>IF ERRORLEVEL 1 goto itson </p><p>IF ERRORLEVEL 0 goto itsoff </p><p>echo Unknown Status! </p><p>goto end </p><p></p><p>:itsoff </p><p>echo Off! </p><p>goto end </p><p></p><p>:itson </p><p>echo On! </p><p>:end</p><p></p><p>I found a message board where they were discussing the broken feature of the queryplc, and they included a fixed ahscript.dll. After using this version, the batch script, and the queryplc works fine. </p><p></p><p>If the device is off - it goes to off, and the same for on. If no such device exists(ie. wrong address) if returns nothing - no error level, and the batch script returns with Unknown Status. </p><p></p><p>I am not sure how your code is checking/receiving the errorlevel, but the logs indicate an empty respone. </p><p></p><p>The above batch script seems to work fine with the updated dll, which I'll include here.</p><p></p><p>Cheers,</p></blockquote><p></p>
[QUOTE="ronsonol, post: 151094, member: 48959"] Patrick, I found of a couple of things, first, the queryplc function as part of the ahcmd.exe is broken in the release I have. It always returns an errorcode of 0 (OFF) using this simple batch script. @echo off call "c:\Program Files\Common Files\X10\Common\ahcmd.exe" queryplc d1 on IF ERRORLEVEL 1 goto itson IF ERRORLEVEL 0 goto itsoff echo Unknown Status! goto end :itsoff echo Off! goto end :itson echo On! :end I found a message board where they were discussing the broken feature of the queryplc, and they included a fixed ahscript.dll. After using this version, the batch script, and the queryplc works fine. If the device is off - it goes to off, and the same for on. If no such device exists(ie. wrong address) if returns nothing - no error level, and the batch script returns with Unknown Status. I am not sure how your code is checking/receiving the errorlevel, but the logs indicate an empty respone. The above batch script seems to work fine with the updated dll, which I'll include here. Cheers, [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Basic Home Automation via xAP BSC enabled devices (updated 9-01-2008)
Contact us
RSS
Top
Bottom