I have migrate all rules files from OH2.5 ino inside of OH3 via Main UI.
Now I have the problem that some trigger are starts and I don’t know from which rule. For the diagnostic part I need a “simple” way to figure out which rule has fired an event. Otherwise I must write a log record in each rule to the begin and this isn’t really “state of the art” - I have 160 rules and the io rate will be grow up.
Second is there any possible to find a item over all rules ? if these are located in files I can use the search functionality of the editor. Actual I have no clue how.
Open $OH_USERDATA/etc/log4j2.xml and change the logging level for RuleStatusInfoEvent to INFO instead of ERROR. You can do this through the karaf console too.
Alternatively you can open the developer sidebar in MainUI (alt-shit-d) and watch the full event stream which includes events when rules run.
It’s still files, in particular $OH_USERDATA/jsondb/automation_rules.json.
Because it’s a JSON structure that is “pretty printed” for human consumption grep won’t work very well but you can open it in a viewer/editor of choice and search through that way. Note that there are other places an Item can appear including links, metadata, widgets, etc. Also, there are ways for a rule to interact with an Item without the name of the Item ever appearing in the rule.