Hi,
ich habe meine Rollos über einen WeekdayTimer programmiert. Die Definition sieh folgendermaßen aus:
dummyRollosTimerDevice 12345|{sunrise_abs(0,"06:00","06:30")}|{SetRollosTimerControlled("auf")} 12345|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")} 60|08:15|{SetRollosTimerControlled("auf")} 60|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
Das "dummyRollosTimerDevice" verwende ich um den Timer an irgendein Device zu koppeln, denn mehrere Devices werden offiziell nicht unterstützt. Das Problem ist, dass mein Log mit Warnungen versehen wird:
2017.02.03 00:00:05.104 4: [RollosTimer] 07:22:04 17:56:44 Freitag
2017.02.03 00:00:05.104 4: [RollosTimer] 08:15:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 0: Sonntag)
2017.02.03 00:00:05.105 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 1: Montag)
2017.02.03 00:00:05.105 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 2: Dienstag)
2017.02.03 00:00:05.105 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 3: Mittwoch)
2017.02.03 00:00:05.105 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 4: Donnerstag)
2017.02.03 00:00:05.105 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 5: Freitag)
2017.02.03 00:00:05.105 4: [RollosTimer] 08:15:00 {SetRollosTimerControlled("auf")}, 17:56:44 {SetRollosTimerControlled("zu")} (Profil 6: Samstag)
2017.02.03 00:00:05.105 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.03 00:00:05.106 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.03 00:00:05.107 5: [RollosTimer] result of condition:1
2017.02.03 00:00:05.107 4: [RollosTimer] setTimer - timer seems to be active today: 12345|{sunrise_abs(0,"06:00","06:30")}|{SetRollosTimerControlled("auf")}
2017.02.03 00:00:05.107 5: [RollosTimer] setting Timer: RollosTimer_1 2017-02-03 06:30:00
2017.02.03 00:00:05.107 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.03 00:00:05.107 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.03 00:00:05.108 5: [RollosTimer] result of condition:1
2017.02.03 00:00:05.108 4: [RollosTimer] setTimer - timer seems to be active today: 12345|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
2017.02.03 00:00:05.108 5: [RollosTimer] setting Timer: RollosTimer_2 2017-02-03 17:56:44
2017.02.03 00:00:05.109 4: [RollosTimer] condition: - Tage:0,6
2017.02.03 00:00:05.109 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(0,6);;;;( 1 && (defined $days->{$wday}))}
2017.02.03 00:00:05.109 5: [RollosTimer] result of condition:
2017.02.03 00:00:05.110 4: [RollosTimer] setTimer - timer seems to be NOT active today: 06|08:15|{SetRollosTimerControlled("auf")}
2017.02.03 00:00:05.110 5: [RollosTimer] setting Timer: RollosTimer_3 2017-02-03 08:15:00
2017.02.03 00:00:05.110 4: [RollosTimer] condition: - Tage:0,6
2017.02.03 00:00:05.110 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(0,6);;;;( 1 && (defined $days->{$wday}))}
2017.02.03 00:00:05.111 5: [RollosTimer] result of condition:
2017.02.03 00:00:05.111 4: [RollosTimer] setTimer - timer seems to be NOT active today: 06|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
2017.02.03 00:00:05.111 5: [RollosTimer] setting Timer: RollosTimer_4 2017-02-03 17:56:44
2017.02.03 00:00:05.111 5: [RollosTimer] removing Timer: RollosTimer_SetTimerOfDay
2017.02.03 00:00:05.112 5: [RollosTimer] setting Timer: RollosTimer_SetTimerOfDay 2017-02-04 00:00:05
2017.02.03 06:30:00.002 4: [RollosTimer] calculating dynamic param before all: ....... {SetRollosTimerControlled("auf")}
2017.02.03 06:30:00.002 4: [RollosTimer] calculating dynamic param after substitutions: {SetRollosTimerControlled("auf")}
2017.02.03 06:30:00.006 3: ZWave set EG_Kueche_Rollo_FL dim 99
2017.02.03 06:30:00.019 3: ZWave set EG_Kueche_Rollo_FR dim 99
2017.02.03 06:30:00.029 3: ZWave set EG_Wohnzimmer_Rollo_F dim 99
2017.02.03 06:30:00.040 3: ZWave set EG_Wohnzimmer_Rollo_TTL dim 99
2017.02.03 06:30:00.051 3: ZWave set EG_Wohnzimmer_Rollo_TTR dim 99
2017.02.03 06:30:00.063 3: ZWave set DG_Zimmer_Rollo_FL dim 99
2017.02.03 06:30:00.074 3: ZWave set DG_Zimmer_Rollo_FR dim 99
2017.02.03 06:30:00.081 1: [RollosTimer] problem calculating dynamic param: ........... {SetRollosTimerControlled("auf")}
2017.02.03 06:30:00.082 1: [RollosTimer]
2017.02.03 06:30:00.082 4: [RollosTimer] time={sunrise_abs(0,"06:00","06:30")}/1486099800 delay=0, nextDelay=60, nextRetry=1486099860
2017.02.03 06:30:00.083 4: [RollosTimer] delayedExecutionCond:0
2017.02.03 06:30:00.083 4: [RollosTimer] result of delayedExecutionCond:0
2017.02.03 06:30:00.084 4: [RollosTimer] list of window sensors found: 'RollosTimer'
2017.02.03 06:30:00.084 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.03 06:30:00.085 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.03 06:30:00.085 1: PERL WARNING: Use of uninitialized value $v in substitution (s///) at fhem.pl line 1018.
2017.02.03 06:30:00.085 1: stacktrace:
2017.02.03 06:30:00.086 1: main::__ANON__ called by fhem.pl (1018)
2017.02.03 06:30:00.086 1: main::AnalyzePerlCommand called by fhem.pl (1048)
2017.02.03 06:30:00.086 1: main::AnalyzeCommand called by fhem.pl (976)
2017.02.03 06:30:00.086 1: main::AnalyzeCommandChain called by ./FHEM/98_WeekdayTimer.pm (775)
2017.02.03 06:30:00.087 1: main::WeekdayTimer_isAnActiveTimer called by ./FHEM/98_WeekdayTimer.pm (737)
2017.02.03 06:30:00.087 1: main::WeekdayTimer_Update called by fhem.pl (2900)
2017.02.03 06:30:00.087 1: main::HandleTimeout called by fhem.pl (606)
2017.02.03 06:30:00.088 1: PERL WARNING: Use of uninitialized value $v in concatenation (.) or string at fhem.pl line 1019.
2017.02.03 06:30:00.088 1: stacktrace:
2017.02.03 06:30:00.088 1: main::__ANON__ called by fhem.pl (1019)
2017.02.03 06:30:00.088 1: main::AnalyzePerlCommand called by fhem.pl (1048)
2017.02.03 06:30:00.088 1: main::AnalyzeCommand called by fhem.pl (976)
2017.02.03 06:30:00.089 1: main::AnalyzeCommandChain called by ./FHEM/98_WeekdayTimer.pm (775)
2017.02.03 06:30:00.089 1: main::WeekdayTimer_isAnActiveTimer called by ./FHEM/98_WeekdayTimer.pm (737)
2017.02.03 06:30:00.089 1: main::WeekdayTimer_Update called by fhem.pl (2900)
2017.02.03 06:30:00.089 1: main::HandleTimeout called by fhem.pl (606)
2017.02.03 06:30:00.091 5: [RollosTimer] result of condition:1
2017.02.03 06:30:00.091 1: PERL WARNING: Use of uninitialized value $newParam in concatenation (.) or string at ./FHEM/98_WeekdayTimer.pm line 739.
2017.02.03 06:30:00.091 1: stacktrace:
2017.02.03 06:30:00.091 1: main::__ANON__ called by ./FHEM/98_WeekdayTimer.pm (739)
2017.02.03 06:30:00.092 1: main::WeekdayTimer_Update called by fhem.pl (2900)
2017.02.03 06:30:00.092 1: main::HandleTimeout called by fhem.pl (606)
2017.02.03 06:30:00.092 4: [RollosTimer] Update - timer seems to be active today: 12345|{sunrise_abs(0,"06:00","06:30")}|
2017.02.03 06:30:00.097 1: PERL WARNING: Use of uninitialized value $newParam in concatenation (.) or string at ./FHEM/98_WeekdayTimer.pm line 983.
2017.02.03 06:30:00.097 1: stacktrace:
2017.02.03 06:30:00.098 1: main::__ANON__ called by ./FHEM/98_WeekdayTimer.pm (983)
2017.02.03 06:30:00.098 1: main::WeekdayTimer_Device_Schalten called by ./FHEM/98_WeekdayTimer.pm (750)
2017.02.03 06:30:00.098 1: main::WeekdayTimer_Update called by fhem.pl (2900)
2017.02.03 06:30:00.098 1: main::HandleTimeout called by fhem.pl (606)
2017.02.03 06:30:00.098 4: [RollosTimer] aktParam: newParam: - is not disabled
2017.02.03 06:30:00.098 1: PERL WARNING: Use of uninitialized value $newParam in string ne at ./FHEM/98_WeekdayTimer.pm line 986.
2017.02.03 06:30:00.098 1: stacktrace:
2017.02.03 06:30:00.098 1: main::__ANON__ called by ./FHEM/98_WeekdayTimer.pm (986)
2017.02.03 06:30:00.099 1: main::WeekdayTimer_Device_Schalten called by ./FHEM/98_WeekdayTimer.pm (750)
2017.02.03 06:30:00.099 1: main::WeekdayTimer_Update called by fhem.pl (2900)
2017.02.03 06:30:00.099 1: main::HandleTimeout called by fhem.pl (606)
2017.02.03 06:30:00.114 3: ZWave set DG_Heizraum_Switch_CP on
2017.02.03 06:45:00.026 3: ZWave set DG_Heizraum_Switch_CP off
Der Fehler tritt nur bei diesem Timer auf, andere Timer, die ohne "sunrise_abs" bzw. "suset_abs" konfiguriert werden, laufen problemlos. Die Rollos werden dennoch hoch bzw. runtergefahren.
Weiß jemand, was ich bei der Definition falsch mache?
Danke im Voraus!
throbin
Das was du versuchst wird nicht funktionieren.
{SetRollosTimerControlled("auf")} muss einen Rückgabewert liefern.
Die Funktion darf/sollte nicht selbst schalten.
Der Inhalt der Funktion wird immer ohne Bedingung ausgeführt.
Der Rückgabewert, der aus deiner Funktion fälschlicherweise nicht zurückkommt, wird dann zur Generierung von Code verwendet.
OK, jetzt wird so einiges klarer. Danke!
Hi,
ich habe leider ein neues Problem... Seit einigen Wochen, reagiert der WeekdayTimer merkwürdig. Am Wochenende sollen die Rollos um 8:30 hochfahren, der Timer lässt sie aber schon um 6:30 hochfahren, quasi zur selben zeit wie unter der Woche. Dazu kommen nachts um 00:00 Meldungen ins Logfile, die ich nicht so ganz verstehe. Bei den Profilen werden die Zeiten aber korrekt angezeigt. Kann es sein, dass hier noch ein Fehler ist?
Log
2017.02.04 00:00:05.074 4: [RollosTimer] 07:20:41 17:58:21 Samstag
2017.02.04 00:00:05.074 4: [RollosTimer] 08:15:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 0: Sonntag)
2017.02.04 00:00:05.075 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 1: Montag)
2017.02.04 00:00:05.075 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 2: Dienstag)
2017.02.04 00:00:05.075 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 3: Mittwoch)
2017.02.04 00:00:05.075 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 4: Donnerstag)
2017.02.04 00:00:05.075 4: [RollosTimer] 06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 5: Freitag)
2017.02.04 00:00:05.075 4: [RollosTimer] 08:15:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")} (Profil 6: Samstag)
2017.02.04 00:00:05.076 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.04 00:00:05.076 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 00:00:05.077 5: [RollosTimer] result of condition:
2017.02.04 00:00:05.077 4: [RollosTimer] setTimer - timer seems to be NOT active today: 12345|{sunrise_abs(0,"06:00","06:30")}|{SetRollosTimerControlled("auf")}
2017.02.04 00:00:05.077 5: [RollosTimer] setting Timer: RollosTimer_1 2017-02-04 06:30:00
2017.02.04 00:00:05.077 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.04 00:00:05.078 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 00:00:05.078 5: [RollosTimer] result of condition:
2017.02.04 00:00:05.078 4: [RollosTimer] setTimer - timer seems to be NOT active today: 12345|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
2017.02.04 00:00:05.079 5: [RollosTimer] setting Timer: RollosTimer_2 2017-02-04 17:58:21
2017.02.04 00:00:05.079 4: [RollosTimer] condition: - Tage:0,6
2017.02.04 00:00:05.079 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(0,6);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 00:00:05.080 5: [RollosTimer] result of condition:1
2017.02.04 00:00:05.080 4: [RollosTimer] setTimer - timer seems to be active today: 06|08:15|{SetRollosTimerControlled("auf")}
2017.02.04 00:00:05.080 5: [RollosTimer] setting Timer: RollosTimer_3 2017-02-04 08:15:00
2017.02.04 00:00:05.080 4: [RollosTimer] condition: - Tage:0,6
2017.02.04 00:00:05.080 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(0,6);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 00:00:05.081 5: [RollosTimer] result of condition:1
2017.02.04 00:00:05.081 4: [RollosTimer] setTimer - timer seems to be active today: 06|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
2017.02.04 00:00:05.081 5: [RollosTimer] setting Timer: RollosTimer_4 2017-02-04 17:58:21
2017.02.04 00:00:05.082 5: [RollosTimer] removing Timer: RollosTimer_SetTimerOfDay
2017.02.04 00:00:05.082 5: [RollosTimer] setting Timer: RollosTimer_SetTimerOfDay 2017-02-05 00:00:05
2017.02.04 06:30:00.023 4: [RollosTimer] calculating dynamic param before all: ....... {SetRollosTimerControlled("auf")}
2017.02.04 06:30:00.024 4: [RollosTimer] calculating dynamic param after substitutions: {SetRollosTimerControlled("auf")}
2017.02.04 06:30:00.028 3: ZWave set EG_Kueche_Rollo_FL dim 99
2017.02.04 06:30:00.040 3: ZWave set EG_Kueche_Rollo_FR dim 99
2017.02.04 06:30:00.051 3: ZWave set EG_Wohnzimmer_Rollo_F dim 99
2017.02.04 06:30:00.062 3: ZWave set EG_Wohnzimmer_Rollo_TTL dim 99
2017.02.04 06:30:00.073 3: ZWave set EG_Wohnzimmer_Rollo_TTR dim 99
2017.02.04 06:30:00.084 3: ZWave set DG_Zimmer_Rollo_FL dim 99
2017.02.04 06:30:00.095 3: ZWave set DG_Zimmer_Rollo_FR dim 99
2017.02.04 06:30:00.100 4: [RollosTimer] calculating dynamic param after eval: ........ auf
2017.02.04 06:30:00.101 4: [RollosTimer] time={sunrise_abs(0,"06:00","06:30")}/1486186200 delay=0, nextDelay=60, nextRetry=1486186260
2017.02.04 06:30:00.101 4: [RollosTimer] delayedExecutionCond:0
2017.02.04 06:30:00.101 4: [RollosTimer] result of delayedExecutionCond:0
2017.02.04 06:30:00.101 4: [RollosTimer] list of window sensors found: 'RollosTimer'
2017.02.04 06:30:00.102 4: [RollosTimer] condition: - Tage:1,2,3,4,5
2017.02.04 06:30:00.102 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(1,2,3,4,5);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 06:30:00.103 5: [RollosTimer] result of condition:
2017.02.04 08:15:00.002 4: [RollosTimer] calculating dynamic param before all: ....... {SetRollosTimerControlled("auf")}
2017.02.04 08:15:00.003 4: [RollosTimer] calculating dynamic param after substitutions: {SetRollosTimerControlled("auf")}
2017.02.04 08:15:00.003 4: [RollosTimer] calculating dynamic param after eval: ........ auf
2017.02.04 08:15:00.004 4: [RollosTimer] time=08:15/1486192500 delay=0, nextDelay=60, nextRetry=1486192560
2017.02.04 08:15:00.005 4: [RollosTimer] delayedExecutionCond:0
2017.02.04 08:15:00.005 4: [RollosTimer] result of delayedExecutionCond:0
2017.02.04 08:15:00.005 4: [RollosTimer] list of window sensors found: 'RollosTimer'
2017.02.04 08:15:00.006 4: [RollosTimer] condition: - Tage:0,6
2017.02.04 08:15:00.006 5: [RollosTimer] condition: {my $days={};;map{$days->{$_}=1}(0,6);;;;( 1 && (defined $days->{$wday}))}
2017.02.04 08:15:00.008 5: [RollosTimer] result of condition:1
2017.02.04 08:15:00.008 4: [RollosTimer] Update - timer seems to be active today: 06|08:15|auf
2017.02.04 08:15:00.013 4: [RollosTimer] aktParam: newParam:auf - is not disabled
2017.02.04 08:15:00.014 4: [RollosTimer] command: 'set $NAME $EVENT' executed with %EVENT=>auf,%NAME=>dummyRollosTimerDevice
Profile:
Profil 0: Sonntag
08:15:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 1: Montag
06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 2: Dienstag
06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 3: Mittwoch
06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 4: Donnerstag
06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 5: Freitag
06:30:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Profil 6: Samstag
08:15:00 {SetRollosTimerControlled("auf")}, 17:58:21 {SetRollosTimerControlled("zu")}
Definition:
dummyRollosTimerDevice 12345|{sunrise_abs(0,"06:00","06:30")}|{SetRollosTimerControlled("auf")} 12345|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")} 60|08:15|{SetRollosTimerControlled("auf")} 60|{sunset_abs(0,"16:45","22:30")}|{SetRollosTimerControlled("zu")}
Danke!
Throbin
Deine Funktion SetRollosTimerControlled("auf") beinhaltet vermutlich set Befehle, die immer bedingungslos ausgeführt werden an jedem Tag der Woche zu jedem im WD definierten Zeitpunkt
Hi Dietmar,
ich lasse in dieser Funktion die set Befehle auf die Rollos los. Nach meinem Verständnis müsste der WeekdayTimer diese Funktion um 6:30 von Mo-Fr und 8:30 Sa-So aufrufen, sonst nicht. Muss ich dann in der aufrufenden Funktion den Weekday extra prüfen? Wenn ja, warum dann die WeekDay angebe in der Timer-Definition?
Gruß
throbin
Zitat
Nach meinem Verständnis müsste der WeekdayTimer diese Funktion um 6:30 von Mo-Fr und 8:30 Sa-So aufrufen
Und das ist leider genau falsch.
Der perlCode hinter jedem Zeitpunkt wird nur dazu benutzt den Schaltparaneter zu ermitteln. Es soll nicht dazu dienen, das Schalten selbst durchzuführen.
Die Erweiterung wurde von jemandem hier im Forum vorgeschlagen.
Die Erweiterung macht nur Arbeit, weil jeder glaubt man dürfe darin auch gleich Schalten.
Ich denke schon darüber nach die Erweiterung wieder
auszubauen
Hallo Dietmar,
kein Stress, sorry, dass ich dich genervt habe. Ich hatte die Doku leider völlig falsch interpretiert. Aber ich kann deinen Frust verstehen, ich würde auch dazu tendieren die Erweiterung wieder herauszunehmen. Ich habe die Rollos auf normale Timer (at) umgestellt.
Danke nochmal für deine Hilfe!
Gruß
throbin