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]

I cant set the target for my xAP packet in VB.NET


  • Subject: I cant set the target for my xAP packet in VB.NET
  • From: "jimfranklin63" <jimfranklin63@xxxxxxxxxxx>
  • Date: Sun, 11 Feb 2007 02:34:10 -0000

Hi,
I am new to this xAP stuff, but I have got a simple vb6 app talking
to the X10 connector, and I can turn stuff on and off ok.

Ideally I'd like to write it all in VB.NET but i cant figure out the
syntax to set the target address.

here is a snippet of code, it sends packets ok (the xAP message
viewer sees them, but the X10 Connector knows they aren't for him,
and ignores them).

Dim Message As xAPMessage
Dim xsender As New xAPSender
Dim block As xAPMessageBlock

Message = New xAPMessage()
Message.Header = New xAPHeader()
Message.Header.Class.FullName = "xAP-X10.Request"

block = New xAPMessageBlock("xAP-X10.Request")
block.Add("command", "on")
block.Add("device", "A2")

Message.AddMessageBlock(block)

xsender.Connect()
xsender.Send(Message)
xsender.Close()

... End of Code Snippet ...

I tried adding the line

Message.Header.Target = "ERSP.X10.DEVPC"

But this gives an error. Can someone help me please?

-Jim








xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation 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.