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: Targeted Osd Messages


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

Re: Re: HomeAutomator and xPL


  • Subject: Re: Re: HomeAutomator and xPL
  • From: John B
  • Date: Thu, 15 Jan 2004 19:05:00 +0000

Hi Graham,

This should get you going:
Download <a href="http://www.xpl.myby.co.uk/downloads/squtil/squtil.dll";>http://www.xpl.myby.co.uk/downloads/squtil/squtil.dll</a>
and place it in
your Windows system directory.
Then download <a href="http://www.xpl.myby.co.uk/downloads/aspsock/aspsocket.dll";>http://www.xpl.myby.co.uk/downloads/aspsock/aspsocket.dll</a>
and
again place it in your Windows system directory.

Click Start -> RUn, and type:
regsvr32 aspsocket.dll

You should get a message saying the DLL registered successfully.

Now, in your ASP code, you can use something like:

dim myAspSock
set myAspSock = Server.CreateObject("aspSocket.Socket")
dim XplMsg
XplMsg = "xpl-cmnd" &amp; vbLf &amp; _
"{" &amp; vbLf &amp; _
"hop=1" &amp; vbLf &amp; _
"source=johnb-tester.test" &amp; vbLf &amp; _
"target=*" &amp; vbLf &amp; _
"}" &amp; vbLf &amp; _
"tts.basic" &amp; vbLf &amp; _
"{" &amp; vbLf &amp; _
"speech=Hello world" &amp; vbLf &amp; _
"}" &amp; vbLf

myaspSock.SendUDPPacket "255.255.255.255", 3865, cstr(XplMsg),
len(XplMsg)


The above example sends a TTS message that says "Hello world".

It's worked flawlessly for me (and Tony) for a year now, and it doesn't
rely on
the Microsoft Winsock control, which I've previously had problems with when
running under IIS.

Unfortunately, you don't get the handy way of just passing 4 parameters
like you
get with Tony's OCX, instead you have to craft the message by hand.
I can always add a new method to the aspSocket control that just accepts
type,
source, target, schema and body if people would find this useful.

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.