From abb325b448378856fe40a024483f9ba8c44711b3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 3 Oct 2023 22:40:58 +0200 Subject: [PATCH 1/9] test: versions pump --- FHEM/73_GardenaSmartBridge.pm | 6 +++--- FHEM/74_GardenaSmartDevice.pm | 6 +++--- controls_GardenaSmartDevice.txt | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 1797313..e81c945 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -75,9 +75,9 @@ eval { use IO::Socket::SSL; 1 } # try to use JSON::MaybeXS wrapper # for chance of better performance + open code eval { - require JSON::MaybeXS; - import JSON::MaybeXS qw( decode_json encode_json ); - 1; + require JSON::MaybeXS; + import JSON::MaybeXS qw( decode_json encode_json ); + 1; } or do { # try to use JSON wrapper diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 30f4285..2ebdd64 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -72,9 +72,9 @@ use SetExtensions; # try to use JSON::MaybeXS wrapper # for chance of better performance + open code eval { - require JSON::MaybeXS; - import JSON::MaybeXS qw( decode_json encode_json ); - 1; + require JSON::MaybeXS; + import JSON::MaybeXS qw( decode_json encode_json ); + 1; } or do { # try to use JSON wrapper diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 0806fbc..5bbb9c8 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-03-02_11:14:34 49646 FHEM/73_GardenaSmartBridge.pm -UPD 2023-03-02_11:44:46 126415 FHEM/74_GardenaSmartDevice.pm +UPD 2023-10-03_22:40:17 49640 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From 7dfa0b2ddad1a55ab0e26c5c92cbb5fb0f1ba9e2 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 12 Oct 2023 21:52:51 +0200 Subject: [PATCH 2/9] test: gateway readings changed by gardena --- CHANGELOG.md | 24 ++++++++++++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 4 ++-- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e0e684..eee81c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,24 @@ -### feat: add setextention (HEAD -> patch_setExtention) +### test: versions pump (HEAD -> patch_mucki) +>Tue, 3 Oct 2023 22:40:58 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### feat: changelog (origin/patch_setExtention, patch_setExtention) +>Thu, 2 Mar 2023 11:58:58 +0100 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### feat: add setextention >Thu, 2 Mar 2023 11:58:29 +0100 >Author: Sebastian (em@ail.tld) @@ -8,7 +28,7 @@ -### feat: test (origin/patch_setExtention) +### feat: test >Thu, 2 Mar 2023 11:30:19 +0100 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index e81c945..e475137 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -1064,9 +1064,9 @@ sub WriteReadings { if ( ( $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'ethernet_status' + [$properties]{name} eq 'ethernet_statusO' || $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'wifi_status' + [$properties]{name} eq 'wifi_statusO' ) && ref($v) eq 'HASH' ) diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 5bbb9c8..c14af7b 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-03_22:40:17 49640 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-12_21:52:18 49642 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From 7385959b38f46f724dba20034979d4cbe2149f37 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 21 Oct 2023 20:21:31 +0200 Subject: [PATCH 3/9] test: changed published gateway informations --- CHANGELOG.md | 12 +++++++++++- FHEM/73_GardenaSmartBridge.pm | 18 ++++++++++-------- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eee81c9..77f306d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: versions pump (HEAD -> patch_mucki) +### test: gateway readings changed by gardena (HEAD -> patch_mucki) +>Thu, 12 Oct 2023 21:52:51 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: versions pump (origin/patch_mucki) >Tue, 3 Oct 2023 22:40:58 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index e475137..e6a0635 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -1064,9 +1064,9 @@ sub WriteReadings { if ( ( $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'ethernet_statusO' + [$properties]{name} eq 'ethernet_status' || $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'wifi_statusO' + [$properties]{name} eq 'wifi_status' ) && ref($v) eq 'HASH' ) @@ -1074,14 +1074,15 @@ sub WriteReadings { if ( $decode_json->{abilities}[0]{properties} [$properties]{name} eq 'ethernet_status' ) { - readingsBulkUpdateIfChanged( $hash, - 'ethernet_status-mac', $v->{mac} ); readingsBulkUpdateIfChanged( $hash, 'ethernet_status-ip', $v->{ip} ) if ( ref( $v->{ip} ) ne 'HASH' ); readingsBulkUpdateIfChanged( $hash, 'ethernet_status-isconnected', - $v->{isConnected} ); + $v->{is_connected} ); + # obsolet, not published anymore + # readingsBulkUpdateIfChanged( $hash, + # 'ethernet_status-mac', $v->{mac} ); } elsif ( $decode_json->{abilities}[0]{properties} [$properties]{name} eq 'wifi_status' ) @@ -1089,13 +1090,14 @@ sub WriteReadings { readingsBulkUpdateIfChanged( $hash, 'wifi_status-ssid', $v->{ssid} ) if ( ref( $v->{ssid} ) ne 'HASH' ); + # obsolet, not published anymore + # readingsBulkUpdateIfChanged( $hash, + # 'wifi_status-mac', $v->{mac} ); readingsBulkUpdateIfChanged( $hash, - 'wifi_status-mac', $v->{mac} ); + 'wifi_status-isconnected', $v->{is_connected} ); readingsBulkUpdateIfChanged( $hash, 'wifi_status-ip', $v->{ip} ) if ( ref( $v->{ip} ) ne 'HASH' ); - readingsBulkUpdateIfChanged( $hash, - 'wifi_status-isconnected', $v->{isConnected} ); readingsBulkUpdateIfChanged( $hash, 'wifi_status-signal', $v->{signal} ); } diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index c14af7b..ec47b39 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-12_21:52:18 49642 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-21_20:21:09 49772 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From 13de67f570a28be84c83c56cd1e04329e57a87e8 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 23 Oct 2023 22:04:31 +0200 Subject: [PATCH 4/9] test: fix wifi status if is_connected --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 11 +++++++---- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77f306d..a87f35d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: gateway readings changed by gardena (HEAD -> patch_mucki) +### test: changed published gateway informations (HEAD -> patch_mucki) +>Sat, 21 Oct 2023 20:21:31 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: gateway readings changed by gardena (origin/patch_mucki) >Thu, 12 Oct 2023 21:52:51 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: versions pump (origin/patch_mucki) +### test: versions pump >Tue, 3 Oct 2023 22:40:58 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index e6a0635..e901e8c 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -1087,19 +1087,22 @@ sub WriteReadings { elsif ( $decode_json->{abilities}[0]{properties} [$properties]{name} eq 'wifi_status' ) { + # obsolet, not published anymore TODO: ask user using wifi readingsBulkUpdateIfChanged( $hash, 'wifi_status-ssid', $v->{ssid} ) - if ( ref( $v->{ssid} ) ne 'HASH' ); - # obsolet, not published anymore + if (( ref( $v->{ssid} ) ne 'HASH' ) + && ( $v->{is_connected} )) ; # readingsBulkUpdateIfChanged( $hash, # 'wifi_status-mac', $v->{mac} ); readingsBulkUpdateIfChanged( $hash, 'wifi_status-isconnected', $v->{is_connected} ); readingsBulkUpdateIfChanged( $hash, 'wifi_status-ip', $v->{ip} ) - if ( ref( $v->{ip} ) ne 'HASH' ); + if (( ref( $v->{ip} ) ne 'HASH' ) + && ( $v->{is_connected} )) ; readingsBulkUpdateIfChanged( $hash, - 'wifi_status-signal', $v->{signal} ); + 'wifi_status-signal', $v->{signal} ) + if ( $v->{is_connected} ) ; } } } diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index ec47b39..271db0c 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-21_20:21:09 49772 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-23_22:03:43 49976 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From 82907c73a312d6d8d41171d0ede5746d7654ae7e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 25 Oct 2023 22:16:26 +0200 Subject: [PATCH 5/9] test: cleanup initial error handling --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 4 +++- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a87f35d..de1082f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: changed published gateway informations (HEAD -> patch_mucki) +### test: fix wifi status if is_connected (HEAD -> patch_mucki) +>Mon, 23 Oct 2023 22:04:31 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: changed published gateway informations (origin/patch_mucki) >Sat, 21 Oct 2023 20:21:31 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: gateway readings changed by gardena (origin/patch_mucki) +### test: gateway readings changed by gardena >Thu, 12 Oct 2023 21:52:51 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index e901e8c..fd1ed52 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -628,7 +628,9 @@ sub ErrorHandling { if ( $param->{code} == 400 ) { if ($decode_json) { if ( ref( $decode_json->{errors} ) eq "ARRAY" - && defined( $decode_json->{errors} ) ) + && exists( $decode_json->{errors} ) ) + # replace defined with exists + # && defined( $decode_json->{errors} ) ) { readingsBulkUpdate( $dhash, diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 271db0c..2aa8521 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-23_22:03:43 49976 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-25_22:16:11 50086 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From 98b093bcba1e85b72608a41ce4c2c727a64c2f4a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 28 Oct 2023 18:02:17 +0200 Subject: [PATCH 6/9] test: debug line --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 3 +++ controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de1082f..7dddca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: fix wifi status if is_connected (HEAD -> patch_mucki) +### test: cleanup initial error handling (HEAD -> patch_mucki) +>Wed, 25 Oct 2023 22:16:26 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: fix wifi status if is_connected (origin/patch_mucki) >Mon, 23 Oct 2023 22:04:31 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: changed published gateway informations (origin/patch_mucki) +### test: changed published gateway informations >Sat, 21 Oct 2023 20:21:31 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index fd1ed52..035dda1 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -632,6 +632,9 @@ sub ErrorHandling { # replace defined with exists # && defined( $decode_json->{errors} ) ) { + Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2"; + Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 1/2".$decode_json->{errors}; + Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2/2".$decode_json->{errors}[0]; readingsBulkUpdate( $dhash, "state", diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 2aa8521..e4eff4d 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-25_22:16:11 50086 FHEM/73_GardenaSmartBridge.pm +UPD 2023-10-28_18:01:31 50373 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From e15a70ff0bb3c4cf9e3cacce6480b5d0ecd14e7d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Nov 2023 21:04:39 +0100 Subject: [PATCH 7/9] test: fix initial variables --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 33 +++++++++++++++++---------------- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dddca3..5459f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: cleanup initial error handling (HEAD -> patch_mucki) +### test: debug line (HEAD -> patch_mucki) +>Sat, 28 Oct 2023 18:02:17 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: cleanup initial error handling (origin/patch_mucki) >Wed, 25 Oct 2023 22:16:26 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: fix wifi status if is_connected (origin/patch_mucki) +### test: fix wifi status if is_connected >Mon, 23 Oct 2023 22:04:31 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 035dda1..ed49fbf 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -632,27 +632,28 @@ sub ErrorHandling { # replace defined with exists # && defined( $decode_json->{errors} ) ) { - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2"; - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 1/2".$decode_json->{errors}; - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2/2".$decode_json->{errors}[0]; - readingsBulkUpdate( + # $decode_json->{errors} -> ARRAY + # $decode_json->{errors}[0] -> HASH + if (exists ($decode_json->{errors}[0]{error}) ) { + readingsBulkUpdate( $dhash, "state", $decode_json->{errors}[0]{error} . ' ' . $decode_json->{errors}[0]{attribute}, 1 - ); - readingsBulkUpdate( - $dhash, - "lastRequestState", - $decode_json->{errors}[0]{error} . ' ' - . $decode_json->{errors}[0]{attribute}, - 1 - ); - Log3 $dname, 5, - "GardenaSmartBridge ($dname) - RequestERROR: " - . $decode_json->{errors}[0]{error} . " " - . $decode_json->{errors}[0]{attribute}; + ); + readingsBulkUpdate( + $dhash, + "lastRequestState", + $decode_json->{errors}[0]{error} . ' ' + . $decode_json->{errors}[0]{attribute}, + 1 + ); + Log3 $dname, 5, + "GardenaSmartBridge ($dname) - RequestERROR: " + . $decode_json->{errors}[0]{error} . " " + . $decode_json->{errors}[0]{attribute}; + } # fi exists error } } else { diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index e4eff4d..daa2f5f 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-28_18:01:31 50373 FHEM/73_GardenaSmartBridge.pm +UPD 2023-11-01_20:57:32 50330 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From de58578a2db34027ccc9a93d862fd1d1316acbbd Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 21:52:24 +0100 Subject: [PATCH 8/9] test: smartdevice variable wintermode initializied Bridge consolidiert wifi/ethernet --- CHANGELOG.md | 14 ++++++++-- FHEM/73_GardenaSmartBridge.pm | 45 ++++++++------------------------- FHEM/74_GardenaSmartDevice.pm | 4 +-- controls_GardenaSmartDevice.txt | 4 +-- 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5459f78..c3120e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: debug line (HEAD -> patch_mucki) +### test: fix initial variables (HEAD -> patch_mucki) +>Wed, 1 Nov 2023 21:04:39 +0100 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: debug line (origin/patch_mucki) >Sat, 28 Oct 2023 18:02:17 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: cleanup initial error handling (origin/patch_mucki) +### test: cleanup initial error handling >Wed, 25 Oct 2023 22:16:26 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index ed49fbf..05e0d76 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -1076,41 +1076,16 @@ sub WriteReadings { ) && ref($v) eq 'HASH' ) - { - if ( $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'ethernet_status' ) - { - readingsBulkUpdateIfChanged( $hash, - 'ethernet_status-ip', $v->{ip} ) - if ( ref( $v->{ip} ) ne 'HASH' ); - readingsBulkUpdateIfChanged( $hash, - 'ethernet_status-isconnected', - $v->{is_connected} ); - # obsolet, not published anymore - # readingsBulkUpdateIfChanged( $hash, - # 'ethernet_status-mac', $v->{mac} ); + { + if ($v->{is_connected} ) { + readingsBulkUpdateIfChanged( $hash, + [$properties]{name}.'-ip', $v->{ip} ) + if ( ref( $v->{ip} ) ne 'HASH' ); + readingsBulkUpdateIfChanged( $hash, + [$properties]{name}.'-isconnected', $v->{is_connected} ) + if ( $v->{is_connected} ); } - elsif ( $decode_json->{abilities}[0]{properties} - [$properties]{name} eq 'wifi_status' ) - { - # obsolet, not published anymore TODO: ask user using wifi - readingsBulkUpdateIfChanged( $hash, - 'wifi_status-ssid', $v->{ssid} ) - if (( ref( $v->{ssid} ) ne 'HASH' ) - && ( $v->{is_connected} )) ; - # readingsBulkUpdateIfChanged( $hash, - # 'wifi_status-mac', $v->{mac} ); - readingsBulkUpdateIfChanged( $hash, - 'wifi_status-isconnected', $v->{is_connected} ); - readingsBulkUpdateIfChanged( $hash, - 'wifi_status-ip', $v->{ip} ) - if (( ref( $v->{ip} ) ne 'HASH' ) - && ( $v->{is_connected} )) ; - readingsBulkUpdateIfChanged( $hash, - 'wifi_status-signal', $v->{signal} ) - if ( $v->{is_connected} ) ; - } - } + } # fi ethernet and wifi } $properties--; @@ -1586,7 +1561,7 @@ sub DeletePassword { ], "release_status": "stable", "license": "GPL_2", - "version": "v2.6.0", + "version": "v2.6.1", "author": [ "Marko Oldenburg " ], diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 2ebdd64..68f4a7d 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -992,7 +992,7 @@ sub WriteReadings { } ; # fi scheduled_events - my $winter_mode; + my $winter_mode = 'awake'; do { #Log3 $name, 1, "Settings pro Device : ".$decode_json->{settings}[$settings]{name}; @@ -2683,7 +2683,7 @@ sub SetPredefinedStartPoints { ], "release_status": "stable", "license": "GPL_2", - "version": "v2.6.0", + "version": "v2.6.1", "author": [ "Marko Oldenburg " ], diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index daa2f5f..f9e0f03 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-11-01_20:57:32 50330 FHEM/73_GardenaSmartBridge.pm -UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm +UPD 2023-11-05_21:43:22 48810 FHEM/73_GardenaSmartBridge.pm +UPD 2023-11-05_21:51:38 126419 FHEM/74_GardenaSmartDevice.pm -- 2.45.2 From df1830a6703363eb515b6b5fa891b602b672c570 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 12 Nov 2023 19:47:49 +0100 Subject: [PATCH 9/9] fix: missing tree --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 4 ++-- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3120e3..cb5100c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: fix initial variables (HEAD -> patch_mucki) +### test: smartdevice variable wintermode initializied Bridge consolidiert wifi/ethernet (HEAD -> patch_mucki) +>Sun, 5 Nov 2023 21:52:24 +0100 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: fix initial variables (origin/patch_mucki) >Wed, 1 Nov 2023 21:04:39 +0100 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: debug line (origin/patch_mucki) +### test: debug line >Sat, 28 Oct 2023 18:02:17 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 05e0d76..fe21726 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -1079,10 +1079,10 @@ sub WriteReadings { { if ($v->{is_connected} ) { readingsBulkUpdateIfChanged( $hash, - [$properties]{name}.'-ip', $v->{ip} ) + $decode_json->{abilities}[0]{properties}[$properties]{name}.'-ip', $v->{ip} ) if ( ref( $v->{ip} ) ne 'HASH' ); readingsBulkUpdateIfChanged( $hash, - [$properties]{name}.'-isconnected', $v->{is_connected} ) + $decode_json->{abilities}[0]{properties}[$properties]{name}.'-isconnected', $v->{is_connected} ) if ( $v->{is_connected} ); } } # fi ethernet and wifi diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index f9e0f03..a0a0042 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-11-05_21:43:22 48810 FHEM/73_GardenaSmartBridge.pm +UPD 2023-11-12_19:47:27 48890 FHEM/73_GardenaSmartBridge.pm UPD 2023-11-05_21:51:38 126419 FHEM/74_GardenaSmartDevice.pm -- 2.45.2