Triggering rule based on openhab console/log

Hi,
Does anybody know how to trigger rule based on event or specific text occuring in OH console?
Is there any way to do this directly or the only way is to monitor openhab.log file by some script?

Why would you analyse the log file?
most of the stuff in there are captured from something that happens within OH2 (e.g. events)
you could use this event as a rule trigger

Do you mean you want to capture errors or warnings? I had a python script parsing log files and updating one string item through rest api. Then a rule to send that string with telegram to my phone. Found it somewhere in this forum. Tried to search it but no luck.

I also started to develop a log parsing bindig. Have to see if I have it somewhere saved.

Edit
Found the topic: Skript to read openhab logs

1 Like

I have specific issue with some cameras. Sometimes it happens that they freeze. When the problem occurs I get specific errors in the console. So I want to use it as a trigger for restarting camera connection or even camera itself. I have some other workaround however it’s more complicated and does not cover all situations.

Thanks for this, I will check it.