Can't get influxdb persistence working

Hi,

I can’t seem to get influxdb working with OH. I’ve followed the instructions at InfluxDB+Grafana persistence and graphing but no data is persisted, debug shows no activity nor is any data inserted to the db.

The binding loads ok and is “active”:
226 | Active | 80 | 1.11.0.201707271615 | openHAB InfluxDB Persistence bundle

2017-07-28 08:40:13.083 [DEBUG] [org.openhab.persistence.influxdb    ] - BundleEvent STARTING - org.openhab.persistence.influxdb
2017-07-28 08:40:13.083 [DEBUG] [.InfluxDBPersistenceServiceActivator] - InfluxDB persistence bundle has been started.
2017-07-28 08:40:13.085 [DEBUG] [org.openhab.persistence.influxdb    ] - BundleEvent STARTED - org.openhab.persistence.influxdb
2017-07-28 08:40:13.089 [DEBUG] [.internal.InfluxDBPersistenceService] - influxdb persistence service activated
2017-07-28 08:40:13.091 [DEBUG] [.internal.InfluxDBPersistenceService] - database status is OK, version is 1.3.1
2017-07-28 08:40:13.098 [DEBUG] [org.openhab.persistence.influxdb    ] - ServiceEvent REGISTERED - {org.openhab.core.persistence.PersistenceService, org.openhab.core.persistence.QueryablePersistenceService}={service.pid=org.openhab.influxdb, db=openhab_db, user=myuser, url=http://127.0.0.1:8086, password=mypassword, component.name=org.openhab.persistence.influxdb, retentionPolicy=autogen, component.id=243, service.id=1240, service.bundleid=226, service.scope=bundle} - org.openhab.persistence.influxdb

I can connect to the influx db via cli with the correct user/pw combo fine, the port 8086 service responds to connects but as previously stated OH doesn’t seem to try persisting any data on this service at all. Debug’ing shows nothing after the binding has been loaded…

I don’t know what to try next…? Any suggestion appreciated :neutral_face:


Here’s my files:

influxdb.persist

Strategies {
		everyMinute : "0 * * * * ?"
		everyHour : "0 0 * * * ?"
		everyDay : "0 0 0 * * ?"
}

Items {
		gPersistInfluxChange : strategy = everyChange,everyHour,everyDay
		gPersistInfluxTimed : strategy = everyMinute,everyHour,everyDay
		gPersistInfluxDaily : strategy = everyDay
}

Items

Group:Number gPersistInfluxChange
Group:Number gPersistInfluxTimed
Group:Number gPersistInfluxDaily

Number   TempSensor_Fe_Stue    			"Temperatur [%.2f C]"                       (Netatmo,gGraphSql,gPersistInfluxTimed,TempSensorInside) [ "iss:type:DevTemperature" ]  {netatmo="weather=12:34:56:78:91#Temperature"}

influxdb.cfg

url=http://127.0.0.1:8086
user=myuser
password=mypassword
db=openhab_db
retentionPolicy=autogen (I've tried with and without this option)

If you want to get the group members to be persisted, you have to use an asterisk:

gPersistInfluxChange* : strategy = everyChange,everyHour,everyDay

Without the *, the item itself will be persisted, but not the members. Keep in mind, if using the *, the group item itself won’t be persisted, so, if you want both group members and group item itself to be persisted, use two definitions in .persist file.

2 Likes

Ah, there it is! Thank you :smile: