[Gelöst] Fehlermeldung beim Start von fhem über console

Begonnen von tupol, 05 Mai 2014, 22:03:20

Vorheriges Thema - Nächstes Thema

tupol

Hallo,
ist zwar nur eine Warnung und kein Fehler, aber ich erhalte immer folgende Nachricht beim Start von FHEM über die Konsole der RPi.

Use of uninitialized value in concatenation (.) or string at fhem.pl line 1936, <$fh> line 8.
Use of uninitialized value in concatenation (.) or string at fhem.pl line 1936, <$fh> line 8.

rudolfkoenig

Irgendwer versucht ein Modul ohne Namen zu laden.
Kannst Du bitte FHEM mit "attr global verbose 5" zu starten, und damit das Problem lokalisieren?

tupol

Seltsam. Anscheint hat er sich von verbose 5 abschrecken lassen. Seitdem ich dies getan habe läuft alles fehlerfrei.

Ich melde mich wieder wenn er wieder Mut gefasst hat. :-)

tupol

#3
nach dem heutigen update ist der Fehler erneut aufgetreten:
In der Konsole erscheint:

Starting fhem...
2014.05.10 03:48:06 1: Including fhem.cfg
2014.05.10 03:48:06 5: Cmd: >attr global logfile ./log/fhem-%Y-%m-%d.log<
Use of uninitialized value in concatenation (.) or string at fhem.pl line 1936, <$fh> line 8.
Use of uninitialized value in concatenation (.) or string at fhem.pl line 1936, <$fh> line 8.

Und danach keine Befehlzeilen-Promt mehr. Erst wenn fhem abstürzt, erscheint es wieder.

Im Log stehen bei verbose 5 Unmengen an Text. Zum Startzeitpunkt z.B.

2014.05.10 03:54:11 5: Cmd: >attr global nrarchive 21<
2014.05.10 03:54:11 5: Cmd: >attr global statefile ./log/fhem.save<
2014.05.10 03:54:11 5: Cmd: >attr global userattr fp_Haus fp_image icon devStateIcon webCmd<
2014.05.10 03:54:11 5: Cmd: >attr global modpath .<
2014.05.10 03:54:11 5: Cmd: >attr global uniqueID ./FHEM/FhemUtils/uniqueID<
2014.05.10 03:54:11 5: Cmd: >attr global motd none<
2014.05.10 03:54:11 5: Cmd: >attr global sendStatistics onUpdate<
2014.05.10 03:54:11 5: Cmd: >attr global exclude_from_update 70_JSONMETER.pm 23_LUXTRONIK2.pm 98_statistics.pm<
2014.05.10 03:54:11 5: Cmd: >define by holiday<
2014.05.10 03:54:11 5: Loading ./FHEM/95_holiday.pm
2014.05.10 03:54:11 5: Cmd: >attr global holiday2we by<
2014.05.10 03:54:11 5: Cmd: >define tPort telnet 7072 global<
2014.05.10 03:54:11 5: Loading ./FHEM/98_telnet.pm
2014.05.10 03:54:11 3: tPort: port 7072 opened
2014.05.10 03:54:11 5: Cmd: >attr tPort allowfrom 192.168.1.*|127.0.0.1<
2014.05.10 03:54:11 5: Cmd: >define tPortLocal telnet 7073<
2014.05.10 03:54:11 3: tPortLocal: port 7073 opened
2014.05.10 03:54:11 5: Cmd: >define Statistik statistics Sensor_.*|Wettersensor|FritzDect<
2014.05.10 03:54:11 5: Loading ./FHEM/98_statistics.pm
2014.05.10 03:54:12 5: Cmd: >attr Statistik room Tests<
2014.05.10 03:54:12 5: Cmd: >define Wochenend_Modus dummy<
2014.05.10 03:54:12 5: Loading ./FHEM/98_dummy.pm
2014.05.10 03:54:12 5: Cmd: >attr Wochenend_Modus comment Status der Wochenendschaltung (frueh, abends, an, aus)<
2014.05.10 03:54:12 5: Cmd: >attr Wochenend_Modus room 1_Steuerung<
2014.05.10 03:54:12 5: Cmd: >attr Wochenend_Modus webCmd aus:an:frueh:abends<
2014.05.10 03:54:12 5: Cmd: >attr Wochenend_Modus eventMap off:aus on:an<
2014.05.10 03:54:12 5: Cmd: >attr Wochenend_Modus icon scene_summerhouse<
2014.05.10 03:54:12 5: Cmd: >attr global autoload_undefined_devices 1<
2014.05.10 03:54:12 5: Cmd: >define autocreate autocreate<
2014.05.10 03:54:12 5: Loading ./FHEM/98_autocreate.pm
2014.05.10 03:54:12 5: Cmd: >attr autocreate autosave 1<
2014.05.10 03:54:12 5: Cmd: >attr autocreate device_room autocreate<
2014.05.10 03:54:12 5: Cmd: >attr autocreate filelog ./log/%NAME-%Y-%m.log<
2014.05.10 03:54:12 5: Cmd: >attr autocreate weblink 1<
2014.05.10 03:54:12 5: Cmd: >attr autocreate weblink_room autocreate<
2014.05.10 03:54:12 5: Cmd: >define WEB FHEMWEB 8083 global<
2014.05.10 03:54:12 5: Loading ./FHEM/01_FHEMWEB.pm
2014.05.10 03:54:13 3: WEB: port 8083 opened
2014.05.10 03:54:13 5: Cmd: >attr WEB stylesheetPrefix dark<
2014.05.10 03:54:13 5: Cmd: >attr WEB SVGcache 0<
2014.05.10 03:54:13 5: Cmd: >attr WEB longpoll 1<
2014.05.10 03:54:13 5: Cmd: >attr WEB reverseLogs<
2014.05.10 03:54:13 5: Cmd: >attr WEB menuEntries FHEM Fritz!Box,http://192.168.178.1:8083/fhem?room=all,Intranet,http://192.168.178.23<
2014.05.10 03:54:13 5: Cmd: >attr WEB column Aussenbereich:KS300,FS20,rain|FileLog,dummy DG:FS20|FileLog DG_Bad:CUL_WS,CUL_FHTTK|FileLog DG_Diele:FS20,PRESENCE|Dummy Automatik:dummy,watchdog|at|notify EG:FS20|FileLog 1_Display:FBDECT,PRESENCE,Weather,dummy|SYSMON,FB_CALLMONITOR,at,notify EG_Ess_Wohnzimmer:FS20|CUL_FHTTK,CUL_WS,PRESENCE|dummy Keller:CUL_WS,FS20,JSONMETER,LUXTRONIK2,dummy|PRESENCE,CUL_FHTTK,Weather|FileLog,at all:SVG,FS20,FBDECT,rain,statistics|CUL_WS,FB_CALLMONITOR,JSONMETER,KS300,LUXTRONIK2,dummy,notify,watchdog,SYSMON|FHEMWEB,at,CUL,FBAHA,holiday,telnet,autocreate,FileLog,DBLog<
2014.05.10 03:54:13 5: Cmd: >define WEBphone FHEMWEB 8084 global<
2014.05.10 03:54:13 3: WEBphone: port 8084 opened
2014.05.10 03:54:13 5: Cmd: >attr WEBphone stylesheetPrefix darksmallscreen<
2014.05.10 03:54:13 5: Cmd: >define WEBtablet FHEMWEB 8085 global<
2014.05.10 03:54:13 3: WEBtablet: port 8085 opened
2014.05.10 03:54:13 5: Cmd: >attr WEBtablet stylesheetPrefix darktouchpad<
2014.05.10 03:54:13 5: Cmd: >define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog<
2014.05.10 03:54:13 5: Loading ./FHEM/92_FileLog.pm
2014.05.10 03:54:13 5: Cmd: >define CUL CUL /dev/ttyACM0@9600 6434<
2014.05.10 03:54:13 5: Loading ./FHEM/00_CUL.pm
2014.05.10 03:54:13 3: Opening CUL device /dev/ttyACM0
2014.05.10 03:54:14 3: Setting CUL baudrate to 9600
2014.05.10 03:54:14 3: CUL device opened
2014.05.10 03:54:14 5: SW: V
2014.05.10 03:54:14 5: CUL/RAW (ReadAnswer): V 1.57 CUL868

2014.05.10 03:54:14 5: SW: ?
2014.05.10 03:54:14 5: CUL/RAW (ReadAnswer): ? (? is unknown) Use one of B C F i A Z E G M R T V W X e f m l t u x

