From b382967ea1135ba9ab982546458074b9395f5e6a Mon Sep 17 00:00:00 2001 From: Risiko <> Date: Tue, 25 Apr 2017 17:33:28 +0000 Subject: [PATCH] 30_pilight_contact: fix protocol names in big and lower case git-svn-id: https://svn.fhem.de/fhem/trunk@14104 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/30_pilight_contact.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/30_pilight_contact.pm b/fhem/FHEM/30_pilight_contact.pm index 6e4975079..9f9abbddc 100644 --- a/fhem/FHEM/30_pilight_contact.pm +++ b/fhem/FHEM/30_pilight_contact.pm @@ -50,13 +50,13 @@ sub pilight_contact_Define($$) $unit = $a[4] if (@a == 5); $hash->{STATE} = "defined"; - $hash->{PROTOCOL} = lc($protocol); + $hash->{PROTOCOL} = $protocol; $hash->{ID} = $id; $hash->{UNIT} = $unit; #$attr{$me}{verbose} = 5; - $modules{pilight_contact}{defptr}{lc($protocol)}{$me} = $hash; + $modules{pilight_contact}{defptr}{$protocol}{$me} = $hash; AssignIoPort($hash); 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"; + my ($dev,$protocol,$id,$unit,$state,@args) = split(",",$rmsg); return () if($dev ne "PICONTACT"); my $chash; - foreach my $n (keys %{ $modules{pilight_contact}{defptr}{lc($protocol)} }) { - my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n}; + foreach my $n (keys %{ $modules{pilight_contact}{defptr}{$protocol} }) { + my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n}; next if ( !defined($lh->{ID}) ); if ($lh->{ID} eq $id) { if (defined($lh->{UNIT})) {