mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
FULLY: Added support for sensor information
git-svn-id: https://svn.fhem.de/fhem/trunk@23354 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
750ffd843c
commit
70b4ccd996
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# 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: 98_weekprofile: HMCCU-HM send profile without prefix (Forum #1104569)
|
||||||
- bugfix: 70_DENON_AVR: serial connection issues
|
- bugfix: 70_DENON_AVR: serial connection issues
|
||||||
- feature: 77_SMAEM: attr serialNumber may contain multiple serial numbers
|
- feature: 77_SMAEM: attr serialNumber may contain multiple serial numbers
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# 89_FULLY.pm 2.02
|
# 89_FULLY.pm 2.1
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
@ -40,7 +40,7 @@ sub FULLY_Decrypt ($);
|
|||||||
sub FULLY_Ping ($$);
|
sub FULLY_Ping ($$);
|
||||||
sub FULLY_SetPolling ($$;$);
|
sub FULLY_SetPolling ($$;$);
|
||||||
|
|
||||||
my $FULLY_VERSION = '2.02';
|
my $FULLY_VERSION = '2.1';
|
||||||
|
|
||||||
# Timeout for Fully requests
|
# Timeout for Fully requests
|
||||||
my $FULLY_TIMEOUT = 5;
|
my $FULLY_TIMEOUT = 5;
|
||||||
@ -827,9 +827,21 @@ sub FULLY_UpdateReadings ($$)
|
|||||||
foreach my $rn (keys %$result) {
|
foreach my $rn (keys %$result) {
|
||||||
my $key = lc($rn);
|
my $key = lc($rn);
|
||||||
next if (exists($readings{$key}) && $readings{$key} eq 'ignore');
|
next if (exists($readings{$key}) && $readings{$key} eq 'ignore');
|
||||||
|
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' ?
|
readingsBulkUpdate ($hash, $key, exists($readings{$key}) && $readings{$key} eq 'bool' ?
|
||||||
($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn});
|
($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $screenOn = $result->{isScreenOn} // $result->{screenOn};
|
my $screenOn = $result->{isScreenOn} // $result->{screenOn};
|
||||||
readingsBulkUpdate ($hash, 'state', defined($screenOn) ? ($screenOn eq '0' ? 'off' : 'on') : 'unknown');
|
readingsBulkUpdate ($hash, 'state', defined($screenOn) ? ($screenOn eq '0' ? 'off' : 'on') : 'unknown');
|
||||||
|
Loading…
Reference in New Issue
Block a user