mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
32_withings.pm: fix for connection failure
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7757 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2bdf95c25c
commit
6bc18e8430
@ -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