fix little bugs
This commit is contained in:
parent
472b37271d
commit
67bc1ac70b
@ -357,7 +357,7 @@ sub Notify {
|
|||||||
$devtype eq 'GardenaSmartBridge'
|
$devtype eq 'GardenaSmartBridge'
|
||||||
&& (
|
&& (
|
||||||
grep /^gardenaAccountPassword.+/,
|
grep /^gardenaAccountPassword.+/,
|
||||||
@{$events} || ReadingsVal( '$devname', 'token', '' ) eq 'none'
|
@{$events}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -490,7 +490,8 @@ sub ErrorHandling {
|
|||||||
|
|
||||||
my $dname = $dhash->{NAME};
|
my $dname = $dhash->{NAME};
|
||||||
|
|
||||||
# Log3 $name, 4, Dumper($data);
|
Log3 $name, 2, "GardenaSmartBridge ($name) - Request: $data";
|
||||||
|
|
||||||
my $decode_json = eval { decode_json($data) };
|
my $decode_json = eval { decode_json($data) };
|
||||||
if ($@) {
|
if ($@) {
|
||||||
Log3 $name, 3, "GardenaSmartBridge ($name) - JSON error while request";
|
Log3 $name, 3, "GardenaSmartBridge ($name) - JSON error while request";
|
||||||
@ -717,9 +718,9 @@ sub ResponseProcessing {
|
|||||||
&& ref($decode_json->{data}) eq 'HASH'
|
&& ref($decode_json->{data}) eq 'HASH'
|
||||||
&& !defined( $hash->{helper}->{user_id})) {
|
&& !defined( $hash->{helper}->{user_id})) {
|
||||||
|
|
||||||
$hash->{helper}{session_id} = $decode_json->{data}{id};
|
$hash->{helper}{session_id} = $decode_json->{data}{id};
|
||||||
$hash->{helper}{user_id} = $decode_json->{data}{attributes}->{user_id};
|
$hash->{helper}{user_id} = $decode_json->{data}{attributes}->{user_id};
|
||||||
$hash->{helper}{refresh_tokebn} = $decode_json->{data}{attributes}->{refresh_token};
|
$hash->{helper}{refresh_token} = $decode_json->{data}{attributes}->{refresh_token};
|
||||||
|
|
||||||
Write( $hash, undef, undef, undef );
|
Write( $hash, undef, undef, undef );
|
||||||
Log3 $name, 3, "GardenaSmartBridge ($name) - fetch locations id";
|
Log3 $name, 3, "GardenaSmartBridge ($name) - fetch locations id";
|
||||||
|
@ -1 +1 @@
|
|||||||
UPD 2021-03-26_22:20:12 43636 FHEM/73_GardenaSmartBridge.pm
|
UPD 2021-03-26_23:46:02 43623 FHEM/73_GardenaSmartBridge.pm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user