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 5596a94206
commit 32819bffc0

View File

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