Hallo ich will zur anzeige in SVG ein Bestimmter Ereignis in die Log Schreiben.
Nur present
Momentan hebe ich es so:
define Toni_Bluetooth_Handy PRESENCE local-bluetooth 54:xx:73:90:xx:FD 60 300
attr Toni_Bluetooth_Handy Andreas Anwesenheit
define FileLog_Toni_Bluetooth_Handy FileLog ./log/Toni_Bluetooth_Handy-%Y.log Toni_Bluetooth_Handy
attr FileLog_Toni_Bluetooth_Handy logtype text
attr FileLog_Toni_Bluetooth_Handy room Schalter_Taster
Ergebnis:
2015-11-24_07:47:31 Toni_Bluetooth_Handy presence: absent
2015-11-24_07:48:36 Toni_Bluetooth_Handy absent
2015-11-24_07:48:36 Toni_Bluetooth_Handy presence: absent
2015-11-24_07:49:39 Toni_Bluetooth_Handy present
2015-11-24_07:49:39 Toni_Bluetooth_Handy presence: present
2015-11-24_07:49:39 Toni_Bluetooth_Handy device_name: Acer Z520
2015-11-24_07:55:24 Toni_Bluetooth_Handy present
2015-11-24_07:55:24 Toni_Bluetooth_Handy presence: present
2015-11-24_07:55:24 Toni_Bluetooth_Handy device_name: Acer Z520
2015-11-24_08:00:41 Toni_Bluetooth_Handy present
wie muss ich LileLog ändern damit nur ,,present" in die LOG geschrieben wird ?
Grüße Andreas
Der einfache Weg und wenn presence auch kein Event erzeugen soll: Schau dir die Attribute event-on-change-reading und Co. an.
die Events, brauche ich für andere Sachen :-(
Dann musst du den Regex in deiner Filelog Definition anpassen. Beispiele dafür gibt es in der commandref zu FileLog.
Ich weiss, dass das ein alter Thread ist, aber falls jemand diesen über die Suche findet:
Die Lösung müsste so ausschauen:
define FileLog_Toni_Bluetooth_Handy FileLog ./log/Toni_Bluetooth_Handy-%Y.log Toni_Bluetooth_Handy:(absent|present)
Ich hatte das gleiche Problem und da funktioniert es so.