add support for synology station
This commit is contained in:
parent
48758f31ab
commit
6c715e9b5d
@ -57,7 +57,7 @@ sub backupToStorage_Initialize {
|
|||||||
. 'bTS_User '
|
. 'bTS_User '
|
||||||
. 'bTS_Path '
|
. 'bTS_Path '
|
||||||
. 'bTS_Proto:http '
|
. 'bTS_Proto:http '
|
||||||
. 'bTS_Type:Nextcloud '
|
. 'bTS_Type:Nextcloud,SynologyFileStation '
|
||||||
. 'disable:1 '
|
. 'disable:1 '
|
||||||
. 'disabledForIntervals';
|
. 'disabledForIntervals';
|
||||||
$hash->{parseParams} = 1;
|
$hash->{parseParams} = 1;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
UPD 2020-11-06_14:06:34 6242 FHEM/98_backupToStorage.pm
|
UPD 2020-11-09_13:01:44 6262 FHEM/98_backupToStorage.pm
|
||||||
UPD 2020-11-09_08:14:35 18938 lib/FHEM/backupToStorage.pm
|
UPD 2020-11-09_13:35:28 19356 lib/FHEM/backupToStorage.pm
|
||||||
|
@ -358,6 +358,12 @@ sub Attr {
|
|||||||
InternalTimer( gettimeofday() + 1,
|
InternalTimer( gettimeofday() + 1,
|
||||||
'FHEM::backupToStorage::_CheckIsDisabledAfterSetAttr', $hash, 0 );
|
'FHEM::backupToStorage::_CheckIsDisabledAfterSetAttr', $hash, 0 );
|
||||||
}
|
}
|
||||||
|
elsif ( $attrName eq 'bTS_Type' ) {
|
||||||
|
InternalTimer( gettimeofday() + 1,
|
||||||
|
sub { $hash->{STORAGETYPE} = AttrVal($name,'bTS_Type','Nextcloud'); }, $hash, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _CheckIsDisabledAfterSetAttr {
|
sub _CheckIsDisabledAfterSetAttr {
|
||||||
@ -399,6 +405,11 @@ sub PushToStorage {
|
|||||||
Log3( $name, 4, qq{backupToStorage ($name) - after readings age return} );
|
Log3( $name, 4, qq{backupToStorage ($name) - after readings age return} );
|
||||||
|
|
||||||
|
|
||||||
|
if ( $hash->{STORAGETYPE} eq 'SynologyFileStation' ) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
require "SubProcess.pm";
|
require "SubProcess.pm";
|
||||||
my $subprocess = SubProcess->new( { onRun => \&FileUpload } );
|
my $subprocess = SubProcess->new( { onRun => \&FileUpload } );
|
||||||
|
|
||||||
@ -441,6 +452,8 @@ sub PushToStorage {
|
|||||||
|
|
||||||
InternalTimer( gettimeofday() + 1,
|
InternalTimer( gettimeofday() + 1,
|
||||||
"FHEM::backupToStorage::PollChild", $hash );
|
"FHEM::backupToStorage::PollChild", $hash );
|
||||||
|
}
|
||||||
|
|
||||||
Log3( $hash, 4,
|
Log3( $hash, 4,
|
||||||
qq{backupToStorage ($name) - control passed back to main loop.} );
|
qq{backupToStorage ($name) - control passed back to main loop.} );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user