From ed443b82a628aeb0dd4ad3c0718a211bf41c6656 Mon Sep 17 00:00:00 2001 From: Sailor <> Date: Tue, 27 Jul 2021 20:46:19 +0000 Subject: [PATCH] 73_DoorBird: bugfix - Firmware update parsing fixed git-svn-id: https://svn.fhem.de/fhem/trunk@24805 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_DoorBird.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/73_DoorBird.pm b/fhem/FHEM/73_DoorBird.pm index 03c1f93b1..02333ebe0 100644 --- a/fhem/FHEM/73_DoorBird.pm +++ b/fhem/FHEM/73_DoorBird.pm @@ -4651,12 +4651,16 @@ sub DoorBird_parseChangelog($$) { my $all_versions; my $version; + ### Log Entry for debugging purposes + # Log3 $name, 5, $name. " : DoorBird_parseChangelog - data : " . $data; + + ### For all lines do while(my $line = <$lines>) { ### If the line contains the keywords "Firmware version " followed by a number then obtain it - if ($line =~ /^Firmware version (\d{6})$/) { - $version = $1; + if ($line =~ m/^Firmware version /) { + ( $version ) = $line =~ /(\d+)/; } ### If the line contains the keywords "Products affected: " then obtain it @@ -4668,6 +4672,9 @@ sub DoorBird_parseChangelog($$) { ### Split the product names into an array my @products = split(/,\s*/, $1); + ### Log Entry for debugging purposes + Log3 $name, 5, $name. " : DoorBird_parseChangelog - found product : " . $version; + ### For each product name mentioned in the changelog foreach my $product (@products) { ### Apparently the line of the "Products affected" in current changelog file is not closed with an \r so we ignore this array - entry