Determining the triggering item in the body of a rule - Dummy Persistence?

Hi!

I tried to implement Determining the triggering item in the body of a rule. For this to work I learned I need to have all items of a group persisted.

Now, what is the “most lightweight” method of persistence? Is there something like a “dummy persistence” configuration just to fulfill the requirements of sorting groups? Or a simple in memory solution w/o disk or network access?
I currently have a mysql as default persistence, but I don’t want to store all the triggering group items there :-/

Anybody knows why persistence is required at all for this to work?

Thanks

MapDB

No

No

Because OH doesn’t retain, maintain, and expose to the user in Rules the timestamp of when an event took place. It is only through persistence that this information is available.

There are ways to determine the triggering Item without using the lastUpdate hack in JSR223 rules.

Beyond that, unless you are willing to tackle implementing a PR to add such a persistence engine or change the Rules engine to make available which Item from the Group triggered the Rule these are your only options.

Thanks a lot. So my best approach for now is to use mapdb and have
/var/lib/openhab2/persistence/mapdb
on a ramdisk/tmpfs.

Anyhow, your detailed explanation made me think on upgrading to OH2.1 and give JSR223 a try.