Fehler in fhem nach update am 04.03.2012

Begonnen von Guest, 05 März 2012, 07:06:02

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

Folgender Inhalt in fhem.cfg

define ctrl_heizung_bad_on notify HZ_Badezimmer:*.*on-for-timer.* {\
  my $m = ReadingsVal("FS_Badezimmer", "Window", "Open");;\
  my $hm = sprintf("%sprintf("%c", 02)d:%sprintf("%c", 02)d", $hour,
$min);;\
  if ($m eq "Open") {\
    fhem("set HZ_Badezimmer off-for-timer");;\
    fhem("set HZ_ST_Badezimmer off-for-timer");;\
  } else {\
    if( $hm gt "04:30" && $hm lt "24:00") {\
      fhem("set HZ_ST_Badezimmer on-for-timer 512");;\
    }\
  }\
}

define ctrl_heizung_bad_off notify HZ_Badezimmer:*.*off-for-timer {\
  fhem("set HZ_Badezimmer off-for-timer");;\
  fhem("set HZ_ST_Badezimmer off-for-timer");;\
}

define ctrl_window_bad notify FS_Badezimmer:Window.*(Open|Closed) {\
  my $m = ReadingsVal("FS_Badezimmer", "Window", "Open");;\
  if ($m eq "Open") {\
    fhem("set HZ_Badezimmer off-for-timer");;\
    fhem("set HZ_ST_Badezimmer off-for-timer");;\
  }\
}

define ctrl_window_gaeste_on notify HZ_Gaeste:*.*on-for-timer.* {\
  my $m = ReadingsVal("FS_Gaeste", "Window", "Open");;\
  my $hm = sprintf("%sprintf("%c", 02)d:%sprintf("%c", 02)d", $hour,
$min);;\
  if ($m eq "Open") {\
    fhem("set HZ_Gaeste off-for-timer");;\
    fhem("set HZ_ST_Gaeste off-for-timer");;\
  } else {\
    if( $hm gt "04:30" && $hm lt "24:00") {\
      fhem("set HZ_ST_Gaeste on-for-timer 512");;\
    }\
  }\
}

define ctrl_window_gaeste_off notify HZ_Gaeste:*.*off-for-timer {\
  fhem("set HZ_Gaeste off-for-timer");;\
  fhem("set HZ_ST_Gaeste off-for-timer");;\
}

define ctrl_window_gaeste notify FS_Gaeste:Window.*(Open|Closed) {\
  my $m = ReadingsVal("FS_Gaeste", "Window", "Open");;\
  if ($m eq "Open") {\
    fhem("set HZ_Gaeste off-for-timer");;\
    fhem("set HZ_ST_Gaeste off-for-timer");;\
  }\
}

führt zu folgenden logs:

Bareword found where operator expected at (eval 14) line 1, near ""on-
for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 14) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 14) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 14) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 14) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 14) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 14) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 14) line 1, near "c",
02)d""
Bareword found where operator expected at (eval 229) line 1, near ""on-
for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 229) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 229) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 229) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 229) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 229) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 229) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 229) line 1, near "c",
02)d""
Argument "3.5 (Celsius)" isn't numeric in addition (+) at (eval 230)
line 1.
Bareword found where operator expected at (eval 653) line 1, near ""on-
for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 653) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 653) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 653) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 653) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 653) line 1, near "timer
512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 653) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 653) line 1, near "c",
02)d""
Bareword found where operator expected at (eval 1735) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1735) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1735) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1735) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1735) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1735) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1735) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1735) line 1, near "c",
02)d""
Argument "3.5 (Celsius)" isn't numeric in addition (+) at (eval 1736)
line 1.
Bareword found where operator expected at (eval 1737) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1737) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1737) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1737) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1737) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1737) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1737) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1737) line 1, near "c",
02)d""
Bareword found where operator expected at (eval 1952) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1952) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1952) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1952) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1952) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1952) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1952) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1952) line 1, near "c",
02)d""
Bareword found where operator expected at (eval 1954) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1954) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1954) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1954) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1954) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1954) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1954) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1954) line 1, near "c",
02)d""
Bareword found where operator expected at (eval 1955) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1955) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1955) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1955) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1955) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1955) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1955) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1955) line 1, near "c",
02)d""
Argument "3.6 (Celsius)" isn't numeric in addition (+) at (eval 1956)
line 1.
Bareword found where operator expected at (eval 1959) line 1, near
""on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1959) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1959) line 1, near
"512c"
   (Missing operator before c?)
