From 44a251f7f7d78bc9b2f3d62915e0c803913e83b5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 11 Jun 2021 19:05:54 +0200 Subject: [PATCH] fix json error by empty response, add test log level 1 for notify --- FHEM/73_GardenaSmartBridge.pm | 4 ++-- controls_GardenaSmartDevice.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 87454bb..2e00aef 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -343,7 +343,7 @@ sub Notify { my $devtype = $dev->{TYPE}; my $events = deviceEvents( $dev, 1 ); return if ( !$events ); - +Log3 $name, 1 , "AWAW: $devtype"; getToken($hash) if ( ( @@ -521,7 +521,7 @@ sub ErrorHandling { Log3 $name, 4, "GardenaSmartBridge ($name) - Request: $data"; - my $decode_json = eval { decode_json($data) } if ( lc $param->{'method'} ne 'put' ); + my $decode_json = eval { decode_json($data) } if ( length($data) > 0 ); if ($@) { Log3 $name, 3, "GardenaSmartBridge ($name) - JSON error while request"; } diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 87be818..d1e3020 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2021-06-09_13:23:15 47174 FHEM/73_GardenaSmartBridge.pm +UPD 2021-06-11_19:05:32 47194 FHEM/73_GardenaSmartBridge.pm UPD 2021-06-09_09:52:26 55505 FHEM/74_GardenaSmartDevice.pm