FHEM > Automatisierung
Neues Modul YAAHM - Yet Another Auto Home Module
Prof. Dr. Peter Henning:
Das ist ein Fehler, der außerhalb von YAAHM liegt. Aus der Definition von Shorttable:
--- Code: ---# YAAHM_Shorttable - returns complete HTML code for inclusion into any room page
# (action and overview fields)
#
# Parameter name = name of the YAAHM definition
--- Ende Code ---
Ich halte es für unwahrscheinlich, dass jemand seine YAAHM-Installation "YAAutoHM" nennt - ich vermute vielmehr, dass da jemand mit einem Ersetzungsbefehl den htlmCode-Aufruf von Shorttable im entsprechenden weblink zu
--- Zitat ---{YAAHM_Shorttable("YAAutoHM")}
--- Ende Zitat ---
umgeschossen hat.
Dazu sollte man - wie in Zeile 707 des Moduls erkennbar ist - mal das Device für diesen Weblink anschauhen:
--- Code: --- #-- this is the short YAAHM entry
FW_fC("defmod ".$name."_shortlink weblink htmlCode {YAAHM_Shorttable(\"".$name."\")}");
Log3 $hash, 3, "[".$name. " V".$yaahmversion."]"." Weblink ".$name."_shortlink created";
--- Ende Code ---
Also, was steht im FHEM-Device "<YAAHM-Devicename>_shortlink", und zwar als Internal LINK?
LG
pah
wcraffonara:
Guten Abend Herr Prof Henning,
ich habe mir vor einigen Wochen das Buch "Smart Home mit FHEM" von Ihnen gekauft und versuche gerade das Modul YAAHM anzuwenden, jedoch werden bei mir fogende events nicht ausgeführt: aftermidnight/beforesunrise/aftersunrise/beforesunset/aftersunset/beforemidnight <- also jene, die mittels Offset berechnet werden.
Nachdem ich das device YYY erstellt habe, habe ich den timeHelper auf HouseTimeHelper gesetzt. Danach habe ich den Button Start Tages-Timer angeklickt, worauf dann YYY.dtimer.IF erstellt worden ist. In dessen readings ist mir dann aufgefallen, dass einige timer nicht richtig konfiguriert werden, z.B.:
timer_01_c01 29.11.2021 00:01:00 2021-11-28 19:26:21
timer_02_c01 error: Wrong timespec : either HH:MM:SS or {perlcode} 2021-11-28 19:26:21
timer_03_c02 29.11.2021 06:19:00 2021-11-28 19:26:21
timer_04_c02 error: Wrong timespec : either HH:MM:SS or {perlcode} 2021-11-28 19:26:21
Manche events werden zum richtigen Zeitpunkt ausgeführt (z.B. [YAAHM_time] executing {HouseTimeHelper('evening')}), andere wiederum nicht (z.B. aftersunset).
Ich gehe davon aus, dass dies mit den nicht angelegten Timer zusammenhängt, aber woran liegt das und wie kann ich das beheben?
Vielen Dank!
Mit freundlichen Grüßen
Walter
Prof. Dr. Peter Henning:
Das kann eigentlich nur daran liegen, dass die Offsets nicht richtig eingetragen wurden. Der entsprechende Block auf der YAAHM-Seite muss so aussehen, wie auf der Anlage.
Im Device YYY wiederum gibt es dann entsprechende Readings mit den berechneten Endzeiten:
--- Code: ---
s_aftermidnight 00:05 2021-11-29 00:00:33
s_afternoon 14:30 2021-11-29 00:00:33
s_aftersunrise 08:56 2021-11-29 00:00:33
s_aftersunset 17:32 2021-11-29 00:00:33
s_beforemidnight 23:55 2021-11-29 00:00:33
s_beforesunrise 06:56 2021-11-29 00:00:33
s_beforesunset 15:32 2021-11-29 00:00:33
s_evening 18:30 2021-11-29 00:00:33
s_morning 7:30 2021-11-29 00:00:33
s_night 22:00 2021-11-29 00:00:33
s_noon 13:30 2021-11-29 00:00:33
s_sunrise 07:56 2021-11-29 00:00:33
s_sunset 16:32 2021-11-29 00:00:33
--- Ende Code ---
LG
pah
wcraffonara:
Hallo,
jetzt funktioniert es.
Ich habe die Offsets nichts angepasst, da sie bei mir genauso wie im Buch bereits standardmäßig eingetragen waren und der entsprechende Block auf der YAAHM-Seite genauso wie in Ihrer vorherigen Anlage bereits angezeigt wurden.
Ich habe jetzt einfach das Offset von aftermidnight von +00:01 auf +00:05 geändert und dann auf Start Tages-Timer geklickt. Danach sind alle Timer richtig angelegt worden, auch jene, wo ich das Offset nicht geändert habe.
Vielen Dank für die Hilfe und für dieses Modul!
lG
Walter
wcraffonara:
Hallo,
muss mich leider korrigieren... es funktioniert doch (noch) nicht.
Im logfile bekomme ich für den Zeitpunkt beforesunrise folgende Einträge und die Befehle in der HouseTimeHelper werden nicht ausgeführt
021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $mval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1222.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $nval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1223.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $tval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1224.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $mval in numeric ge (>=) at ./FHEM/95_YAAHM.pm line 1227.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $nval in numeric gt (>) at ./FHEM/95_YAAHM.pm line 1227.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $xval in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1350.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $xval in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1352.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
2021.12.05 06:27:00 1: [YAAHM_time] executing
2021.12.05 06:27:00 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 1093.
2021.12.05 06:27:00 3: eval: {YAAHM_time('YYY','beforesunrise',1)}
Das bekomme ich bei list YYY.dtimer.IF
--- Code: ---Internals:
DEF ([[YYY:s_aftermidnight]])
({YAAHM_time('YYY','aftermidnight',1)})
DOELSEIF([[YYY:s_beforesunrise]])
({YAAHM_time('YYY','beforesunrise',1)})
DOELSEIF([[YYY:s_sunrise]])
({YAAHM_time('YYY','sunrise',1)})
DOELSEIF([[YYY:s_morning]])
({YAAHM_time('YYY','morning',1)})
DOELSEIF([[YYY:s_aftersunrise]])
({YAAHM_time('YYY','aftersunrise',1)})
DOELSEIF([[YYY:s_noon]])
({YAAHM_time('YYY','noon',1)})
DOELSEIF([[YYY:s_afternoon]])
({YAAHM_time('YYY','afternoon',1)})
DOELSEIF([[YYY:s_beforesunset]])
({YAAHM_time('YYY','beforesunset',1)})
DOELSEIF([[YYY:s_sunset]])
({YAAHM_time('YYY','sunset',1)})
DOELSEIF([[YYY:s_aftersunset]])
({YAAHM_time('YYY','aftersunset',1)})
DOELSEIF([[YYY:s_evening]])
({YAAHM_time('YYY','evening',1)})
DOELSEIF([[YYY:s_night]])
({YAAHM_time('YYY','night',1)})
DOELSEIF([[YYY:s_beforemidnight]])
({YAAHM_time('YYY','beforemidnight',1)})
FUUID 61a3c9cd-f33f-97b4-1acd-19f1d971b7af34ae
MODEL FHEM
NAME YYY.dtimer.IF
NOTIFYDEV global,YYY
NR 972
NTFY_ORDER 50-YYY.dtimer.IF
STATE cmd_4
TYPE DOIF
VERSION 24905 2021-09-01 18:35:54
READINGS:
2021-12-06 08:00:00 cmd 4
2021-12-06 08:00:00 cmd_event timer_4
2021-12-06 08:00:00 cmd_nr 4
2021-11-29 13:09:26 mode enabled
2021-12-06 08:00:00 state cmd_4
2021-12-06 03:01:57 timer_01_c01 07.12.2021 00:05:00
2021-12-06 06:28:00 timer_02_c02 07.12.2021 06:28:00
2021-12-06 07:28:00 timer_03_c03 07.12.2021 07:28:00
2021-12-06 08:00:00 timer_04_c04 07.12.2021 08:00:00
2021-12-06 03:01:57 timer_05_c05 06.12.2021 08:28:00
2021-12-06 03:01:57 timer_06_c06 06.12.2021 13:00:00
2021-12-06 03:01:57 timer_07_c07 06.12.2021 14:00:00
2021-12-06 03:01:57 timer_08_c08 06.12.2021 15:04:00
2021-12-06 03:01:57 timer_09_c09 06.12.2021 16:04:00
2021-12-06 03:01:57 timer_10_c10 06.12.2021 17:04:00
2021-12-06 03:01:57 timer_11_c11 06.12.2021 18:30:00
2021-12-06 03:01:57 timer_12_c12 06.12.2021 22:00:00
2021-12-06 03:01:57 timer_13_c13 06.12.2021 23:55:00
Regex:
accu:
collect:
itimer:
YYY:
itimer:
s_aftermidnight ^YYY$:^s_aftermidnight:
s_afternoon ^YYY$:^s_afternoon:
s_aftersunrise ^YYY$:^s_aftersunrise:
s_aftersunset ^YYY$:^s_aftersunset:
s_beforemidnight ^YYY$:^s_beforemidnight:
s_beforesunrise ^YYY$:^s_beforesunrise:
s_beforesunset ^YYY$:^s_beforesunset:
s_evening ^YYY$:^s_evening:
s_morning ^YYY$:^s_morning:
s_night ^YYY$:^s_night:
s_noon ^YYY$:^s_noon:
s_sunrise ^YYY$:^s_sunrise:
s_sunset ^YYY$:^s_sunset:
attr:
cmdState:
waitdel:
condition:
0 ::DOIF_time_once($hash,0,$wday)
1 ::DOIF_time_once($hash,1,$wday)
10 ::DOIF_time_once($hash,10,$wday)
11 ::DOIF_time_once($hash,11,$wday)
12 ::DOIF_time_once($hash,12,$wday)
2 ::DOIF_time_once($hash,2,$wday)
3 ::DOIF_time_once($hash,3,$wday)
4 ::DOIF_time_once($hash,4,$wday)
5 ::DOIF_time_once($hash,5,$wday)
6 ::DOIF_time_once($hash,6,$wday)
7 ::DOIF_time_once($hash,7,$wday)
8 ::DOIF_time_once($hash,8,$wday)
9 ::DOIF_time_once($hash,9,$wday)
days:
do:
0:
0 {YAAHM_time('YYY','aftermidnight',1)}
1:
0 {YAAHM_time('YYY','beforesunrise',1)}
10:
0 {YAAHM_time('YYY','evening',1)}
11:
0 {YAAHM_time('YYY','night',1)}
12:
0 {YAAHM_time('YYY','beforemidnight',1)}
13:
2:
0 {YAAHM_time('YYY','sunrise',1)}
3:
0 {YAAHM_time('YYY','morning',1)}
4:
0 {YAAHM_time('YYY','aftersunrise',1)}
5:
0 {YAAHM_time('YYY','noon',1)}
6:
0 {YAAHM_time('YYY','afternoon',1)}
7:
0 {YAAHM_time('YYY','beforesunset',1)}
8:
0 {YAAHM_time('YYY','sunset',1)}
9:
0 {YAAHM_time('YYY','aftersunset',1)}
helper:
DEVFILTER ^global$|^YYY$
NOTIFYDEV global|YYY
event timer_4
globalinit 1
last_timer 13
sleeptimer -1
timerdev
timerevent timer_4
triggerDev
timerevents:
timer_4
timereventsState:
timer_4
triggerEvents:
timer_4
triggerEventsState:
timer_4
interval:
intervalfunc:
intervaltimer:
localtime:
0 1638831900
1 1638854880
10 1638811800
11 1638824400
12 1638831300
2 1638858480
3 1638860400
4 1638775680
5 1638792000
6 1638795600
7 1638799440
8 1638803040
9 1638806640
perlblock:
realtime:
0 00:05:00
1 06:28:00
10 18:30:00
11 22:00:00
12 23:55:00
2 07:28:00
3 08:00:00
4 08:28:00
5 13:00:00
6 14:00:00
7 15:04:00
8 16:04:00
9 17:04:00
time:
0 [YYY:s_aftermidnight]
1 [YYY:s_beforesunrise]
10 [YYY:s_evening]
11 [YYY:s_night]
12 [YYY:s_beforemidnight]
2 [YYY:s_sunrise]
3 [YYY:s_morning]
4 [YYY:s_aftersunrise]
5 [YYY:s_noon]
6 [YYY:s_afternoon]
7 [YYY:s_beforesunset]
8 [YYY:s_sunset]
9 [YYY:s_aftersunset]
timeCond:
0 0
1 1
10 10
11 11
12 12
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
timer:
0 0
1 0
10 0
11 0
12 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
timers:
0 0
1 1
10 10
11 11
12 12
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
triggertime:
1638775680:
localtime 1638775680
hash:
1638792000:
localtime 1638792000
hash:
1638795600:
localtime 1638795600
hash:
1638799440:
localtime 1638799440
hash:
1638803040:
localtime 1638803040
hash:
1638806640:
localtime 1638806640
hash:
1638811800:
localtime 1638811800
hash:
1638824400:
localtime 1638824400
hash:
1638831300:
localtime 1638831300
hash:
1638831900:
localtime 1638831900
hash:
1638854880:
localtime 1638854880
hash:
1638858480:
localtime 1638858480
hash:
1638860400:
localtime 1638860400
hash:
uiState:
uiTable:
Attributes:
do always
room Unsorted
--- Ende Code ---
Finden Sie den Fehler?
lG
Walter
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln