Persistence: Item is being persisted more frequently than expected

Hi everyone,

I have a question about the behavior of my persistence configuration.
I defined the following item:

Group:Color Group_GF_Bedroom_ColorLight "Bedroom Color Change" <colorpicker> 
  (Group_GF_Bedroom, Group_House_NotPersistedEveryHour, Group_House_NotPersistedEveryChange, Group_House_NotPersistedEveryFiveMinute)

My item looks like

Color Color_GF_Bedroom_ExtendedLight1 "Color_GF_Bedroom_ExtendedLight1"
  (Group_GF_Bedroom_CeilingLampBulbOne, Group_GF_Bedroom_ColorLight, Group_House_NotPersistedEveryHour, Group_House_NotPersistedEveryChange, Group_House_NotPersistedEveryFiveMinute) ["Control","Light"] {
    channel="mqtt:topic:zigbee:colorBulb5AD92A"
}

My group structure looks like this (shortened):

Group Group_GF_Bedroom "Bedroom" <bedroom>
  (Group_GroundFloor, Group_House_NotPersistedEveryHour, Group_House_NotPersistedEveryChange, Group_House_NotPersistedEveryFiveMinute) ["Bedroom"]

Group Group_GroundFloor "Ground Floor" <groundfloor>
  (Group_House, Group_House_NotPersistedEveryHour, Group_House_NotPersistedEveryChange, Group_House_NotPersistedEveryFiveMinute) ["FirstFloor"]

Group Group_House "Whole Apartment" <group>
  (Group_House_NotPersistedEveryChange, Group_House_NotPersistedEveryFiveMinute, Group_House_NotPersistedEveryHour) ["House"]

And my persistence configuration is:

items {
    * : strategy = everyDay, restoreOnStartup
    *, !Group_House_NotPersistedEveryChange* : strategy = everyChange
    *, !Group_House_NotPersistedEveryFiveMinute* : strategy = every5Minute
    *, !Group_House_NotPersistedEveryHour* : strategy = everyHour
}

Strategies {
   everyMinute  : "0 * * * * ?"
   every5Minute : "0 */5 * * * ?"
   everyHour    : "0 0 * * * ?"
   everyDay     : "0 0 0 * * ?"
}

However, the item Group_GF_Bedroom_ColorLight is being persisted at intervals shorter than 5 minutes, even though it belongs to
Group_House_NotPersistedEveryChange,
Group_House_NotPersistedEveryFiveMinute, and
Group_House_NotPersistedEveryHour.

I expected it to be excluded from those strategies.

Can someone explain why this item is still being persisted so frequently, or what would be the correct way to exclude it from persistence?

Hi @milo i believe the order is important, the first item that matches is the one that is used, so if you change the order (i go to the code tab and cut/paste where needed and have the default last.)

I can’t follow you @BrettLHolmes

If you are saying that the item is part of this group as well the because this persistence definition is before the 5 minute definition it will use

I missed the ! When looking at your persistence, so i do not think what i said applies.

@BrettLHolmes I understood it’s additive the persistence definition but I use the exclude operant therefore I thought it’s not part of this… basically I excluded it from every persistence definition besides the first

What persistence service are you using? If you have several installed they each need their own configuration.

I have only one installed and I am using MySQL via jdbc and my file is called jdbc.persist