mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
32_withings: removed experimental code
git-svn-id: https://svn.fhem.de/fhem/trunk@13559 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6551f9791d
commit
638ec2364a
@ -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: 32_withings: removed experimental code
|
||||
- bugfix: 42_Nextion: restore version
|
||||
- feature: YAMAHA_AVR: new attribute volumeMax to limit the maximum volume
|
||||
- update: 70_WS3600.pm extension for UV and illuminance
|
||||
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
#
|
||||
##############################################################################
|
||||
# Release 01 / 2017-02-19
|
||||
# Release 02 / 2017-02-27
|
||||
|
||||
package main;
|
||||
|
||||
@ -1810,31 +1810,38 @@ sub withings_parseAggregate($$) {
|
||||
if(defined($json->{body}{series}))
|
||||
{
|
||||
|
||||
foreach my $series ( keys(%{$json->{body}{series}}))
|
||||
my $series = $json->{body}->{series};
|
||||
|
||||
foreach my $serieskey ( keys %$series)
|
||||
{
|
||||
|
||||
if(defined($json->{body}{series}{$series}))
|
||||
{
|
||||
my $typestring = substr($series, -2);
|
||||
|
||||
foreach my $dayvalues ( keys ($json->{body}{series}{$series}))
|
||||
if(defined($series->{$serieskey}))
|
||||
{
|
||||
my $typestring = substr($serieskey, -2);
|
||||
my $serieshash = $json->{body}->{series}{$serieskey};
|
||||
next if(ref($serieshash) ne "HASH");
|
||||
|
||||
foreach my $daykey ( keys %$serieshash)
|
||||
{
|
||||
if(!$json->{body}{series}{$series}{$dayvalues}->{complete})
|
||||
my $dayhash = $json->{body}->{series}{$serieskey}{$daykey};
|
||||
next if(ref($dayhash) ne "HASH");
|
||||
|
||||
if(!$dayhash->{complete})
|
||||
{
|
||||
$unfinished = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
my ($year,$mon,$day) = split(/[\s-]+/, $dayvalues);
|
||||
my ($year,$mon,$day) = split(/[\s-]+/, $daykey);
|
||||
my $timestamp = timelocal(0,0,18,$day,$mon-1,$year-1900);
|
||||
#my $timestamp = $json->{body}{series}{$series}{$dayvalues}->{midnight};
|
||||
#my $timestamp = $dayhash->{midnight};
|
||||
my $reading = $measure_types{$typestring}->{dailyreading};
|
||||
if( !defined($reading) ) {
|
||||
Log3 $name, 1, "$name: unknown measure type: $typestring";
|
||||
next;
|
||||
}
|
||||
my $value = $json->{body}{series}{$series}{$dayvalues}->{sum};
|
||||
my $value = $dayhash->{sum};
|
||||
|
||||
push(@readings, [$timestamp, $reading, $value]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user