From d3c636a5cec346e365e7412c7565e98a5588da77 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 22 Apr 2021 19:10:00 +0200 Subject: [PATCH 1/6] fix Use of uninitialized value in concatenation #14 --- FHEM/74_GardenaSmartDevice.pm | 5 +++-- controls_GardenaSmartDevice.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 970216f..c209601 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -604,8 +604,9 @@ sub WriteReadings { #Log3 $name, 1, " - KEIN ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) ne "ARRAY"); #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); - if ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' - || $decode_json->{settings}[$settings]{name} eq 'eco_mode' + if ( exists($decode_json->{settings}[$settings]{name} + && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' + || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) ) { if ( $hash->{helper}{$decode_json->{settings}[$settings]{name}.'_id'} ne diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 47d0a64..fa3d927 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2021-04-22_09:07:36 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-22_09:13:02 48346 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-22_18:29:35 46169 FHEM/73_GardenaSmartBridge.pm +UPD 2021-04-22_19:09:15 48416 FHEM/74_GardenaSmartDevice.pm From 8c6dd44c8da561194337a41cfd9c316a35839947 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Fri, 23 Apr 2021 10:57:03 +0200 Subject: [PATCH 2/6] change condition syntax --- FHEM/74_GardenaSmartDevice.pm | 2 +- controls_GardenaSmartDevice.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index c209601..d8b8a32 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -604,7 +604,7 @@ sub WriteReadings { #Log3 $name, 1, " - KEIN ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) ne "ARRAY"); #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); - if ( exists($decode_json->{settings}[$settings]{name} + if ( defined($decode_json->{settings}[$settings]{name} && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) ) diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index fa3d927..90efd14 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2021-04-22_18:29:35 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-22_19:09:15 48416 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-23_10:56:46 48417 FHEM/74_GardenaSmartDevice.pm From dd66897bbef68d50d514079b0ce3dbb708f45850 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sat, 24 Apr 2021 15:39:29 +0200 Subject: [PATCH 3/6] change condition for error handling --- FHEM/74_GardenaSmartDevice.pm | 2 +- controls_GardenaSmartDevice.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index d8b8a32..533e4db 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -604,7 +604,7 @@ sub WriteReadings { #Log3 $name, 1, " - KEIN ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) ne "ARRAY"); #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); - if ( defined($decode_json->{settings}[$settings]{name} + if ( exists($decode_json->{settings}[$settings] && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) ) diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 90efd14..0d18254 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2021-04-22_18:29:35 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-23_10:56:46 48417 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-24_15:39:15 48410 FHEM/74_GardenaSmartDevice.pm From 01499e86cf82fcabe5cdc46fa259e27ad8247aeb Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 26 Apr 2021 09:39:47 +0200 Subject: [PATCH 4/6] fixing --- FHEM/74_GardenaSmartDevice.pm | 2 +- controls_GardenaSmartDevice.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 533e4db..bcfa790 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -604,7 +604,7 @@ sub WriteReadings { #Log3 $name, 1, " - KEIN ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) ne "ARRAY"); #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); - if ( exists($decode_json->{settings}[$settings] + if ( defined($settings) && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) ) diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 0d18254..4484ca0 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2021-04-22_18:29:35 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-24_15:39:15 48410 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-26_09:37:22 46169 FHEM/73_GardenaSmartBridge.pm +UPD 2021-04-26_09:39:11 48386 FHEM/74_GardenaSmartDevice.pm From 48dc3af91518a04bc96c6848da13906b60709699 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 26 Apr 2021 14:39:55 +0200 Subject: [PATCH 5/6] test --- FHEM/74_GardenaSmartDevice.pm | 2 ++ controls_GardenaSmartDevice.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index bcfa790..812c37a 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -605,6 +605,7 @@ sub WriteReadings { #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); if ( defined($settings) + && exists($decode_json->{settings}) && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) ) @@ -616,6 +617,7 @@ sub WriteReadings { $decode_json->{settings}[$settings]{id}; } } + if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY" && $decode_json->{settings}[$settings]{name} eq 'starting_points' ) { diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 4484ca0..53e1128 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2021-04-26_09:37:22 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-26_09:39:11 48386 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-26_14:39:40 48444 FHEM/74_GardenaSmartDevice.pm From 4f48c4ff67299aff3e462e8789f280b8a2580553 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 26 Apr 2021 20:09:18 +0200 Subject: [PATCH 6/6] fix it now --- FHEM/74_GardenaSmartDevice.pm | 9 ++++----- controls_GardenaSmartDevice.txt | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 812c37a..42d678b 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -604,11 +604,10 @@ sub WriteReadings { #Log3 $name, 1, " - KEIN ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) ne "ARRAY"); #Log3 $name, 1, " - IST ARRAY" if ( ref( $decode_json->{settings}[$settings]{value} ) eq "ARRAY"); - if ( defined($settings) - && exists($decode_json->{settings}) - && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' - || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) - ) + if ( exists($decode_json->{settings}[$settings]{name}) + && ( $decode_json->{settings}[$settings]{name} eq 'schedules_paused_until' + || $decode_json->{settings}[$settings]{name} eq 'eco_mode' ) + ) { if ( $hash->{helper}{$decode_json->{settings}[$settings]{name}.'_id'} ne $decode_json->{settings}[$settings]{id} ) diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 53e1128..1178321 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2021-04-26_09:37:22 46169 FHEM/73_GardenaSmartBridge.pm -UPD 2021-04-26_14:39:40 48444 FHEM/74_GardenaSmartDevice.pm +UPD 2021-04-22_18:29:35 46169 FHEM/73_GardenaSmartBridge.pm +UPD 2021-04-26_20:00:59 48421 FHEM/74_GardenaSmartDevice.pm