The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Re: New Application xpl_voice


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

"How To" - xPL Desktop On Screen Display plus xAP bridging


  • Subject: "How To" - xPL Desktop On Screen Display plus xAP bridging
  • From: Kevin Hawkins
  • Date: Tue, 14 Oct 2003 01:26:00 +0000

Having cut your teeth on the Caller ID display "how to" you might
like to
also have the OSD messages displayed on your PC desktop.
One of the great new features in the current xPLHal release is the support
for scripted bridging between xPL and xAP. This allows xPL devotees to make
use of xAP components and visa versa. This is very beneficial when one
environment offers an application the other does not. In this case xAP
offers an application called xAP Watcher that provides, among other things,
OSD display in a Windows environment.
This xPLHal script provides an example of the bridging between xPL and xAP
and provides a PC OSD function for xPL messages using the xPL osd.basic
schema.

So.. what do you need to do ?

First of all we'll set up xPLHal. Ensure xPLHal and xPLHal manager are both
running.

In the xPLHal Manager, right-click on your xPLHal server and select
Properties. On the General tab, tick the "Continue processing after
first
match" and "Enable xAP support" checkboxes if they are not
already ticked.

On the Rules tab, click Add, and enter the following information: Enter a
single asterisk (*) character in the Message Type, Vendor, Device, and
Instance boxes. Enter "osd" as the schema class, and
"basic" as the schema
type. Enter "CT" in the subs box, Select "Yes" to allow
processing to
continue after execution of this rule. Click OK.

Your new rule should now appear in the list.
Highlight the rule, and use the Up arrow to move your rule to the top of
the
list. Click OK to save your changes.

Now you need to stop and restart xPLHal - you can do this by selecting
"Restart xPLHal service from the file menu in xPLHal manager. If for
any
reason this does not work you can stop and restart the xPLHal service
through Control Panel > Administrative Tools > Services.

Now we'll install the xAP bits:

Please note that the xPLHal service must be running before xAP Watcher is
launched as it provides both the xAP and xPL hub services.

Download and install xAP Watcher (NOT xAP Watcher Viewer). It is available
from James Traynor's site at www.mi4.biz the direct link to the file
download is.. <a href="http://www.mi4.biz/modules.php?name=Downloads&d_op=getit&lid=6";>http://www.mi4.biz/modules.php?name=Downloads&amp;d_op=getit&amp;lid=6</a>

We are only going to be using the OSD features of xAP Watcher. A small
'Mac'
style icon should appear in the lower right hand corner of your PC screen -
in the system tray. Configure xAP Watcher by right clicking on this icon ,
and setting the display priority to 5. Turn OFF 'Send Alerts' as you will
not be using that feature. If an onscreen 'Watcher' window is open onscreen
then please MINIMISE it (do not close it as that will terminate xAP
Watcher).

That is all for the xAP configuration, now back to xPL...

Attached is a Visual Basic script for xPLHal that tells it how to handle
the
routing of the xPL OSD messages. If there is no attachment to this posting
(ie Yahoo removed it) then I will post it to the files area of the xPL
group. The source is well commented and some implementation notes are at
the
end.

We need to add this script to xPLHal so launch xPLHal Manager and from the
left hand pane right click on "Scripts" and select " New
Script". Cut and
paste all the code from the attached file into the new script window and
then click 'OK'. When asked for a name for the new script type something
like xAP_OSD_Transfer (note the underscores).

Lastly right click again on 'Scripts' and select "Reload Scripts"
to
activate your new script.

That should be it.. any broadcast xPL osd.basic schema message should now
pop up a message on your PC. However osd.basic messages that are targeted
at
a specific device (i.e. not broadcast) will not display. You can however
see
these by lowering the priority within xAP Watcher for the messages that it
'pops up' to 9. You do this by right clicking on the Watcher icon in the
system tray and changing the display priority. You can also turn off xAP
Watcher completely this way.

If you have any questions , or indeed problems with this then let me know
and I'll try and respond promptly to resolve them.

Kevin


PS The test setup for these instructions was Windows XP. I hope Win98 goes
smoothly to. In the event of any problems, then running (Ian's or Tony's)
xPL monitor application available at <a href="http://www.xplproject.org.uk";>http://www.xplproject.org.uk</a>

<a href="http://www.xplproject.org.uk/modules.php?op=modload&name=Downloads&file=inde";>http://www.xplproject.org.uk/modules.php?op=modload&amp;name=Downloads&amp;file=inde</a>
x&amp;req=getit&amp;lid=27

and Stuart's xAP listener application from <a href="http://www.xapframework.net";>http://www.xapframework.net</a>

<a href="http://www.xapframework.net/modules.php?name=Downloads&d_op=getit&lid=41";>http://www.xapframework.net/modules.php?name=Downloads&amp;d_op=getit&amp;lid=41</a>

will really help in seeing what is actually being sent out in each of the
environments.

Here is a sample xPL osd.basic message :

xpl-cmnd
{
hop=1
source=xpl-xplhal.kevin
target=*
}
OSD.BASIC
{
command=write
Delay=2
Backcol=5
Forecol=4
Row=1
Column=30
Text=Incoming Call\n01234-56789\nJohn Doe
}

and here is the resulting xAP message after being forwarded by xPLHal :

xap-header
{
v=12
hop=1
uid=FFF66600
class=message.display
source=xPL.xPLHal.bridge
target=mi4.watcher.>
}
display.text
{
line1=Incoming Call
line2=01234-56789
line3=John Doe
duration=2
priority=5
}




[Non-text portions of this message have been removed]






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.