[Solved] Persistence with InfluxDB2 and OH-340 is persisting all Items

Dear all,

I just switched to OH-340 and am using InfluxDB (currently 2.5.1). I just noticed that Openhab seems to be randomly persisting states of all items and not only the ones I have configured:

// persistence strategies have a name and definition and are referred to in the “Items” section
Strategies {

everyFiveMin : “/5 * * * * ?"
everyTenMin : "
/10 * * * * ?”
everyFifteenMin: “*/15 * * * * ?”
everyHour : “0 * * * * ?”
everyDay : “55 23 * * * ?”

// if no strategy is specified for an Item entry below, the default strategy will be used
default = everyChange

}

Items {
// LWZ Items
WWISTTEMP, VORLAUFTEMP, RUECKLAUFTEMP, KOLLEKTORTEMPERATUR, HEISSGASTEMP, AUSSENTEMPERATUR, LWZ_Status_Verdichter, LWZ_Status_WW, LWZ_Status_Heizung, LWZ_Status_Heizkreispumpe, STUFETAG, STUFENACHT, PHEIZUNGTAG, PWWTAG: strategy = everyTenMin

// Netatmo Temperature Items
Netatmo_Indoor_Temperature, Netatmo_Outdoor_Temperature, Netatmo_Office_Temperature, Netatmo_Bathroom_Temperature, Netatmo_Bedroom_Temperature: strategy = everyTenMin

// Netatmo Humidity Items
Netatmo_Indoor_Humidity, Netatmo_Outdoor_Humidity, Netatmo_Office_Humidity, Netatmo_Bathroom_Humidity, Netatmo_Bedroom_Humidity: strategy = everyTenMin

// Netatmo CO2 Items
Netatmo_Indoor_CO2, Netatmo_Office_CO2, Netatmo_Bathroom_CO2, Netatmo_Bedroom_CO2: strategy = everyTenMin

// RCT Power Solar Current
PV_Input_A_Watt, PV_Input_B_Watt, PV_Inverter_Current_Power, PV_Battery_SOC, PV_Battery_Current_Power, PV_BatteryTemperature, PV_House_Current_Power, PV_Current_Grid_Feed: strategy = everyFiveMin

// RCT Power Solar Daily
PV_Daily_Input_A, PV_Daily_Input_B, PV_Daily_Grid_Feed, PV_Daily_Grid_Load, PV_Daily_House_Power: strategy = everyDay

}

One example query for a AVM FritzDect200 Power adapter which is not configured above to show how randomly data is written to InfluxDB.

Result: _result
Table: keys: [_start, _stop, _field, _measurement, item]
_start:time _stop:time _field:string _measurement:string item:string _time:time _value:float


1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-19T09:25:41.436000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-19T09:31:17.912000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:03:46.953000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:05:00.166000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:08:36.167000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:10:09.780000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:35:48.148000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T16:42:45.126000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T17:17:05.024000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-20T17:18:50.179000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T07:07:52.333000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T07:08:51.320000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T07:10:13.648000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T07:17:17.372000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T07:27:56.841000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T13:45:40.193000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-23T14:03:22.741000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-05-27T14:38:19.903000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-06-01T20:17:12.809000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-06-12T08:01:10.639000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-06-12T16:48:58.245000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-06-17T13:51:44.344000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-06-30T18:12:57.433000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-07-11T11:33:10.467000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-07-15T19:34:14.635000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-07-19T15:46:07.871000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-07-26T13:45:07.307000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-08-17T21:17:34.085000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-08-19T20:04:57.865000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:13:52.890000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:16:50.281000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:20:05.558000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:43:46.098000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:48:26.990000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T11:52:06.059000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T12:05:59.035000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T12:09:06.238000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-01T12:17:59.651000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-02T05:14:07.654000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-06T13:24:00.331000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-06T19:50:44.421000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-06T19:55:55.612000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-09T06:53:54.282000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-09T06:56:34.548000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-09-28T10:55:06.257000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-10-03T20:45:53.090000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-10-10T12:07:12.867000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-10-22T20:15:34.761000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-10-22T20:21:32.389000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-11-20T21:23:42.341000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-11-26T10:25:58.095000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-12-03T18:24:19.951000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-12-03T18:39:42.586000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-12-04T08:37:15.912000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-12-08T08:17:04.808000000Z 0
1970-01-01T08:00:00.000000000Z 2022-12-29T20:00:01.000000000Z value FritzDect200_Bad_Power FritzDect200_Bad_Power 2022-12-15T21:54:59.678000000Z 0

Does anyone have an idea what is going wrong? My InfluxDB has exceeded 14 GB in size so far :slight_smile: Will not manually delete all unwanted measures in InfluxDB (btw. if someone knows a nice tool to delete data from Influx, the CLI and FLUX as query language is something I have to get used to…

Thx
Jens

The most common cause of a .persist file being ignored is a misnamed file. Are you sure it’s named influxdb.persist? Lots of people run into trouble and name it influx.persist. If it’s misnamed, then the default strategy gets used which is to save everything on change with restoreOnStartup.

@rlkoshak oh very good hint, thank you. Maybe this happened already when I was reconfiguring from one release to another with some previous release changes…

Will mark this thread solved. Thank you as so many times already for your prompt support!

Happy New Year

  • Jens

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.