add error trigger for notify

This commit is contained in:
Marko Oldenburg 2018-04-15 19:44:44 +02:00
parent 5c2f1b7994
commit 630b08188b
2 changed files with 7 additions and 5 deletions

View File

@ -68,7 +68,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL "; eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL ";
my $version = "1.0.0"; my $version = "1.0.1";
@ -262,7 +262,8 @@ sub GardenaSmartBridge_Notify($$) {
) )
and $init_done ); and $init_done );
if( $devtype eq 'GardenaSmartBridge' and grep /^state:.connected.to.cloud$/,@{$events} ) { if( $devtype eq 'GardenaSmartBridge' and (grep /^state:.connected.to.cloud$/,@{$events}
or grep /^lastRequestState:.request_error$/,@{$events}) ) {
InternalTimer( gettimeofday()+$hash->{INTERVAL},"GardenaSmartBridge_getDevices", $hash); InternalTimer( gettimeofday()+$hash->{INTERVAL},"GardenaSmartBridge_getDevices", $hash);
Log3 $name, 4, "GardenaSmartBridge ($name) - set internal timer function for recall GardenaSmartBridge_getDevices sub"; Log3 $name, 4, "GardenaSmartBridge ($name) - set internal timer function for recall GardenaSmartBridge_getDevices sub";
@ -330,7 +331,8 @@ sub GardenaSmartBridge_Write($@) {
} }
); );
Log3 $name, 4, "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method"; #Log3 $name, 4, "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method";
Log3 $name, 4, "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: secret!, DATA: secret!, METHOD: $method";
} }
sub GardenaSmartBridge_ErrorHandling($$$) { sub GardenaSmartBridge_ErrorHandling($$$) {

View File

@ -66,7 +66,7 @@ use Time::Local;
eval "use JSON;1" or $missingModul .= "JSON "; eval "use JSON;1" or $missingModul .= "JSON ";
my $version = "1.0.0"; my $version = "1.0.1";
@ -100,7 +100,7 @@ sub GardenaSmartDevice_Initialize($) {
$hash->{AttrFn} = "GardenaSmartDevice_Attr"; $hash->{AttrFn} = "GardenaSmartDevice_Attr";
$hash->{AttrList} = "readingValueLanguage:de,en ". $hash->{AttrList} = "readingValueLanguage:de,en ".
"model ". "model:watering_computer,sensor,mower ".
"IODev ". "IODev ".
$readingFnAttributes; $readingFnAttributes;