String found where operator expected at (eval 1959) line 1, near "c",
02)d:on-for-timer 512sprintf(""
Bareword found where operator expected at (eval 1959) line 1, near "",
02)d:on-for-timer 512sprintf("on"
   (Missing operator before on?)
Number found where operator expected at (eval 1959) line 1, near
"timer 512"
   (Do you need to predeclare timer?)
Bareword found where operator expected at (eval 1959) line 1, near
"512c"
   (Missing operator before c?)

Was läuft falsch ?!

Grüße Jörg

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

>   my $hm = sprintf("%sprintf("%c", 02)d:%sprintf("%c", 02)d", $hour,

fuehrt also zu

> Bareword found where operator expected at (eval 14) line 1, near ""on-
> for-timer 512sprintf("on"

Finde ich total korrekt, und hat mit dem update  nichts zu tun.  Bitte keine
irreleitende Meldungen in dem Subject.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Hallo Rudolf,

nun präzieser:

vor update:
  my $hm = sprintf("%%02d:%%02d", $hour, $min);;\

update gemacht und etwas in fhem.cfg über WebFrontend geändert und
wunderbarerweise:
  my $hm = sprintf("%sprintf("%c", 02)d:%sprintf("%c", 02)d", $hour,
$min);;\

ich denke damit scheint es, dass das subject gerechtfertigt ist.

Herzliche Grüße Jörg

On 5 Mrz., 07:46, Rudolf Koenig wrote:
> >   my $hm = sprintf("%sprintf("%c", 02)d:%sprintf("%c", 02)d", $hour,
>
> fuehrt also zu
>
> > Bareword found where operator expected at (eval 14) line 1, near ""on-
> > for-timer 512sprintf("on"
>
> Finde ich total korrekt, und hat mit dem update  nichts zu tun.  Bitte keine
> irreleitende Meldungen in dem Subject.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

m.zielinski

                                                 

Ich habe auch seit dem Update vom 4.3.2012 um 8:50 Fehler die vorher
nicht da waren:

2012.03.04 21:32:59 3: n_Fenster return value: Bareword "FHTTK_status"
not allowed while "strict subs" in use at (eval 35) line 1.

Der zugehörige Code ist seit über einer Woche nicht geändert:

define n_Fenster notify .*:Window.*(Open|Closed) { \
  my $window_state=ReadingsVal("@", "Window", "nA");;\
  my $deftype=$defs{@}{TYPE};;\
  return if ( $deftype ne "CUL_FHTTK" );;\
  if ( $defs{@}{PREVSTATE} ne $window_state ) { \
    my $fhttk_anzahl=FHTTK_status;;\
    if($fhttk_anzahl > 0) {\
      fhem("set w_fenster off")\
    } else {\
      fhem("set w_aus off")\
    };;\
    Log 3, "@: Window ".$window_state;;\
    Log 3, "@: Fenster offen:".$fhttk_anzahl;;\
  }\
}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> 2012.03.04 21:32:59 3: n_Fenster return value: Bareword "FHTTK_status"
> not allowed while "strict subs" in use at (eval 35) line 1.

Klar:
>     my $fhttk_anzahl=FHTTK_status;;\

Jetzt stellt sich die Frage ob die Aenderung durch fhem oder etwas anderes
zustande kam. Wenn das fhem war, dann brauche ich zum fixen eine
nachvollziehbare Anleitung.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> ich denke damit scheint es, dass das subject gerechtfertigt ist.

Stimmt, war es auch.  Durch diesen Fehler werden beim editieren von Dateien mit
fhem Konstrukte wie %xy (x und y hex Ziffer) durch "sprintf("%c", xy)" ersetzt.
Habs gefixed und eingecheckt.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

m.zielinski

                                                 

On Mar 5, 6:27 pm, Rudolf Koenig wrote:
> Klar:
>
> >     my $fhttk_anzahl=FHTTK_status;;\

Sorry - gesehen hatte ich die Zeile auch - hab aus versehen die
99_fenster.pm gelöscht in der die Funktion war.

Also von meiner Seite ist das Problem nicht vorhanden.
Danke für deine Hilfe.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Hallo Rudolf,

danke für die schnelle Korrektur.

Herzliche Grüße Jörg

On 5 Mrz., 18:51, Rudolf Koenig wrote:
> > ich denke damit scheint es, dass das subject gerechtfertigt ist.
>
> Stimmt, war es auch.  Durch diesen Fehler werden beim editieren von Dateien mit
> fhem Konstrukte wie %xy (x und y hex Ziffer) durch "sprintf("%c", xy)" ersetzt.
> Habs gefixed und eingecheckt.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com