2014.05.10 03:54:14 3: CUL: Possible commands: BCFiAZEGMRTVWXefmltux
2014.05.10 03:54:14 5: SW: X21
2014.05.10 03:54:14 5: SW: T01
2014.05.10 03:54:14 5: CUL/RAW (ReadAnswer): 6434

2014.05.10 03:54:14 5: GOT CUL fhtid: 6434
2014.05.10 03:54:14 5: Cmd: >attr CUL rfmode SlowRF<
2014.05.10 03:54:14 5: Cmd: >attr CUL room EG_Abstellkammer<
2014.05.10 03:54:14 5: Cmd: >attr CUL icon cul_868<
2014.05.10 03:54:14 5: Cmd: >define AutoSave at *01:00:00 {WriteStatefile();}<
2014.05.10 03:54:14 5: Loading ./FHEM/90_at.pm
2014.05.10 03:54:14 5: Cmd: >define Haus FLOORPLAN<
2014.05.10 03:54:14 5: Loading ./FHEM/95_FLOORPLAN.pm
2014.05.10 03:54:14 5: Cmd: >attr Haus fp_default 1<
2014.05.10 03:54:14 5: Cmd: >attr Haus stylesheet darkfloorplanstyle.css<
2014.05.10 03:54:14 5: Cmd: >include ./FHEM/display.cfg<
2014.05.10 03:54:14 1: Including ./FHEM/display.cfg
2014.05.10 03:54:14 5: Cmd: >define Wetter Weather 648418 1800 de<
2014.05.10 03:54:14 5: Loading ./FHEM/59_Weather.pm
2014.05.10 03:54:14 4: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=648418&u=c
2014.05.10 03:54:15 4: http://weather.yahooapis.com/forecastrss?w=648418&u=c: HTTP response code 200
2014.05.10 03:54:15 4: HttpUtils http://weather.yahooapis.com/forecastrss?w=648418&u=c: Got data, length: 2748
2014.05.10 03:54:15 4: Weather Wetter: T: 10  H: 82  W: 8
2014.05.10 03:54:15 5: Cmd: >attr Wetter event-on-change-reading fc1_low_c,fc1_high_c,fc1_condition,fc2_low_c,fc2_high_c,fc2_condition<
2014.05.10 03:54:15 5: Cmd: >attr Wetter icon it_i-net<
2014.05.10 03:54:15 5: Cmd: >attr Wetter room 1_Display<
2014.05.10 03:54:15 5: Cmd: >define display_soundbridge PRESENCE lan-ping 192.168.178.2<
2014.05.10 03:54:15 5: Loading ./FHEM/73_PRESENCE.pm
2014.05.10 03:54:15 5: Cmd: >attr display_soundbridge event-on-change-reading state<
2014.05.10 03:54:15 5: Cmd: >attr display_soundbridge icon it_radio<
2014.05.10 03:54:15 5: Cmd: >attr display_soundbridge room 1_Display<
2014.05.10 03:54:15 5: Cmd: >define display_drucker PRESENCE lan-ping 192.168.178.6<
2014.05.10 03:54:15 5: Cmd: >attr display_drucker event-on-change-reading state<
2014.05.10 03:54:15 5: Cmd: >attr display_drucker icon it_fax<
2014.05.10 03:54:15 5: Cmd: >attr display_drucker room 1_Display<
2014.05.10 03:54:15 5: Cmd: >define display_ipcam PRESENCE lan-ping 192.168.178.17<
2014.05.10 03:54:15 5: Cmd: >attr display_ipcam event-on-change-reading state<
2014.05.10 03:54:15 5: Cmd: >attr display_ipcam icon it_camera<
2014.05.10 03:54:15 5: Cmd: >attr display_ipcam room 1_Display<
2014.05.10 03:54:15 5: Cmd: >define display_log_Telefonanruf notify FritzBox:event.*


Das sunrise-modul lässt sich auch nicht mehr laden
      Not enough arguments for main::_sr_alt at ./FHEM/99_SUNRISE_EL.pm line 124, near "@_)"
Ich hoffe, es hat nichts mit meinem neuen statistics-modul zu tun. Der Fehler erscheint aber auch, wenn ich es aus der cfg rausnehme.
Ach noch was, ich habe nach dem Start des Updates meinen PC runtergefahren. Ich hoffe, das gibt keine Meldung an FHEMWEB.

