Logeintrag für Bewegungsmelder

Begonnen von OliWee, 18 Mai 2016, 17:38:52

Vorheriges Thema - Nächstes Thema

OliWee

Hi!
ich möchte gerne, dass ins Logfile geschrieben wird, wenn mein Bewegungsmelder (HM-Sen-MDIR-O) auslöst.

Das hier:
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:.*
funktioniert prinzipiell, allerdings wird dann auch das jedem motion:on folgende motion:off auch mitgeloggt.

Folgendes habe ich schon probiert:
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:on
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:on.*

zweiteres hab ich probiert, weil im Reading immer drinsteht:
motion: on (to CUL_0)

Aber bei beiden Varianten wird überhaupt kein Logeintrag generiert.

Wie muss ich das denn richtig angeben, damit das richtig eingetragen wird?

Gruß
Oli

CoolTux

Schau mal im Eventlog was genau an kommt beim on
Eventuell so


./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:.on
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

OliWee

Zitat von: CoolTux am 18 Mai 2016, 17:46:47
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:.on
Ach, das Leerzeichen vor on...
Das wars! danke :)

Muss ich das eigentlich per RegExp ausmaskieren, oder geht das auch irgendwie anders?
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion: on
wirft einen Syntaxfehler, genau wie
./log/log_Eingang-%Y-%m.log UG.Eingang.MotionDetect:motion:\ on
auch...

justme1968

es gehen 'nur' regex. statt . würde auch \s gehen.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968