2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 18:56:03 +00:00

73_DoorBird: bugfix - Firmware update parsing fixed

git-svn-id: https://svn.fhem.de/fhem/trunk@24805 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2021-07-27 20:46:19 +00:00
parent f46ae8791d
commit ed443b82a6

View File

@ -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