2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 11:26:55 +00:00

32_withings.pm: fix for warnings if not connected

git-svn-id: https://svn.fhem.de/fhem/trunk@6959 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-11-13 08:59:03 +00:00
parent 8f9e512a33
commit c439398186

View File

@ -553,6 +553,9 @@ withings_pollUser($)
$url .= "&userid=$hash->{User}&publickey=$hash->{Key}";
$url .= "&lastupdate=$lastupdate" if( $lastupdate );
my $ret = get($url);
return if( !$ret );
#my $json = JSON->new->utf8(0)->decode($ret);
my $json = ();
$json = JSON->new->utf8->decode(encode('UTF-8', $ret)) if( $ret =~ m/^{.*}$/ );