code cleanup

This commit is contained in:
Sebastian 2021-05-29 22:10:55 +02:00
parent d74d61e078
commit 580f09d6db
2 changed files with 3 additions and 13 deletions

View File

@ -1,2 +1,2 @@
UPD 2021-05-29_22:04:49 5190 FHEM/73_HailoLibero.pm
UPD 2021-05-29_22:07:57 11625 lib/FHEM/Hailo/Libero.pm
UPD 2021-05-29_22:10:49 11310 lib/FHEM/Hailo/Libero.pm

View File

@ -235,7 +235,7 @@ sub Set {
getSettings($hash);
}
# open door
write($hash,undef)
if (lc $cmd eq 'open');
@ -274,16 +274,6 @@ sub getCookie {
)
}
sub openDoor {
#curl 'http://192.168.1.216:81/settings' \
# -H 'Referer: http://192.168.1.216:81/admin' \
# -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' \
# -H 'Cookie: c=dm40qfdeulkw0phbl95rtcrt1sul4p66' \
# --data-raw 'led=6&pwr=5&dist=50&delay=1&pdelay=1&sbsettings=' \
# --compressed \
# --insecure
}
sub setSettings {
my $hash = shift;
my $name = $hash->{NAME};
@ -384,7 +374,7 @@ sub createHttpValueStrings {
} elsif ( defined($payload)){
$uri .= '/settings';
} elsif ( $payload eq '{}'){
uri .= '/open';
$uri .= '/open';
}else {
$uri .= '/admin';
$method = 'GET';