grundfunktion passwd
This commit is contained in:
parent
9e48d335ee
commit
54dc1c83e0
@ -35,7 +35,7 @@ require FHEM::Hailo::Libero;
|
|||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
#-- Run before package compilation
|
#-- Run before package compilation
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
||||||
# Import from main context
|
# Import from main context
|
||||||
GP_Import(
|
GP_Import(
|
||||||
qw(
|
qw(
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
UPD 2021-05-17_20:04:35 4327 FHEM/73_HailoLibero.pm
|
UPD 2021-05-18_19:37:32 4328 FHEM/73_HailoLibero.pm
|
||||||
UPD 2021-05-17_20:13:25 6449 lib/FHEM/Hailo/Libero.pm
|
UPD 2021-05-18_19:53:07 7810 lib/FHEM/Hailo/Libero.pm
|
||||||
|
@ -91,7 +91,7 @@ sub Define {
|
|||||||
Log3($name, 3, qq{HailoLibero ($name) - defined HailoLibero});
|
Log3($name, 3, qq{HailoLibero ($name) - defined HailoLibero});
|
||||||
|
|
||||||
### create password object to handle pass keystore
|
### create password object to handle pass keystore
|
||||||
$hash->{helper}->{passObj} = FHEM::Core::Authentication::Passwords->new();
|
$hash->{helper}->{passObj} = FHEM::Core::Authentication::Passwords->new($hash->{TYPE});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -149,7 +149,8 @@ sub Set {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
my $list = "hailopwd ";
|
my $list = "hailopwd "
|
||||||
|
if ( ! defined( ReadPassword( $hash, $name ) ) );
|
||||||
return "Unknown argument $cmd, choose one of $list";
|
return "Unknown argument $cmd, choose one of $list";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,11 +237,32 @@ sub WriteReadings {
|
|||||||
####################################
|
####################################
|
||||||
#### my little helpers Sub's #######
|
#### my little helpers Sub's #######
|
||||||
|
|
||||||
|
sub ReadPassword {
|
||||||
|
my $hash = shift;
|
||||||
|
my $name = shift;
|
||||||
|
|
||||||
|
my $password;
|
||||||
|
|
||||||
|
Log3 $name, 4, "Hail ($name) - Read password from file";
|
||||||
|
$password = $hash->{helper}->{passObj}->getReadPassword($name);
|
||||||
|
|
||||||
|
if ( defined($password) ) {
|
||||||
|
return $password;
|
||||||
|
} else {
|
||||||
|
Log3 $name, 3, "Hail ($name) - No password in file";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sub Rename {
|
sub Rename {
|
||||||
my $new = shift;
|
my $new = shift;
|
||||||
my $old = shift;
|
my $old = shift;
|
||||||
|
|
||||||
|
my $hash = $defs{$new};
|
||||||
|
|
||||||
|
$hash->{helper}->{passObj}->getRename($new,$old);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,4 +279,52 @@ sub createHttpValueStrings {
|
|||||||
return ( $payload, $session_id, $header, $uri, $method );
|
return ( $payload, $session_id, $header, $uri, $method );
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
=for :application/json;q=META.json Libero.pm
|
||||||
|
{
|
||||||
|
"abstract": "Modul to control Hailo Libero 3.0",
|
||||||
|
"x_lang": {
|
||||||
|
"de": {
|
||||||
|
"abstract": "Modul zum bedienen des Hailo Libero 3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"fhem-mod-device",
|
||||||
|
"fhem-core",
|
||||||
|
"Hailo",
|
||||||
|
"Libero",
|
||||||
|
"Smart"
|
||||||
|
],
|
||||||
|
"release_status": "stable",
|
||||||
|
"license": "GPL_2",
|
||||||
|
"version": "v1.0.0",
|
||||||
|
"author": [
|
||||||
|
"Sebastian Schwarz <ema@il.local>"
|
||||||
|
],
|
||||||
|
"x_fhem_maintainer": [
|
||||||
|
"CoolTux"
|
||||||
|
],
|
||||||
|
"x_fhem_maintainer_github": [
|
||||||
|
"LeonGaultier"
|
||||||
|
],
|
||||||
|
"prereqs": {
|
||||||
|
"runtime": {
|
||||||
|
"requires": {
|
||||||
|
"FHEM": 5.00918799,
|
||||||
|
"perl": 5.016,
|
||||||
|
"Meta": 0,
|
||||||
|
"HttpUtils": 0,
|
||||||
|
"Encode": 0
|
||||||
|
},
|
||||||
|
"recommends": {
|
||||||
|
},
|
||||||
|
"suggests": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
=end :application/json;q=META.json
|
||||||
|
|
||||||
|
=cut
|
||||||
|
Loading…
x
Reference in New Issue
Block a user