ready for release #46
@@ -235,11 +235,10 @@ sub Define {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    my $name = shift @$aArg;
 | 
					    my $name = shift @$aArg;
 | 
				
			||||||
    $hash->{BRIDGE} = 1;
 | 
					    $hash->{BRIDGE} = 1;
 | 
				
			||||||
    $hash->{URL} = 'https://bff-api.sg.dss.husqvarnagroup.net/api/v1';
 | 
					    $hash->{URL} =
 | 
				
			||||||
    # $hash->{URL} =
 | 
					      AttrVal( $name, 'gardenaBaseURL',
 | 
				
			||||||
    #   AttrVal( $name, 'gardenaBaseURL',
 | 
					        'https://smart.gardena.com' )
 | 
				
			||||||
    #     'https://smart.gardena.com' )
 | 
					      . '/v1';
 | 
				
			||||||
    #   . '/v1';
 | 
					 | 
				
			||||||
    $hash->{VERSION}   = version->parse($VERSION)->normal;
 | 
					    $hash->{VERSION}   = version->parse($VERSION)->normal;
 | 
				
			||||||
    $hash->{INTERVAL}  = 60;
 | 
					    $hash->{INTERVAL}  = 60;
 | 
				
			||||||
    $hash->{NOTIFYDEV} = "global,$name";
 | 
					    $hash->{NOTIFYDEV} = "global,$name";
 | 
				
			||||||
@@ -384,21 +383,21 @@ sub Notify {
 | 
				
			|||||||
        && $init_done
 | 
					        && $init_done
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#     if (
 | 
					    if (
 | 
				
			||||||
#         $devtype eq 'GardenaSmartBridge'
 | 
					        $devtype eq 'GardenaSmartBridge'
 | 
				
			||||||
#         && (
 | 
					        && (
 | 
				
			||||||
#             grep /^state:.Connected$/,
 | 
					            grep /^state:.Connected$/,
 | 
				
			||||||
#             @{$events} or grep /^lastRequestState:.request_error$/,
 | 
					            @{$events} or grep /^lastRequestState:.request_error$/,
 | 
				
			||||||
#             @{$events} 
 | 
					            @{$events} 
 | 
				
			||||||
#         )
 | 
					        )
 | 
				
			||||||
#       )
 | 
					      )
 | 
				
			||||||
#     {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#         InternalTimer( gettimeofday() + $hash->{INTERVAL},
 | 
					        InternalTimer( gettimeofday() + $hash->{INTERVAL},
 | 
				
			||||||
#             "FHEM::GardenaSmartBridge::getDevices", $hash );
 | 
					            "FHEM::GardenaSmartBridge::getDevices", $hash );
 | 
				
			||||||
#         Log3 $name, 4,
 | 
					        Log3 $name, 4,
 | 
				
			||||||
# "GardenaSmartBridge ($name) - set internal timer function for recall getDevices sub";
 | 
					"GardenaSmartBridge ($name) - set internal timer function for recall getDevices sub";
 | 
				
			||||||
#     }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1219,7 +1218,7 @@ sub createHttpValueStrings {
 | 
				
			|||||||
my $name = $hash->{NAME};
 | 
					my $name = $hash->{NAME};
 | 
				
			||||||
Log3 $name, 1, "[DEBUG] Teufelnchen 3: ".$payload;
 | 
					Log3 $name, 1, "[DEBUG] Teufelnchen 3: ".$payload;
 | 
				
			||||||
    if ( $payload eq '{}' ) {
 | 
					    if ( $payload eq '{}' ) {
 | 
				
			||||||
        $method = 'GET';
 | 
					        $method = 'GET' if (defined( $hash->{helper}{session_id} ) );
 | 
				
			||||||
        $payload = '';
 | 
					        $payload = '';
 | 
				
			||||||
        $uri .= '/locations?locatioId=null&user_id=' . $hash->{helper}{user_id}
 | 
					        $uri .= '/locations?locatioId=null&user_id=' . $hash->{helper}{user_id}
 | 
				
			||||||
          if ( exists( $hash->{helper}{user_id} )
 | 
					          if ( exists( $hash->{helper}{user_id} )
 | 
				
			||||||
@@ -1233,10 +1232,8 @@ Log3 $name, 1, "[DEBUG] Teufelnchen 3: ".$payload;
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $uri = '/devices/'.InternalVal($hash->{helper}{debug_device}, 'DEVICEID', 0 ) if ( exists ($hash->{helper}{debug_device}));
 | 
					    $uri = '/devices/'.InternalVal($hash->{helper}{debug_device}, 'DEVICEID', 0 ) if ( exists ($hash->{helper}{debug_device}));
 | 
				
			||||||
    if ( !defined( $hash->{helper}{session_id} ) ){
 | 
					    $uri = '/auth/token' if ( !defined( $hash->{helper}{session_id} ) );
 | 
				
			||||||
      $uri = '/auth/token';
 | 
					
 | 
				
			||||||
      $method = 'POST';
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    if ( defined( $hash->{helper}{locations_id} ) ) {
 | 
					    if ( defined( $hash->{helper}{locations_id} ) ) {
 | 
				
			||||||
        if ( defined($abilities) && $abilities =~ /.*_settings/ ) {
 | 
					        if ( defined($abilities) && $abilities =~ /.*_settings/ ) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,2 +1,2 @@
 | 
				
			|||||||
UPD 2021-06-21_20:46:14 47382 FHEM/73_GardenaSmartBridge.pm
 | 
					UPD 2021-06-21_21:13:21 47283 FHEM/73_GardenaSmartBridge.pm
 | 
				
			||||||
UPD 2021-06-09_09:52:26 55505 FHEM/74_GardenaSmartDevice.pm
 | 
					UPD 2021-06-09_09:52:26 55505 FHEM/74_GardenaSmartDevice.pm
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user