Hauptmenü

Füllen Logfile

Begonnen von juemuc, 11 Mai 2020, 21:42:06

Vorheriges Thema - Nächstes Thema

juemuc

Hallo,
wenn ich das Logfile über das "FHEM-Menü" anzeigen lassen, erhalte ich eine andere Ansicht (irgendwie ein Mix aus den Logfiles der letzten Tage), als wenn ich das Logfile über "Everything" auswähle. Ich habe als Beispiel mal eine Datei angehängt.
Was läuft hier falsch?

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

moskito

Sind denn die Hyperlinks, die zum Anzeigen der Logdatei angeklickt werden identisch?
Wenn ja, dann gibt es vielleicht Probleme mit dem Dateisystem / bzw. (ich schätze mal anhand der Signatur) SD-Karte.
Ist das Durcheinander im Log "falschen" Log denn konstant, oder ändert es sich mit jedem Aufruf?
Browsercache oder sowas, kommt denke ich mal nicht in Frage.
Evtl. mal von extern in die Datei reinschauen, ob der Wirrwar oder das korrekte drinsteht.

Gruß
Danny
FHEM auf Intel NUC/Proxmox & Debian 12 + HM-CFG-USB + zigbee2mqtt + Zwave + Enocean

juemuc

Hallo Danny,

nein, die links sind nicht identisch. Das ist ja das Problem.

https://raspberrypi:8083/fhem/FileLog_logWrapper?dev=Logfile&type=text&file=fhem-2020-05-09.log

bzw.

https://raspberrypi:8083/fhem/FileLog_logWrapper&dev=Logfile&type=text&file=fhem-2020-05-12.log

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

moskito

Hi Jürgen,

kontrolliere doch bitte mal ob das folgende bei Dir so zutrifft:
ZitatGlobale Logdatei und "fakelog"

Die globale Logdatei (üblicherweise als fhem.log bezeichnet) für Fhem wird mit dem Attribut

    attr global logfile XXX

für das global-Objekt definiert, wobei für XXX normalerweise ./log/fhem-%Y-%m.log verwendet wird.

Um das fhem.log über das Web Interface anzeigen zu können, ist ein weiterer Eintrag in der Konfiguration erforderlich, nämlich:

    define Logfile FileLog XXX fakelog

Das XXX muss zwingend durch den gleichen Wert ersetzt werden, wie in der Definition des globalen logfile Attributs, weil anderenfalls unterschiedliche Dateien verwendet werden - mit dem Effekt, dass die über das Web Interface angezeigte Datei nicht die erwarteten Einträge enthält (Details dazu auch in diesem Forenbeitrag).

Habe ich mal aus dem Wiki rauskopiert. https://wiki.fhem.de/wiki/FileLog
Dann wären wir schon mal sicher, dass das passt.

Gruß
Danny
FHEM auf Intel NUC/Proxmox & Debian 12 + HM-CFG-USB + zigbee2mqtt + Zwave + Enocean

juemuc

HI Danny,

ja das passt alles. Merkwürdig ist nur, dass das Reading linesInTheFile den Wert 0 hat. Ich habe allerdings ein "Tages-Logfile".

./log/fhem-%Y-%m-%d.log fakelog

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

moskito

Tageslogfile habe ich auch und schaut genau so aus. :)
Was sagen denn die Internals im global Device?
Dort gibt es "currentlogfile", sollte mit der Vorlage aus dem logfile Attribut, den Dateinamen für heute anzeigen.
Vom Aufbau her müsste Dein erster Link, derjenige aus dem FHEM-Menü sein.
Aber warum zeigt der auf den 09.05.? ::)
Erzeugt wird das ja mit:
# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog

Und auch da gibt es ein Internal "currentlogfile" was identisch mit dem aus global sein sollte.
FHEM auf Intel NUC/Proxmox & Debian 12 + HM-CFG-USB + zigbee2mqtt + Zwave + Enocean

juemuc

Auch da ist alles ok. Die Datei(en) sind ja auch alle da  8)

Internals:
   DEF        no definition
   FD         3
   NAME       global
   NR         1
   STATE      no definition
   TYPE       Global
   currentlogfile ./log/fhem-2020-05-12.log
   init_errors
   logfile    ./log/fhem-%Y-%m-%d.log
   READINGS:
Attributes:
   autoload_undefined_devices 1
   autosave   1
   backupdir  /mnt/DS-Save/FHEM
   commandref modular
   configfile fhem.cfg
   devStateStyle style="text-align:right"
   holiday2we by
   language   DE
   latitude   48.02313
   logfile    ./log/fhem-%Y-%m-%d.log
   longitude  11.71946
   modpath    .
   motd       1
   nrarchive  7
   sendStatistics never
   stacktrace 0
   statefile  ./log/fhem.save
   updateInBackground 1
   userattr   alexaName alexaProactiveEvents:1,0 alexaRoom cmdIcon devStateIcon devStateIcon:textField-long devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock,scene homebridgeMapping:textField-long icon sortby webCmd webCmdLabel:textField-long widgetOverride
   verbose    2
   version    fhem.pl:21762/2020-04-23


Nur der Link aus dem Menü passt nicht.

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

moskito

Also ich hätte noch die Idee, mal das Logfile Device, was ja den Link erzeugt, zu löschen und wieder neu anzulegen.
Wenn das Fehlerbild dann immer noch da ist, gehen mir langsam die Ideen aus. ???

Gruß
Danny
FHEM auf Intel NUC/Proxmox & Debian 12 + HM-CFG-USB + zigbee2mqtt + Zwave + Enocean

