diff --git a/CHANGED b/CHANGED index fc6b2a327..d256202ac 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 38_netatmo.pm: fixed error crash - update: 32_withings.pm: added unknown values for body scale - update: 98_DOIFtools: add CSRF-Token, add DOIFtoolsLogDir - bugfix: 38_netatmo.pm: fixed login crash, updated webhooks diff --git a/FHEM/38_netatmo.pm b/FHEM/38_netatmo.pm index 4335d4484..13930d0cc 100644 --- a/FHEM/38_netatmo.pm +++ b/FHEM/38_netatmo.pm @@ -2017,14 +2017,14 @@ netatmo_dispatch($$$) Log3 $name, 6, Dumper($json); if( $json->{error} ) { - if($json->{error} =~ /invalid_grant/) - { - $hash->{status} = "invalid grant"; - $hash->{STATE} = "LOGIN FAILED"; + if(ref($json->{error}) ne "HASH") { + $hash->{STATE} = "LOGIN FAILED" if($hash->{SUBTYPE} eq "ACCOUNT"); + $hash->{status} = $json->{error}; + Log3 $name, 2, "$name: message error: ".$json->{error}; return undef; } - $hash->{status} = $json->{error}{message}; + $hash->{status} = $json->{error}{message} if(defined($json->{error}{message})); InternalTimer(gettimeofday()+1800, "netatmo_poll", $hash, 0) if($hash->{status} =~ /usage/); return undef if($hash->{status} =~ /usage/);