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})) {