2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

70_Pushover: increase regular user re-validation period to 12h; 15min re-validation period in case an error occurred

git-svn-id: https://svn.fhem.de/fhem/trunk@9711 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2015-10-28 18:04:17 +00:00
parent 7c6437b9f4
commit f39b401e65

View File

@ -509,6 +509,11 @@ sub Pushover_ReceiveCommand($$$) {
readingsBulkUpdate( $hash, "available", $available );
}
if ($available eq "0") {
RemoveInternalTimer($hash);
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 )
}
# Set reading for state
#
if ( !defined( $hash->{READINGS}{state}{VAL} )
@ -531,10 +536,11 @@ sub Pushover_ValidateUser ($;$) {
Log3 $name, 5, "Pushover $name: called function Pushover_ValidateUser()";
RemoveInternalTimer($hash);
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 )
if ($hash->{READINGS}{available}{VAL} eq "0");
InternalTimer( gettimeofday() + 21600, "Pushover_ValidateUser", $hash, 0 )
if ($hash->{READINGS}{available}{VAL} eq "1");
if (ReadingsVal($name, "available", "0") ne "1") {
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 );
} else {
InternalTimer( gettimeofday() + 21600, "Pushover_ValidateUser", $hash, 0 );
}
return
if ( AttrVal( $name, "disable", 0 ) == 1 );