juemuc

Hallo zusammen,

ich muss dieses Thema noch einmal hervorkramen, da es mich fürchterlich stört.

Ich habe am 15.07. alle FHEM-Logfiles gelöscht. Nun habe ich 3 Logfiles, was erst einmal normal ist. Allerdings sind s

Logfile vom 17.07.:

...
2020.07.17 22:35:35 1: HMCCU: [HMCCU3 : 31097] All RPC servers running
2020.07.17 22:35:35 2: HMCCU: [HMCCU3 : 31097] Updating 20 of 20 client devices matching devexp=.* filter=ccudevstate=active,ccuif=BidCos-RF|HmIP-RF
2020.07.17 22:35:36 2: HMCCU: [HMCCU3 : 31097] Update success=20 failed=0
2020.07.18 14:06:12 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.18 14:06:13 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.18 14:06:43 1: SONOS1: Couldn't load data from URL(https://api.classicalarchives.com/smapi/presentationmap.xml) 1: 500 Status read failed:
2020.07.18 18:47:45 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.18 18:47:45 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.18 18:48:14 1: SONOS1: Couldn't load data from URL(https://api.classicalarchives.com/smapi/presentationmap.xml) 1: 500 Status read failed:
2020.07.18 20:13:07 1: SONOS1: Couldn't load data from URL(https://api.classicalarchives.com/smapi/presentationmap.xml) 1: 500 Status read failed:
2020.07.19 14:02:41 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.19 14:02:43 1: SONOS1: Service-subscribing not possible due to missing TransportService
2020.07.19 14:03:11 1: SONOS1: Couldn't load data from URL(https://api.classicalarchives.com/smapi/presentationmap.xml) 1: 500 Status read failed:


Logfile vom 18.07.:

...
2020.07.18 00:00:01 2: Deleting FBDECT_FB_grpCC9F1C_3B163D213-2020-07-10.log
2020.07.18 00:01:39 2: Deleting alexa-2020-07-11.log
2020.07.18 00:06:09 2: Deleting gassistant-2020-07-11.log
2020.07.18 04:54:38 1: RMDIR: ./restoreDir/save/2020-07-15
2020.07.18 04:54:38 1: PERL WARNING: Use of uninitialized value in regexp compilation at ./FHEM/98_WeekdayTimer.pm line 425.
2020.07.18 04:54:38 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/98_WeekdayTimer.pm line 1215.
/opt/fhem/cache/alexa-cookie/node_modules/cookie/index.js:51
    throw new TypeError('argument str must be a string');
    ^

TypeError: argument str must be a string
    at Object.parse (/opt/fhem/cache/alexa-cookie/node_modules/cookie/index.js:51:11)
    at addCookies (/opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js:41:33)
    at /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js:204:22
    at IncomingMessage.<anonymous> (/opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js:107:29)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020.07.18 21:55:46 2: MyAlexa: starting alexa-fhem: /usr/bin/alexa-fhem -c ./alexa-fhem.cfg -a xx:xx -s
2020.07.18 22:20:00 2: E1Zoom - SMTPCredentials not set in RAM !
2020.07.18 22:21:57 2: E1Zoom - SMTPCredentials not set in RAM !


und noch das Logfile von heute:

2020.07.19 00:00:01 2: Deleting FBDECT_FB_08761_0201379-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_08761_0230141-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_08761_0234719-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_08761_0300306-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_08761_0316841-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_10971_0203216-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_10971_0220184-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_10971_0266416-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_11657_0093496-2020-07-11.log
2020.07.19 00:00:01 2: Deleting FBDECT_FB_grpCC9F1C_3B163D213-2020-07-11.log
2020.07.19 00:00:27 2: Deleting alexa-2020-07-12.log
2020.07.19 03:47:08 2: Deleting gassistant-2020-07-12.log
2020.07.19 04:55:55 1: RMDIR: ./restoreDir/save/2020-07-16
2020.07.19 13:59:55 1: PERL WARNING: Argument "-" isn't numeric in subtraction (-) at ./FHEM/98_statistics.pm line 661.
2020.07.19 15:59:55 1: PERL WARNING: Argument "-" isn't numeric in subtraction (-) at ./FHEM/98_statistics.pm line 662.
2020.07.19 16:59:55 1: PERL WARNING: Argument "-" isn't numeric in subtraction (-) at ./FHEM/98_statistics.pm line 663.
2020.07.19 17:41:27 1: define E_Heizung_Klima_WT WeekdayTimer: Usage: define <name> WeekdayTimer <device> <language> <switching times> <condition|command>
2020.07.19 17:59:38 1: PERL WARNING: Argument "00:00" isn't numeric in division (/) at ./FHEM/99_SUNRISE_EL.pm line 101.
2020.07.19 18:19:10 1: define E_Heizung_Klima_WT WeekdayTimer: Usage: define <name> WeekdayTimer <device> <language> <switching times> <condition|command>
2020.07.19 19:59:55 1: PERL WARNING: Argument "-" isn't numeric in subtraction (-) at ./FHEM/98_statistics.pm line 664.


FHEM schreibt also willkürlich in verschiendene Logfiles. Wer kann helfen?

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

viegener

Ich sehe es nicht so ganz willkürlich, sondern aus Deinen logs sind es wohl nur die Sonos-Einträge, die in einem anderen logfile landen. Ich könnte mir vorstellen, dass das damit zusammenhängt, dass Sonos in einem separaten Prozess läuft.
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können