Adding entries to a logfile?

Begonnen von jacko, 28 September 2022, 14:01:55

Vorheriges Thema - Nächstes Thema

jacko

I have defined various filelogs to capture device events as they happen. However I would like to capture that status of some devices at the start of each day log.

Is there a generic way to add a log entry to match the device event entries?

So the logfile would look like this (with an initial daily entry and a later device event)
2022-09-28_00:00:01 DoorSensor off
...
2022-09-28_09:26:25 DoorSensor on


Thanks for any pointers.

rudolfkoenig

FileLogs are protocolling events.
One can generate arbitrary events with the trigger command.

Beta-User

Additionally - in case your request is wrt. to generation of "full" plots using SVG: You may have a look at logProxy (especially https://wiki.fhem.de/wiki/LogProxy#Erweitern_des_zu_plottenden_Bereichs_um_ausserhalb_liegende_Anfangs-_und_Endwerte)
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

jacko

The trigger cmd is exactly what I was looking for. And yes, it was in relation to an SVG graph so the pointer to the LogProxy command is appropriate, but I think I need some time to get my head around that.
Many thanks.