tupol

Ergänzung. Jetzt läuft fhem beim Start durch bis zur Kommandozeile. Keine Fehlermeldung. Aber sunrise wird nach wie vor nicht geladen.

betateilchen

Zeig doch mal, wie Du in deiner Konfiguration auf sunrise zugreifst.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

tupol

Hier ein Beispiel das bisher problemlos funktioniert. Ich vermute, der Perlteil ist egal.

#Rollos hoch bei Sonnenaufgang und ausreichend Helligkeit aber nicht vor 7:20 in der Woche ...
define Auto_Rollos_EGDG_hoch_w at *{sunrise(0,"07:20","12:00")} {\
   fhem("set s_sonnenschutz_s_modus,s_sonnenschutz_w_modus  beobachte_sonne");;\
   if ($we==0 && Value("Wochenend_Modus") ne "frueh" && Value("Wochenend_Modus") ne "an" && ReadingsVal("Heizung","opModeHotWater","") ne "Ferien") {\
      if (Value("DS_S_1") eq "Tag") {\
         fhem("trigger Auto_Rollos_EDDG_hoch");;\
      } else {\
         fhem("trigger Alle_EG_Rollos_reset,Alle_DG_Rollos_reset");;\
         fhem("define Temp_RD_DS1on notify DS_S_1:(Tag|on) trigger Auto_Rollos_EDDG_hoch");;\
         fhem("attr Temp_.* room Temporaer");;\
      }\
   }\
}

tupol

Jetzt habe ich mal probehalber all sunrise und sunset rausgeschmissen und versucht das sunrise-Modul zu laden. Selber Fehler.

Not enough arguments for main::_sr_alt at ./FHEM/99_SUNRISE_EL.pm line 124, near "@_)"

Das sunrise modul ist leider nur sehr spartanisch kommentiert. Weiß jemand was diese Prozedur macht?

121 sub
122 _sr($$$$$$)
123 {
124      _sr_alt($defaultaltit,@_);
125  }

betateilchen

ja, sie ruft die sub _sr_alt auf und übergibt den zusätzlichen Parameter $defaultaltit

Welche Version von 99_SUNRISE_EL hast Du denn im Einsatz?

# $Id: 99_SUNRISE_EL.pm 4537 2014-01-03 08:28:59Z rudolfkoenig $
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

tupol

Die aktuellen
# $Id: fhem.pl 5728 2014-05-03 09:41:12Z rudolfkoenig $
# $Id: 00_CUL.pm 5487 2014-04-08 11:29:41Z rudolfkoenig $
# $Id: 09_CUL_FHTTK.pm 5207 2014-03-12 19:05:33Z matscher $
# $Id: 14_CUL_WS.pm 5379 2014-03-30 16:34:01Z rudolfkoenig $
# $Id: 93_DbLog.pm 5782 2014-05-08 06:15:58Z tobiasfaust $
# $Id: 00_FBAHA.pm 2777 2013-02-20 08:02:01Z rudolfkoenig $
# $Id: 10_FBDECT.pm 2779 2013-02-21 08:52:27Z rudolfkoenig $
# $Id: 72_FB_CALLMONITOR.pm 5767 2014-05-06 17:29:15Z markusbloch $
# $Id: 93_FHEM2FHEM.pm 5239 2014-03-16 16:37:15Z rudolfkoenig $
# $Id: 01_FHEMWEB.pm 5783 2014-05-08 11:16:45Z rudolfkoenig $
# $Id: 95_FLOORPLAN.pm 5051 2014-02-26 12:36:45Z betateilchen $
# $Id: 10_FS20.pm 5326 2014-03-26 07:15:25Z rudolfkoenig $
# $Id: 92_FileLog.pm 5752 2014-05-05 15:41:00Z rudolfkoenig $
# $Id: $ Meine Luxtronik2
# $Id: 13_KS300.pm 5768 2014-05-06 17:53:15Z rudolfkoenig $
# $Id: $ Mein Jsonmeter
# $Id: 73_PRESENCE.pm 5434 2014-04-04 15:43:23Z markusbloch $
# $Id: 99_SUNRISE_EL.pm 4537 2014-01-03 08:28:59Z rudolfkoenig $
# $Id: 98_SVG.pm 5715 2014-05-01 15:02:06Z rudolfkoenig $
# $Id: 99_Utils.pm 5488 2014-04-08 11:32:17Z rudolfkoenig $
# $Id: 59_Weather.pm 4887 2014-02-11 19:27:08Z borisneubert $
# $Id: 90_at.pm 5319 2014-03-25 10:11:47Z rudolfkoenig $
# $Id: 98_autocreate.pm 5268 2014-03-20 20:46:00Z rudolfkoenig $
# $Id: 98_dummy.pm 4934 2014-02-15 08:23:12Z rudolfkoenig $
# $Id: 95_holiday.pm 5715 2014-05-01 15:02:06Z rudolfkoenig $
# $Id: 91_notify.pm 5470 2014-04-07 08:32:35Z rudolfkoenig $
# $Id: 98_statistics.pm 5812 2014-05-10 18:00:55Z tpoitzsch $
# $Id: 98_telnet.pm 4844 2014-02-08 07:54:03Z rudolfkoenig $
# $Id: 91_watchdog.pm 5622 2014-04-24 08:04:29Z rudolfkoenig $

