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: Getting variable value from xPL_HomeVision from xPL script...


  • Subject: Re: Getting variable value from xPL_HomeVision from xPL script...
  • From: "rleong1" <rleong1@xxxxxxxxx>
  • Date: Tue, 24 May 2005 19:51:13 -0000

the osd.basic call should be this instead of what i pasted in the
previous message.

call
xpl.SendMsg("XPL-CMND","*","osd.basic","text="
& StatusText)

--- In ukha_xpl@xxxxxxx, "rleong1" <rleong1@y...> wrote:
> i don't have homevision & i'm not sure exactly what you're trying
to
> do, but let me try to take a stab at it.  looking at the docs included
> with xpl_homevision, i came up w/ this:
>
> Sub GSHED_HVISION_OUTLAW_trigger(XplMsg)
> Dim CurrentValue
> Dim StatusText
> Dim MyMsg
>
> '
> ' HV status is SENSOR.BASIC schema
> '
> if
UCASE(xpl.getparam(XplMsg,"{SCHEMA}",true))="SENSOR.BASIC"
then
>   '
>   ' check if TYPE is PERIODIC, DEVICE is IMMERSION and CURRENT is
> OCCURRED
>   '
>   if
(UCASE(xpl.getparam(XplMsg,"TYPE",true))="PERIODIC")
and
>
(UCASE(xpl.getparam(XplMsg,"DEVICE",true))="IMMERSION")
and
>
(UCASE(xpl.getparam(XplMsg,"CURRENT",true))="OCCURRED")
then
>     '
>     ' create an xpl message to request "HVVARIABLE" from HV
>     ' change this to whatever variable you want to read from HV
>     '
>     MyMsg = "DEVICE = HVVARIABLE" & chr(10) &
"CURRENT = REQUEST"
>     call
>
xpl.SendMsg(XPL-STAT,"GSHED_HVISION.OUTLAW","CONTROL.BASIC",MyMsg)
>   '
>   ' this is where we process the response to the above request
>   ' check if TYPE is VARIABLE and DEVICE is HVVARIABLE
>   '
>   elseif
(UCASE(xpl.getparam(XplMsg,"TYPE",true))="VARIABLE")
and
>
(UCASE(xpl.getparam(XplMsg,"DEVICE",true))="HVVARIABLE")
>     '
>     ' Extract value from CURRENT field
>     '
>     CurrentValue = xpl.getparam(XplMsg,"CURRENT",true)
>     StatusText = "STATUS UPDATE:\nImmersion: " &
CurrentValue
>     call
xpl.SendMsg("XPL-CMND","*","osd.basic","text="
& StatusText)
>   end if
> End Sub
>
> watch the line wrapping in this post, it'll probably cause syntax
> errors if you do a straight copy paste.  hopefully there aren't any
> other syntax errors :P
>
> --- In ukha_xpl@xxxxxxx, Andrew Kilgore <andrew.kilgore@g...>
> wrote:
> > Hi Frank,
> >
> > Not quite...
> > The conditions of the determinator is that a specific periodic
event
> fired...
> > The actions are to execute a script which will query HV for a
> specific
> > variable value send that value out in an osd.basic message...
> >
> > So far in the script I have:
> >
> > Sub GSHED_HVISION_OUTLAW_trigger(XplMsg)
> >     Dim CurrentValue
> >     Dim StatusText
> >
> >     CurrentValue = xpl.GetParam(XplMsg, "current",
True)
> >
> >     ' Display the caller details on any on-screen displays, e.g.
> Tivo
> >     StatusText = "STATUS UPDATE:\nImmersion: " &
CurrentValue
> >     call
xpl.SendMsg("","","osd.basic","text="
& StatusText)
> > End Sub
> >
> > However, as XplMsg refers to the periodic event trigger, that I
> > currently get is:
> > STATUS UPDATE:
> > Immersion: OCCURRED
> >
> > So, I need someway of obtaining the appropriate variable value
from
> > within the script so that I can use it to build up the text send
out
> > as the osd.basic message.
> >
> > How does "xpl.SendMsg()" work...?
> > Does it block...?
> > Does it return a confirmation message...?
> >
> > Many thanks,
> > Andy.
> >
> > On 5/22/05, Frank Mc Alinden <frankmc@i...> wrote:
> > > Hi Andy
> > >             Are you saying you want the value stored in a hv
> variable to be
> > > sent out in a Determinator???
> > >
> > > Frank
> > >
> > > ----- Original Message -----
> > > From: "Andrew Kilgore" <andrew.kilgore@g...>
> > > To: "xpl" <ukha_xpl@xxxxxxx>
> > > Sent: Sunday, May 22, 2005 8:19 PM
> > > Subject: [ukha_xpl] Getting variable value from
xPL_HomeVision
> from xPL
> > > script...
> > >
> > >
> > > > Hi all,
> > > >
> > > > Need a gentle push with this one...
> > > >
> > > > Can someone point me at a simple example of how I can
get the
> value of
> > > > an HV variable within a script that gets executed as
one of my
> > > > deteminator actions?
> > > >
> > > > Many thanks,
> > > > Andy.
> > > >
> > > >
> > > > xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
> > > http://www.xpl.myby.co.uk
> > > > To Post a Message: ukha_xpl@xxxxxxx
> > > > To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> > > > To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
> http://www.xpl.myby.co.uk
> > > To Post a Message: ukha_xpl@xxxxxxx
> > > To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> > > To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >




xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe:  ukha_xpl-subscribe@xxxxxxx
To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx

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.