diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 9167fda..5af77f0 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -484,11 +484,6 @@ sub ErrorHandling { my $hash = $param->{hash}; my $name = $hash->{NAME}; my $dhash = $hash; - - Log3($name, 1, qq(GardenaSmartBridge ($name) - Daten: ${data})); - Log3($name, 1, qq(GardenaSmartBridge ($name) - Error: ${err})) - if ( defined($err) - and $err ); $dhash = $modules{GardenaSmartDevice}{defptr}{ $param->{'device_id'} } if ( defined( $param->{'device_id'} ) ); @@ -796,6 +791,12 @@ sub ResponseProcessing { . " Tail: " . $tail; } + elsif ( defined($decode_json->{message}) + && $decode_json->{message} ) + { + + WriteReadings( $hash, $decode_json ); + } return; } @@ -812,6 +813,15 @@ sub WriteReadings { # print Dumper $decode_json; my $name = $hash->{NAME}; + + + if ( defined($decode_json->{message}) + && $decode_json->{message} ) + { + readingsBeginUpdate($hash); + readingsBulkUpdateIfChanged( $hash, 'state', $decode_json->{message} ); + readingsEndUpdate( $hash, 1 ); + } if ( defined( $decode_json->{id} ) && $decode_json->{id} diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index da0e85d..8715d1e 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2021-03-10_17:50:23 42861 FHEM/73_GardenaSmartBridge.pm +UPD 2021-03-10_18:32:20 43098 FHEM/73_GardenaSmartBridge.pm UPD 2020-05-01_22:05:14 45622 FHEM/74_GardenaSmartDevice.pm