-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from marcmerlin/branch_merge_phase2
By Brian Paulsen <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4160,6 +4160,22 @@ sub process_serial_data { | |
|
||
return; | ||
} | ||
# By Brian Paulsen <[email protected]> | ||
# This fixes some incomplete codes like: XB3: but1_1 manual | ||
# You can receive a unit code and a house code with no command followed by a house | ||
# code with no unit code and then the status. | ||
# Combine the two messages to successfully infer the status. | ||
elsif ($event_data1 =~ /STATUS/) { | ||
&print_log("ed1:" . $event_data1 . " prev_units : " . join(",", keys %prev_x10_units)); | ||
|
||
# new code here | ||
if ( $event_data1 !~ /(\S\S)STATUS_(\S+)/ ) { | ||
my @keys = keys %prev_x10_units; | ||
my ( $data ) = $event_data1 =~ /(STATUS_\S+)/; | ||
$event_data1 = $keys[0] . $data; | ||
%prev_x10_units = (); | ||
} | ||
} | ||
elsif ($event_data1 =~ /&P/) { | ||
my ($house, $device, $house2, $level) = $event_data1 =~ /(\S)(\S)(\S)&P(.*)/; | ||
$level -= 128 if ($level > 128); #***move this to cm11 module | ||
|