tupol

#10
Das ist mir wirklich ein Rätsel. Ich habe fhem auf dem RPi komplett neu installiert und eine minimale cfg eingespielt. Selbes Ergebnis

attr global logfile log/fhem.log
    attr global modpath .
    attr global statefile log/fhem.save
    attr global verbose 3
    define WEB FHEMWEB 8083 global

define Auto_winter_frueh_aus_w at *{sunrise(1800,"07:00","07:45")} {}

the at function "sunrise(1800,"07:00","07:45")" must return a timespec and not Undefined subroutine &main::sunrise called at (eval 1671) line 1, <$fh> line 7. .

reload 99_SUNRISE_EL.pm

Not enough arguments for main::_sr_alt at ./FHEM/99_SUNRISE_EL.pm line 124, near "@_)"

Shutdown und Start von Konsole resultiert in zwei Mal:
Use of uninitialized value in concatenation (.) or string at fhem.pl line 1936, <$fh> line 2.

tupol

#11
Noch was. Ich hatte nach der ständigen Meldung
Can't locate RTypes.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at fhem.pl line 434.
RTypes in /usr/share/perl/5.14 kopiert. War wahrscheinlich nicht sehr weise, da ich dadurch obigen Fehler zwar unterdrückt habe, aber möglicherweise auch den entscheidenden Hinweis für den Fehler.

Was macht dieses @INC? Kann es sein, das es eine Variabel ist, die ich durch irgendwelche Module überschrieben habe (CPAN z.B.)?
Sollte hier evt. fhem drin vorkommen?
Wenn ja, wie kann ich sowas ändern?

PS: Kann mir jemand auf seiner RPi mal folgenden Befehl ausführen:
{my $test;; foreach(@INC){$test .= "\n".$_;;} return $test}

betateilchen

@INC ist die Pfadangabe, die von perl benutzt wird, um perl-Module zu finden.

Wenn Du ein Problem mit den RTypes hast, stimmt aber irgendwas mit Deiner gesamten fhem-Installation nicht.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

tupol

#13
Die habe ich aber gerade nochmal neu installiert. Ich vermute es ist eher was mit Perl. Das ganze fing möglicherweise mit meinem Umschalten auf Dblog an, als ich versucht über CPAN neue Module zu installieren. Jetzt habe ich @INC mal mit der Fritzbox verglichen und deren Verzeichnisse per "use lib" auf die RPI rübergeholt. Das gibt zumindest keine Probleme mit RTypes mehr

Mein @INC sieht jetzt so aus. Ist das korrekt?

/opt/fhem/FHEM/lib/perl5/5.12.2
/opt/fhem/FHEM/lib/perl5/5.12.2/mips-linux
/opt/fhem/FHEM/lib/perl5/site_perl/5.12.2
/opt/fhem/FHEM/lib/perl5/site_perl/5.12.2/mips-linux
./FHEM
.
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl

tupol

Ne. Ist Schwachsinn, es gibt kein perl unter FHEM/lib auf der RPI.
Kann bitte einer einmal folgenden Code auf der RPI ausführen
{my $test;; foreach(@INC){$test .= "\n".$_;;} return $test}