mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
73_GardenaSmartBridge: multiple bugfixes,changed published gateway informations
git-svn-id: https://svn.fhem.de/fhem/trunk@28216 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8053475b6e
commit
2bb3a481fe
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 73_GardenaSmartBridge: multiple bugfixes,
|
||||||
|
changed published gateway informations
|
||||||
- feature: 76_SolarForecast: new Attr graphicHeaderOwnspecValForm
|
- feature: 76_SolarForecast: new Attr graphicHeaderOwnspecValForm
|
||||||
- feature: 58_RPI_1Wire: added on-for-timer and validated DS2408
|
- feature: 58_RPI_1Wire: added on-for-timer and validated DS2408
|
||||||
- change: 10_KNX.pm: minor changes, see Forum #122582
|
- change: 10_KNX.pm: minor changes, see Forum #122582
|
||||||
|
@ -437,11 +437,13 @@ sub Set {
|
|||||||
|
|
||||||
DeletePassword($hash);
|
DeletePassword($hash);
|
||||||
}
|
}
|
||||||
elsif ( lc $cmd eq 'debughelper') {
|
elsif ( lc $cmd eq 'debughelper' ) {
|
||||||
return "usage: $cmd" if ( scalar( @{$aArg} ) != 2 );
|
return "usage: $cmd" if ( scalar( @{$aArg} ) != 2 );
|
||||||
my $new_helper = $aArg->[0];
|
my $new_helper = $aArg->[0];
|
||||||
my $new_helper_value = $aArg->[1];
|
my $new_helper_value = $aArg->[1];
|
||||||
Log3( $name, 5, "[DEBUG] - GardenaSmartBridge ($name) - override helper $new_helper with $new_helper_value");
|
Log3( $name, 5,
|
||||||
|
"[DEBUG] - GardenaSmartBridge ($name) - override helper $new_helper with $new_helper_value"
|
||||||
|
);
|
||||||
$hash->{helper}{$new_helper} = $new_helper_value;
|
$hash->{helper}{$new_helper} = $new_helper_value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -488,8 +490,8 @@ sub Write {
|
|||||||
"GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: secret!, DATA: secret!, METHOD: $method"
|
"GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: secret!, DATA: secret!, METHOD: $method"
|
||||||
);
|
);
|
||||||
|
|
||||||
# Log3($name, 3,
|
# Log3($name, 3,
|
||||||
# "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method");
|
# "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -611,8 +613,7 @@ sub ErrorHandling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$data =~ /Error/
|
$data =~ /Error/ && $data !~ /lastLonaErrorCode/
|
||||||
&& $data !~ /lastLonaErrorCode/
|
|
||||||
|| ( defined($decode_json)
|
|| ( defined($decode_json)
|
||||||
&& ref($decode_json) eq 'HASH'
|
&& ref($decode_json) eq 'HASH'
|
||||||
&& defined( $decode_json->{errors} ) )
|
&& defined( $decode_json->{errors} ) )
|
||||||
@ -627,8 +628,13 @@ sub ErrorHandling {
|
|||||||
if ( $param->{code} == 400 ) {
|
if ( $param->{code} == 400 ) {
|
||||||
if ($decode_json) {
|
if ($decode_json) {
|
||||||
if ( ref( $decode_json->{errors} ) eq "ARRAY"
|
if ( ref( $decode_json->{errors} ) eq "ARRAY"
|
||||||
&& defined( $decode_json->{errors} ) )
|
&& exists( $decode_json->{errors} ) )
|
||||||
|
# replace defined with exists
|
||||||
|
# && defined( $decode_json->{errors} ) )
|
||||||
{
|
{
|
||||||
|
# $decode_json->{errors} -> ARRAY
|
||||||
|
# $decode_json->{errors}[0] -> HASH
|
||||||
|
if (exists ($decode_json->{errors}[0]{error}) ) {
|
||||||
readingsBulkUpdate(
|
readingsBulkUpdate(
|
||||||
$dhash,
|
$dhash,
|
||||||
"state",
|
"state",
|
||||||
@ -647,6 +653,7 @@ sub ErrorHandling {
|
|||||||
"GardenaSmartBridge ($dname) - RequestERROR: "
|
"GardenaSmartBridge ($dname) - RequestERROR: "
|
||||||
. $decode_json->{errors}[0]{error} . " "
|
. $decode_json->{errors}[0]{error} . " "
|
||||||
. $decode_json->{errors}[0]{attribute};
|
. $decode_json->{errors}[0]{attribute};
|
||||||
|
} # fi exists error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -737,7 +744,7 @@ sub ErrorHandling {
|
|||||||
my $i = 0;
|
my $i = 0;
|
||||||
for my $dev_settings ( @{ $devJson->{settings} } ) {
|
for my $dev_settings ( @{ $devJson->{settings} } ) {
|
||||||
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
||||||
$output .= "name: $dev_settings->{name} ";
|
$output .= "name: $dev_settings->{name} \n";
|
||||||
if ( ref( $dev_settings->{value} ) eq 'ARRAY'
|
if ( ref( $dev_settings->{value} ) eq 'ARRAY'
|
||||||
|| ref( $dev_settings->{value} ) eq 'HASH' )
|
|| ref( $dev_settings->{value} ) eq 'HASH' )
|
||||||
{
|
{
|
||||||
@ -753,16 +760,7 @@ sub ErrorHandling {
|
|||||||
|
|
||||||
for my $dev_settings ( @{ $devJson->{abilities} } ) {
|
for my $dev_settings ( @{ $devJson->{abilities} } ) {
|
||||||
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
||||||
$output .= "name: $dev_settings->{name} ";
|
$output .= "name: $dev_settings->{name} \n";
|
||||||
|
|
||||||
if ( ref( $dev_settings->{value} ) eq 'ARRAY'
|
|
||||||
|| ref( $dev_settings->{value} ) eq 'HASH' )
|
|
||||||
{
|
|
||||||
$output .= 'N/A \n';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$output .= "value: $dev_settings->{value} \n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{helper}{debug_device_output} = $output;
|
$hash->{helper}{debug_device_output} = $output;
|
||||||
@ -1079,35 +1077,15 @@ sub WriteReadings {
|
|||||||
&& ref($v) eq 'HASH'
|
&& ref($v) eq 'HASH'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( $decode_json->{abilities}[0]{properties}
|
if ($v->{is_connected} ) {
|
||||||
[$properties]{name} eq 'ethernet_status' )
|
|
||||||
{
|
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
readingsBulkUpdateIfChanged( $hash,
|
||||||
'ethernet_status-mac', $v->{mac} );
|
$decode_json->{abilities}[0]{properties}[$properties]{name}.'-ip', $v->{ip} )
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
|
||||||
'ethernet_status-ip', $v->{ip} )
|
|
||||||
if ( ref( $v->{ip} ) ne 'HASH' );
|
if ( ref( $v->{ip} ) ne 'HASH' );
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
readingsBulkUpdateIfChanged( $hash,
|
||||||
'ethernet_status-isconnected',
|
$decode_json->{abilities}[0]{properties}[$properties]{name}.'-isconnected', $v->{is_connected} )
|
||||||
$v->{isConnected} );
|
if ( $v->{is_connected} );
|
||||||
}
|
|
||||||
elsif ( $decode_json->{abilities}[0]{properties}
|
|
||||||
[$properties]{name} eq 'wifi_status' )
|
|
||||||
{
|
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
|
||||||
'wifi_status-ssid', $v->{ssid} )
|
|
||||||
if ( ref( $v->{ssid} ) ne 'HASH' );
|
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
|
||||||
'wifi_status-mac', $v->{mac} );
|
|
||||||
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} );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} # fi ethernet and wifi
|
||||||
}
|
}
|
||||||
$properties--;
|
$properties--;
|
||||||
|
|
||||||
@ -1583,7 +1561,7 @@ sub DeletePassword {
|
|||||||
],
|
],
|
||||||
"release_status": "stable",
|
"release_status": "stable",
|
||||||
"license": "GPL_2",
|
"license": "GPL_2",
|
||||||
"version": "v2.5.2",
|
"version": "v2.6.1",
|
||||||
"author": [
|
"author": [
|
||||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||||
],
|
],
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user