Persistence: defining items in .persist file

Hi there,

I’ve configured persistence with mysql this weekend. Like in this example


I’d like to save the “set temperature” for my valves & wall thermostats every hour.

my test environement:

Names of the item / thing
homematic_HMIP_WTH_6339e38e_000313C98CC36E_1_SET_POINT_TEMPERATURE (mysql table & opehab log)
homematic:HMIP-WTH:6339e38e:000313C98CC36E:1#SET_POINT_TEMPERATURE (Paper UI)
Wandthermostat Wohnzimmer (“Thing” name)

mysql.persist

Strategies {
everyHour : "0 0 * * * ?"
everyDay  : "0 0 0 * * ?"
everyMinute : "0 * * * * ?"
default = everyChange
}

Items {
    * : strategy = everyChange, restoreOnStartup
    xxx : strategy = everyMinute
}

for xxx I already tried:
Wandthermostat*
homematic*
HMIP*
HMIP
*

“*” works fine - it logs the current value for all Items. The others won’t.

Do you have an idea what’s wrong?

Br
Stefan

First of all, persistence only works with Items, not Things. Things are not equal to Items. Things represent a physical/logical external device. A Thing has one or more Channels which describe that Thing’s commands. An Item is linked to a Thing via one of these Channels.

Rules, persistence, and Sitemaps only operate on Items, not Things.

Wandthermostat* in a .persist file means "apply the following strategy to all members of the Wandthermostat Group`. * in this context is not a wild card.

You must either list each Item individually in place of “xxx” (separated by commas) or you must create a Group and make all of your Items that should be saved by that DB and that strategy be members of the Group. Then use the “*” with the Group name.

Group gSetTemps
Number Valve1 "label" <icon> (gSetTemps) { channel="yada yada yada" }
Number Vavle2 "label" <icon> (gSetTemps) { channel="yada yada yada" }
...

gSetTemps* : strategy = everyHour

3 Likes

How do you create a group within the UI?

Go to Settings → Iems. Click the + icon and select “Create Item”. Choose Group as the “Type”