mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
22_HOMEMODE: v1.5.3 - fix blocking IP check (again and finally)
git-svn-id: https://svn.fhem.de/fhem/trunk@20562 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8cacff898b
commit
417e78d63b
@ -16,7 +16,7 @@ use Time::HiRes qw(gettimeofday);
|
||||
use HttpUtils;
|
||||
use vars qw{%attr %defs %modules $FW_CSRF};
|
||||
|
||||
my $HOMEMODE_version = "1.5.2";
|
||||
my $HOMEMODE_version = "1.5.3";
|
||||
my $HOMEMODE_Daytimes = "05:00|morning 10:00|day 14:00|afternoon 18:00|evening 23:00|night";
|
||||
my $HOMEMODE_Seasons = "03.01|spring 06.01|summer 09.01|autumn 12.01|winter";
|
||||
my $HOMEMODE_UserModes = "gotosleep,awoken,asleep";
|
||||
@ -2504,7 +2504,7 @@ sub HOMEMODE_execCMDs($$;$)
|
||||
my $name = $hash->{NAME};
|
||||
my $cmd = HOMEMODE_replacePlaceholders($hash,$cmds,$resident);
|
||||
my $err = AnalyzeCommandChain(undef,$cmd);
|
||||
if ($err && $err !~ /^Deleted.reading|Wrote.configuration/)
|
||||
if ($err && $err !~ /^Deleted.reading|Wrote.configuration|good/)
|
||||
{
|
||||
Log3 $name,3,"$name: error: $err";
|
||||
Log3 $name,3,"$name: error in command: $cmd";
|
||||
@ -3438,6 +3438,8 @@ sub HOMEMODE_CalendarEvents($$)
|
||||
sub HOMEMODE_checkIP($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
return if ($hash->{helper}{RUNNING_IPCHECK});
|
||||
$hash->{helper}{RUNNING_IPCHECK} = 1;
|
||||
my $name = $hash->{NAME};
|
||||
my $param = {
|
||||
url => "http://icanhazip.com/",
|
||||
@ -3452,6 +3454,7 @@ sub HOMEMODE_setIP($)
|
||||
{
|
||||
my ($param,$err,$data) = @_;
|
||||
my $hash = $param->{hash};
|
||||
delete $hash->{helper}{RUNNING_IPCHECK};
|
||||
my $name = $hash->{NAME};
|
||||
if ($err ne "")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user