mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
32_withings.pm: fix for connection failure
git-svn-id: https://svn.fhem.de/fhem/trunk@7757 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3fa2adba43
commit
c23d7ae18f
@ -562,6 +562,8 @@ withings_pollUser($)
|
|||||||
my $json = ();
|
my $json = ();
|
||||||
$json = JSON->new->utf8->decode(encode('UTF-8', $ret)) if( $ret =~ m/^{.*}$/ );
|
$json = JSON->new->utf8->decode(encode('UTF-8', $ret)) if( $ret =~ m/^{.*}$/ );
|
||||||
|
|
||||||
|
return undef if( !$json );
|
||||||
|
|
||||||
$hash->{status} = $json->{status};
|
$hash->{status} = $json->{status};
|
||||||
if( $hash->{status} == 0 ) {
|
if( $hash->{status} == 0 ) {
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user