mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
30_pilight_contact: fix protocol names in big and lower case
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14104 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5994d53ce9
commit
17b4fed581
@ -50,13 +50,13 @@ sub pilight_contact_Define($$)
|
|||||||
$unit = $a[4] if (@a == 5);
|
$unit = $a[4] if (@a == 5);
|
||||||
|
|
||||||
$hash->{STATE} = "defined";
|
$hash->{STATE} = "defined";
|
||||||
$hash->{PROTOCOL} = lc($protocol);
|
$hash->{PROTOCOL} = $protocol;
|
||||||
$hash->{ID} = $id;
|
$hash->{ID} = $id;
|
||||||
$hash->{UNIT} = $unit;
|
$hash->{UNIT} = $unit;
|
||||||
|
|
||||||
#$attr{$me}{verbose} = 5;
|
#$attr{$me}{verbose} = 5;
|
||||||
|
|
||||||
$modules{pilight_contact}{defptr}{lc($protocol)}{$me} = $hash;
|
$modules{pilight_contact}{defptr}{$protocol}{$me} = $hash;
|
||||||
AssignIoPort($hash);
|
AssignIoPort($hash);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -82,12 +82,14 @@ sub pilight_contact_Parse($$)
|
|||||||
|
|
||||||
Log3 $backend, 4, "pilight_contact_Parse ($backend): RCV -> $rmsg";
|
Log3 $backend, 4, "pilight_contact_Parse ($backend): RCV -> $rmsg";
|
||||||
|
|
||||||
|
Log3 $backend, 4, "pilight_contact_Parse ($backend): RCV -> $rmsg";
|
||||||
|
|
||||||
my ($dev,$protocol,$id,$unit,$state,@args) = split(",",$rmsg);
|
my ($dev,$protocol,$id,$unit,$state,@args) = split(",",$rmsg);
|
||||||
return () if($dev ne "PICONTACT");
|
return () if($dev ne "PICONTACT");
|
||||||
|
|
||||||
my $chash;
|
my $chash;
|
||||||
foreach my $n (keys %{ $modules{pilight_contact}{defptr}{lc($protocol)} }) {
|
foreach my $n (keys %{ $modules{pilight_contact}{defptr}{$protocol} }) {
|
||||||
my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n};
|
my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n};
|
||||||
next if ( !defined($lh->{ID}) );
|
next if ( !defined($lh->{ID}) );
|
||||||
if ($lh->{ID} eq $id) {
|
if ($lh->{ID} eq $id) {
|
||||||
if (defined($lh->{UNIT})) {
|
if (defined($lh->{UNIT})) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user