mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
73_GardenaSmartBridge: fix get humidity bug, add rename Fn
git-svn-id: https://svn.fhem.de/fhem/trunk@17194 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d0db0d72e1
commit
3e7eee4dfb
@ -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: 73_GardenaSmartBridge fix get humidity bug, add rename Fn
|
||||
- change: 71_YAMAHA_AVR: renamed attributes:
|
||||
"request-timeout" => "requestTimeout"
|
||||
"volume-smooth-change" => "volumeSmoothChange"
|
||||
|
@ -70,7 +70,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
|
||||
eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL ";
|
||||
|
||||
|
||||
my $version = "1.2.0";
|
||||
my $version = "1.2.2";
|
||||
|
||||
|
||||
|
||||
@ -85,8 +85,6 @@ sub GardenaSmartBridge_Undef($$);
|
||||
sub GardenaSmartBridge_Delete($$);
|
||||
sub GardenaSmartBridge_ResponseProcessing($$);
|
||||
sub GardenaSmartBridge_ErrorHandling($$$);
|
||||
#sub GardenaSmartBridge_encrypt($);
|
||||
#sub GardenaSmartBridge_decrypt($);
|
||||
sub GardenaSmartBridge_WriteReadings($$);
|
||||
sub GardenaSmartBridge_ParseJSON($$);
|
||||
sub GardenaSmartBridge_getDevices($);
|
||||
@ -96,6 +94,7 @@ sub GardenaSmartBridge_Notify($$);
|
||||
sub GardenaSmartBridge_StorePassword($$);
|
||||
sub GardenaSmartBridge_ReadPassword($);
|
||||
sub GardenaSmartBridge_DeletePassword($);
|
||||
sub GardenaSmartBridge_Rename(@);
|
||||
|
||||
|
||||
|
||||
@ -116,6 +115,7 @@ sub GardenaSmartBridge_Initialize($) {
|
||||
$hash->{DefFn} = "GardenaSmartBridge_Define";
|
||||
$hash->{UndefFn} = "GardenaSmartBridge_Undef";
|
||||
$hash->{DeleteFn} = "GardenaSmartBridge_Delete";
|
||||
$hash->{RenameFn} = "GardenaSmartBridge_Rename";
|
||||
$hash->{NotifyFn} = "GardenaSmartBridge_Notify";
|
||||
|
||||
$hash->{AttrFn} = "GardenaSmartBridge_Attr";
|
||||
@ -420,7 +420,7 @@ sub GardenaSmartBridge_ErrorHandling($$$) {
|
||||
} elsif( $param->{code} == 204 and $dhash ne $hash and defined($dhash->{helper}{deviceAction}) ) {
|
||||
|
||||
readingsBulkUpdate( $dhash, "state", "the command is processed", 1);
|
||||
InternalTimer( gettimeofday()+3,"GardenaSmartBridge_getDevices", $hash, 1 );
|
||||
InternalTimer( gettimeofday()+5,"GardenaSmartBridge_getDevices", $hash, 1 );
|
||||
|
||||
} elsif( $param->{code} != 200 ) {
|
||||
|
||||
@ -714,6 +714,18 @@ sub GardenaSmartBridge_ReadPassword($) {
|
||||
}
|
||||
}
|
||||
|
||||
sub GardenaSmartBridge_Rename(@) {
|
||||
|
||||
my ($new,$old) = @_;
|
||||
my $hash = $defs{$new};
|
||||
|
||||
|
||||
GardenaSmartBridge_StorePassword($hash,GardenaSmartBridge_ReadPassword($hash));
|
||||
setKeyValue($hash->{TYPE}."_".$old."_passwd",undef);
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub GardenaSmartBridge_ParseJSON($$) {
|
||||
|
||||
my ($hash, $buffer) = @_;
|
||||
|
@ -67,7 +67,7 @@ use Time::Local;
|
||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||
|
||||
|
||||
my $version = "1.2.0";
|
||||
my $version = "1.2.2";
|
||||
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@ sub GardenaSmartDevice_Set($@) {
|
||||
$abilities = 'light';
|
||||
|
||||
} elsif( lc $sensname eq 'humidity' ) {
|
||||
$payload = '"name":"measure_humidity"';
|
||||
$payload = '"name":"measure_soil_humidity"';
|
||||
$abilities = 'humidity';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user