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: Re: X10 and xAP




mark_harrison_uk2 wrote:
> --- 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 :-)

Heh, thanks Mark!

> 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 :-)
>
> 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.

Yes! It works! I found out the name and now I just need to get it online.

> .... 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>";

Hmm... I tried that, even tried simplifying it (just for testing) to:

#!I:/perl/bin/perl.exe
print "\n";
$xapcall="send/send.exe on.xap";
system $xapcall > null ;

with the paths corrected for me, but the send program doesn't run :(
The $xapcall is definately right because it runs fine from a command
line. I expect it's probably something to do with the fact that I know
nothing about setting up cgi :)

And idea why it isn't doing anything?
--
Andrew Jones
http://andy29uk.blogspot.com





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.