I have seen some postings that it is not possible to use multiple persistence services at the same time, for different items, yet the paper UI allows me to define multiple services, and under Configuration->System->Persistence it says “persistence service to use if no other is specified”, which makes me wonder if there may be a way (in 2.1?) to specify a different service for specific Items?
I would like to use rr4dj for most things since I don’t mind the data eventually falling off, but I have a few Items that I would like to keep their values indefinitely in my sqllite database.
You can use different persistence services at the same time. There is no restriction to do so. Sure you have to configure multiple *.persist files. There are perstence services that might not support all item types, e.g. rrd4j will not store Strings nor Switches but only Numbers and Values.
However, if using jdbc persistence, I’m not aware of any way to use different databases at the same time. But of course you could use additional persistence services like mysql persistence service to fill more than one sql database at the same time
Thanks I got it working. I created the jdbc.persistence file to go with my rrd4j.persist, and used service=“jdbc” in the sitemap to get Charts from sqlite and it works great. Will experiment with influx in the future, but I just happen to have a sqlitedb for other projects so wanted to test that first. Thanks again.
“Note that you can specify that a different persistence service be used with a particular extension. Do this by appending a String as an optional additional parameter at the end of the extension (e.g. “rrd4j” or “sense”)”
And there is the persistence extension,
“.persist - Persists the current State of the item”
So it seems that you could have the following as a persistence rule:
that would persist Lights in a rrd4j database, but I have not personally tested this. Perhaps someone else can comment.
Dude! That is totally what I was hoping would happen - clarification of the documentation. I am working on that part of the manual with Thom now and will fix it! (FWIW, was the Dude at the beginning a little over the top? After all, I am from the USA
Caution - Off Topic! @rlkoshak, one other quick question while I have you… If one wants to “escape” angle brackets so that they appear, what is the trick please? When I put something between a pair of angle brackets the brackets and the stuff in-between them disappears.