2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

10_MQTT2_DEVICE.pm: add some bridgeRegexp debugging (Forum #98206)

git-svn-id: https://svn.fhem.de/fhem/trunk@18803 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-03-06 17:09:02 +00:00
parent 2f33c57249
commit 1287b7040f

View File

@ -158,6 +158,7 @@ MQTT2_DEVICE_Parse($$)
my $newCid = $cid;
my $bp = $modules{MQTT2_DEVICE}{defptr}{bridge};
my $parentBridge;
my %matching; # For debugging
foreach my $re (keys %{$bp}) {
next if(!("$topic:$value" =~ m/^$re$/s ||
"$cid:$topic:$value" =~ m/^$re$/s));
@ -168,9 +169,13 @@ MQTT2_DEVICE_Parse($$)
return "";
}
$parentBridge = $bp->{$re}{parent};
last;
$matching{$re} = 1;
}
return if(!$newCid);
if(int(keys %matching) > 1) {
Log 1, "MULTIPLE MATCH in bridgeRegexp for $cid:$topic:$value: ".
join(",",keys %matching);
}
PrioQueue_add(sub{
my $cidArr = $modules{MQTT2_DEVICE}{defptr}{cid}{$newCid};