diff --git a/fhem/CHANGED b/fhem/CHANGED index e859ebdd0..9c4772e8a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. -# Do not insert empty lines here, update check depends on it. +# Do not insert empty lines here, update check depends on it. + - bugfix: 98_serviced: interval not starting after FHEM start + - feature: 98_serviced: add attr disabledForIntervals + - change: 98_serviced: adapt new help format for commandref - feature: 98_todoist: added title="" option for addTask - bugfix: 10_WS980: v1.3.0 - fix invalid values like 0xffff - bugfix: 73_AutoShuttersControl: roolback fix #1149463 diff --git a/fhem/FHEM/98_serviced.pm b/fhem/FHEM/98_serviced.pm index bcdceff22..7e78c7d00 100644 --- a/fhem/FHEM/98_serviced.pm +++ b/fhem/FHEM/98_serviced.pm @@ -16,7 +16,7 @@ use Blocking; use Time::HiRes; use vars qw{%defs}; -my $servicedVersion = "1.2.7"; +my $servicedVersion = "1.2.8"; sub serviced_shutdownwait($); @@ -31,6 +31,7 @@ sub serviced_Initialize($) $hash->{ShutdownFn} = "serviced_Shutdown"; $hash->{UndefFn} = "serviced_Undef"; $hash->{AttrList} = "disable:1,0 ". + "disabledForIntervals ". "serviceAutostart ". "serviceAutostop ". "serviceGetStatusOnInit:0,1 ". @@ -76,8 +77,8 @@ sub serviced_Define($$) $attr{$name}{homebridgeMapping} = "On=state,valueOff=/stopped|failed/,cmdOff=stop,cmdOn=start\n". "StatusJammed=state,values=/error|failed/:JAMMED;/.*/:NOT_JAMMED"; } + readingsSingleUpdate($hash,"state","Initialized",1); } - readingsSingleUpdate($hash,"state","Initialized",1) if ($init_done); return undef; } @@ -86,7 +87,7 @@ sub serviced_Undef($$) my ($hash,$name) = @_; RemoveInternalTimer($hash); BlockingKill($hash->{helper}{RUNNING_PID}) if ($hash->{helper}{RUNNING_PID}); - return undef; + return undef; } sub serviced_Notify($$) @@ -99,10 +100,10 @@ sub serviced_Notify($$) return if (!$events); if ($devname eq "global" && grep /^INITIALIZED$/,@{$events}) { - if (AttrNum($name,"serviceGetStatusOnInit",1) && !AttrNum($name,"serviceStatusInterval",0)) + if (AttrNum($name,"serviceGetStatusOnInit",1) || AttrNum($name,"serviceStatusInterval",0)) { - Log3 $name,3,"$name: get status of service \"$hash->{SERVICENAME}\" due to startup"; - serviced_Set($hash,$name,"status"); + Log3 $name,4,"$name: get status of service \"$hash->{SERVICENAME}\" due to startup and/or interval"; + serviced_GetUpdate($hash); } my $delay = AttrVal($name,"serviceAutostart",0); $delay = $delay > 300 ? 300 : $delay; @@ -464,13 +465,13 @@ sub serviced_shutdownwait($) =item summary_DE lokale/entfernte Dienste Verwaltung =begin html - +

serviced