[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: X10 and xAP
- Subject: Re: X10 and xAP
- From: "mark_harrison_uk2" <mph@xxxxxxxxxxxxxxx>
- Date: Wed, 12 Jan 2005 23:49:56 -0000
--- In xap_automation@xxxxxxx, "Andrew Jones"
<andrewjjones@l...> wrote:
>
> Hi everyone, I was pointed to xAP from someone on UKHA.
That would have been me. Welcome :-)
> What I am trying to do is write a website (hopefully in php) that
> will control my X10 modules. At the moment though I just want to
> get something working offline.
>
> I have downloaded and installed the message sender
> (Send-v1.2.8.1.zip) and X10 connector
> (X10-CM1xConnector_GUI-v1.0.1587.36821.zip). But now what
> do I do? I have tried to make a text file to be sent
> with the sender:
I use Patrick Lidstone's CM12 connector, which may function slightly
differently. However, I see some differences in my .xap file to yours
>
> {
> v=12
> hop=1
> uid=FF182000
> class=xap-x10.request
> source=acme.my.controller
Everything up to here looks good.
> target=X10-CM1xConnector
> }
>
The target doesn't look right. I have
> target=Rocket.C12U.home
You then continue
> xap-x10.request
> {
> command=(on)
> device=(A1)
> }
XAP-X10.request
{
Command=OFF
Device=A1
}
.... ie there are no parentheses around the (on) and the (A1).
It is possible that this is subtlety of difference between what
Patrick's connector expects and what the one you have expects, but
it's also possible that this is a typo :-)
> but when I send it, nothing happens. The message doesn't even come
> up in the X10 GUI. It doesn't look too compicated, but how do I
> find out what the target should be, and what about the UID?
The target will (probably) look like:
vendor.software.instance
Vendor will be a codeword allocated to the person who wrote that bit
of software. (Patrick uses "rocket", my code uses
"Scentium".)
Software will be the name that the vendor has given the application,
in this case the CM12U application.
Instance will probably be configurable somewhere within the X10
application.
In order to work out what the TARGET is, you could look at the SOURCE
that the X10 connector is sending _from_. This should appear in the
heartbeats. To watch all the messages, it's well worth downloading
Stuart Booth's "GUI message viewer" from www.xapframework.net -
it's
amazing how useful that is as a debugging tool.
> Thanks for any help :)
.... oh, and for what it's worth, I cgi-out to a baby PERL routine as
follows. The PERL routine is called xapbed.cgi. I have stored a bunch
of pre-canned xAP messages called things like beddark.xap (which,
spookily, turns off the lights in the master bedroom.)
The PHP then simply calls :
.... <A
HREF="../cgi-bin/xapbed.cgi?beddark.xap">Off</A><p>
It's all a bit of a cludge. I mean to re-write it so that it
META-EQUIV returns to the same place :-) Of course, what I should
_really_ do is just put some external calls straight into the PHP :-)
The PERL follows
------------------------
#!C:/perl/bin/perl.exe
print "Content-type: text/plain\n\n";
print "<HEAD>\n";
$xapcall="xap-send.exe ".$ENV{"QUERY_STRING"};
print "<META HTTP-EQUIV=\"Refresh\"
CONTENT=\"0;URL=\\bedroom.php\">";
system $xapcall > null ;
print "\n</HEAD>";
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|