From: Craig S. <csc...@ya...> - 2003-09-23 00:25:25
|
Joe Blecher or Bruce, I would like to propose 2 changes to the lynx10 code. To support running as a proxy, change the send_plc sub to: sub send_plc { # Make sure we are passed a pkt return unless ( 2 == @_ ) ; my ($serial_port, $cmd) = @_; if ($::config_parms{Lynx10PLC_port} =~ 'proxy') { print "Lynx10PLC proxy, calling main::proxy_send\n" if $main::Debug{proxy}; &main::proxy_send('Lynx10PLC', 'lynx10plc', 'send_plc', $cmd); return; } return unless my $payld = &cmd2payld($cmd); &send(NETID_X10, $payld); } The current code does not support sending just the house-code/unit-code strings. Most controllers will send a A1AJ as a sequence, but some controllers allow for just the A1. Currently the Lynx10PLC module will 'hold' the A1 waiting for the AJ. The following is not quite as clean as it should be, but fixes the problem. In the sub process_PktX10: if ($_paycmd == X10_UNITADDRESS) { $_cmds = "X" . $table_hcodes{$data[1]} . $table_ucodes{$data[2]} if ($_paysz >= 3); $noun="X"; } -Craig __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |