mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
GEOFANCY: add INTERNALS
git-svn-id: https://svn.fhem.de/fhem/trunk@10325 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
171e8c72cd
commit
6b8f6c3b4c
@ -350,6 +350,7 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
||||
|
||||
# update ROOMMATE devices associated with this device UUID
|
||||
my $matchingResident = 0;
|
||||
delete $hash->{ROOMMATES};
|
||||
if ( defined( $modules{ROOMMATE}{defptr} ) ) {
|
||||
Log3 $name, 5, "GEOFANCY $name: found defptr for ROOMMATE\n"
|
||||
. Dumper( $modules{ROOMMATE}{defptr} );
|
||||
@ -363,6 +364,9 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
||||
Log3 $name, 5,
|
||||
"GEOFANCY $name: ROOMMATE device $key has assigned UUIDs: $geofenceUUIDs";
|
||||
|
||||
$hash->{ROOMMATES} .= ",$key" if $hash->{ROOMMATES};
|
||||
$hash->{ROOMMATES} = $key if !$hash->{ROOMMATES};
|
||||
|
||||
my @UUIDs = split( ',', $geofenceUUIDs );
|
||||
|
||||
if (@UUIDs) {
|
||||
@ -376,11 +380,11 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
last if $matchingResident eq "1";
|
||||
}
|
||||
}
|
||||
|
||||
delete $hash->{GUESTS};
|
||||
|
||||
# update GUEST devices associated with this device UUID
|
||||
if ( $matchingResident == 0 && defined( $modules{GUEST}{defptr} ) ) {
|
||||
while ( my ( $key, $value ) = each %{ $modules{GUEST}{defptr} } ) {
|
||||
@ -390,6 +394,9 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
||||
Log3 $name, 5,
|
||||
"GEOFANCY $name: GUEST device $key has assigned UUIDs: $geofenceUUIDs";
|
||||
|
||||
$hash->{GUESTS} .= ",$key" if $hash->{GUESTS};
|
||||
$hash->{GUESTS} = $key if !$hash->{GUESTS};
|
||||
|
||||
my @UUIDs = split( ',', $geofenceUUIDs );
|
||||
|
||||
if (@UUIDs) {
|
||||
@ -403,8 +410,6 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
last if $matchingResident eq "1";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user