[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Re: Is xPL the ideal work-around? Need to access the LPT port
from Mister House...
- Subject: Re: Re: Is xPL the ideal work-around? Need to access
the LPT port from Mister House...
- From: Gregg Liming <gregg@xxxxxxxxxxx>
- Date: Tue, 25 Oct 2005 08:00:08 -0400
- References: <djl34h+i01e@eGroups.com>
Quoting Jack Edin (10/25/05 6:58 AM):
> This gives me time to ask you to code a simple example, Mister House
> style.
>
> For example how about an x10 tie-in as a condition.
>
> I'm not (yet) using Housecode M, unitcode 12 & 13.
I'm totally lost here... Why would you want to mix x10 into this? My
impression was that you were interested in sending xPL to John's new IO
app--which doesn't speak x10. Perhaps you could elaborate.
> I can make extries in my items.mht file, if you want. What would you
> like them named?
I would need an answer to the above first. Otherwise, it doesn't apply.
> Then make M12 on send a 255 (ffh) to the port via xPL.
> M12 off could send a zero (00h)...
>
The following function should allow you to send data via xPL to John's
client:
# this sub takes device control data in hex and sends out
# via xPL to a device named johnb-io--assumed using
# a parallel port referenced by '888'
sub xpl_control_spkrs
{
my ($spkr_data) = @_;
my $decimal_spkr_data = hex($spkr_data); # converts from hex to dec
&xAP::sendXpl('johnb-io',
'Control.basic' => {
Device => '888',
Type => 'parallel',
Current => $decimal_spkr_data } )
}
an example of usage to send all bits high is:
# Category = xpl_test
$test_spkr_ctl = new Voice_Cmd 'Turn last bit speaker [on,off]';
if (defined($state = said $test_spkr_ctl)) {
if ($state eq ON) {
&xpl_control_spkrs('FF');
elsif ($state eq OFF) {
&xpl_control_spkrs('FE');
}
}
The above will show up in mh voice cmd menus.
BTW: If you need much more in the way of mh-specific help, you might
want to shift your inquiries over to the mh list to lesson traffic that
most of this lists' participants probably don't care about. I'll answer
there too.
> This will prove the theory, and John's client.
If it doesn't (for one thing, I didn't test the above--just typed from
memory), then I'd suggest watching what is sent out via xPL and/or
adding print commands into the above.
> Any reason his client couldn't run along side of Mister House, on the
> same machine?
I don't see a reason why not. However, you may need to use the very
latest xPL hub if John's app relies/assumes usage of the very latest.
The mh hub was compliant up to the most recent discussions (in the last
month) affecting hub operations. If you use another hub, then either
turn off the mh hub or start mh after another hub is running.
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|