diff --git a/fhem/CHANGED b/fhem/CHANGED index e2fe14b41..102c69a11 100644 --- a/fhem/CHANGED +++ b/fhem/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. + - feature: 89_FULLY: Added support for sensor information - bugfix: 98_weekprofile: HMCCU-HM send profile without prefix (Forum #1104569) - bugfix: 70_DENON_AVR: serial connection issues - feature: 77_SMAEM: attr serialNumber may contain multiple serial numbers diff --git a/fhem/FHEM/89_FULLY.pm b/fhem/FHEM/89_FULLY.pm index 55980fedc..9b8bc18df 100755 --- a/fhem/FHEM/89_FULLY.pm +++ b/fhem/FHEM/89_FULLY.pm @@ -1,6 +1,6 @@ ############################################################################## # -# 89_FULLY.pm 2.02 +# 89_FULLY.pm 2.1 # # $Id$ # @@ -40,7 +40,7 @@ sub FULLY_Decrypt ($); sub FULLY_Ping ($$); sub FULLY_SetPolling ($$;$); -my $FULLY_VERSION = '2.02'; +my $FULLY_VERSION = '2.1'; # Timeout for Fully requests my $FULLY_TIMEOUT = 5; @@ -827,8 +827,20 @@ sub FULLY_UpdateReadings ($$) foreach my $rn (keys %$result) { my $key = lc($rn); next if (exists($readings{$key}) && $readings{$key} eq 'ignore'); - readingsBulkUpdate ($hash, $key, exists($readings{$key}) && $readings{$key} eq 'bool' ? - ($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn}); + if (ref($result->{$rn}) eq 'ARRAY') { + if ($key eq 'sensorinfo') { + foreach my $e (@{$result->{$rn}}) { + $key = lc($e->{name}); + $key =~ s/ /_/g; + my $rv = ref($e->{values}) eq 'ARRAY' ? join(',', @{$e->{values}}) : $e->{values}; + readingsBulkUpdate ($hash, $key, $rv); + } + } + } + else { + readingsBulkUpdate ($hash, $key, exists($readings{$key}) && $readings{$key} eq 'bool' ? + ($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn}); + } } my $screenOn = $result->{isScreenOn} // $result->{screenOn};