2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

70_DoorPi.pm: Neue Version mit Bugfixes

git-svn-id: https://svn.fhem.de/fhem/trunk@14111 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
phenning 2017-04-26 14:10:08 +00:00
parent b1e796d5b4
commit 3e2bf4df25

View File

@ -41,7 +41,7 @@ use vars qw{%attr %defs};
sub Log($$);
#-- globals on start
my $version = "2.0alpha8";
my $version = "2.0alpha9";
#-- these we may get on request
my %gets = (
@ -597,9 +597,9 @@ sub DoorPi_GetLockstate($) {
}
}
if( $ret =~ /^locked.*/){
DoorPi_Cmd($hash,"locked");
DoorPi_Cmd($hash,"doorlocked");
}elsif( $ret =~ /^unlocked.*/){
DoorPi_Cmd($hash,"unlocked");
DoorPi_Cmd($hash,"doorunlocked");
}
readingsSingleUpdate($hash,"lockstate",$ret,1);
return $ret;
@ -654,7 +654,8 @@ sub DoorPi_GetConfig {
my $keyboards = $jhash0->{"config"}->{"keyboards"};
my $fskey;
my $fscmds;
foreach my $key (sort(keys $keyboards)) {
foreach my $key (sort(keys %{$keyboards})) {
$fskey = $key
if( $keyboards->{$key} eq "filesystem");
}
@ -673,8 +674,7 @@ sub DoorPi_GetConfig {
#-- initialize command list
@{$hash->{HELPER}->{CMDS}} = ();
foreach my $key (sort(keys $fscmds)) {
foreach my $key (sort(keys %{$fscmds})) {
#-- check for door buttons
if($key =~ /dooropen/){
push(@{ $hash->{HELPER}->{CMDS}},"$door");