The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: sys.execute error


  • Subject: Re: sys.execute error
  • From: JohnQuirk
  • Date: Wed, 07 Jan 2004 22:09:00 +0000

Thanks John
I had tried changing all concerned services to running under my
account, but no joy. Then I remembered that there's a non-service
version of xPLHal, and that works like a dream.

I now have the slim remote turning on and off my bedroom lights, and
have dim and bright working too. This is excellent stuff you've put
together, well done really.

I would like to be able to use the up and down buttons on the remote
for bright and dim, but although the commands are refered to as
"up"
and "down" in the slim html docs they don;t seem to work for me
in
the script, but if I map numberscroll_3 and numberscroll_4 the
commands execute just fine. Any ideas?

Here's my almost finished script which works completely. HSC.exe is
an add on to homeseer which give a command line interface...

' source script for SLIMDEV-SLIMSERV.BEDROOM

sub slimdev_slimserv_bedroom_trigger(XplMsg)
' We're only interested in button presses
If not lcase(xpl.GetParam(XplMsg,"{schema}",True))
= "remote.basic" Then
Exit Sub
End If

' We're only interested if the player is powered off
If not lcase(xpl.getparam(XplMsg,"power",true)) = "off"
Then
Exit Sub
End If

if lcase(xpl.getparam(XplMsg,"keys",true)) =
"numberscroll_1" Then
call sys.execute("hsc.exe","-x G1 on",False)
End If

if lcase(xpl.getparam(XplMsg,"keys",true)) =
"numberscroll_2" Then
call sys.execute("hsc.exe","-x G1 off",False)
End If

if lcase(xpl.getparam(XplMsg,"keys",true)) =
"numberscroll_3" Then
call sys.execute("hsc.exe","-x G1 bright 10",False)
End If

if lcase(xpl.getparam(XplMsg,"keys",true)) =
"numberscroll_4" Then
call sys.execute("hsc.exe","-x G1 dim 10",False)
End If

End Sub


--- In <a
href="/group/ukha_xpl/post?postID=oU53eUvJ4WSaqrt2f9MZAcKHOoWvDOnLsTvHSoin_yPR8zC--_HHN7NvYk9dNpyBxMnQTX2oSV17WXU6puZOyelD">ukha_xpl@xxxxxxx</a>,
"John B" <home-automation@j...>
wrote:
> > Thanks John,
> > Get that syntax right and it works great. I seem to now have
some
> > problems with security or something as the command I want to
execute:
> > call sys.execute("hsc.exe"," -x H4 on",False)
> > gets executed ok, but doesn't work and if I do juts launch
notepad,
> > it starts a process ok but doesn't populate the screen. Is there
a
> > parameter I can pass to make it interact with the desktop, like
> > there is with "at /INTERACTIVE" at the command prompt?
>
> As xPLHal is running as a service, anything it executes is in a
different desktop to the interactive one, so for example, you won't
see notepad when it's launched.
>
> You could try going into Control Panel -> Administrative TOols
->
Services.
> Scroll down to the xPLHal service, right-click and click Stop.
> When it stops, double-click to open it's properties.
> Click the Logon tab, and tick the "Allow service to interact with
desktop" checkbox.
> Click OK.
> Right-click on the service and click Start.
>
> Haven't tried it myself, but worth a shot.
>
> I guess it comes down to how the Homeseer executable communicates
with the main Homeseer instance.
>
> Regards,
>
> John






xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.