Okay I got a strange Issue. My Influx does not store any data.
If I look at the Karaf logs (I set org.openhab.influxdb to TRACE) I only get the log from startup
13:48:58.430 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘influx.persist’
Nothing more.
At this point I dont know what the problem could be.
I use
Item101 : strategy = everyChange, everyDay, restoreOnStartup
# The database URL, e.g. http://127.0.0.1:8086 or https://127.0.0.1:8084 .
# Defaults to: http://127.0.0.1:8086
url=http://127.0.0.1:8086
# The name of the database user, e.g. openhab.
# Defaults to: openhab
user=openhab
# The password of the database user.
password=YouSneekyLittle
# The name of the database, e.g. openhab.
# Defaults to: openhab
db=openhab_db
# The retention policy to be used, needs to configured in InfluxDB
# Till v0.13: 'default', since v1.0: 'autogen'
retentionPolicy=autogen
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
everyMinute:"0 * * * * ?"
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}
/*
* Each line in this section defines for which item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* item (excl. the group item itself).
*/
Items {
// persist all items once a day and on every change and restore them from the db at startup
g_INFLUX* : strategy = everyChange, everyDay, restoreOnStartup
Item101 : strategy = everyChange, everyDay, restoreOnStartup
}
take out all comments (stuff starting with // and/or /* + */) from /etc/openhab2/persistence/influxdb.persist
By the way use: influxdb.persist (not influx.persist)
edit the file with a linux editor (like vim) and make sure that there is no crap lying around in the contents of the file (strange characters or line feeds, etc)
Of course. I checked it with show measurements and show series
Connected to http://localhost:8086 version 1.3.3
InfluxDB shell version: 1.3.4
> use openhab_db
Using database openhab_db
> show series
key
---
sine_wave
> show measurements
name: measurements
name
----
sine_wave
did this installation work before and it broke recently or it’s a clean start?
I don’t see anything wrong with your setup…
that should be extremely light load for influxdb… I don’t expect problems from that.
On the other hand… I wouldn’t run influx on a Pi because of small RAM.
Here is my TRACE log from my influxdb persistence service (working fine):
29-Aug-2017 18:03:41.880 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - Tried to get item from item class class org.openhab.core.library.items.NumberItem, state is 64.8
29-Aug-2017 18:03:41.881 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - found fractional part
29-Aug-2017 18:03:41.881 [DEBUG] [tence.influxdb.internal.InfluxDBPersistenceService] - got DecimalType value 64.8
29-Aug-2017 18:03:41.882 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - storing mP6_01_01_P in influxdb value 64.8, mP6_01_01_P (Type=NumberItem, State=64.8)
29-Aug-2017 18:03:41.884 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - Tried to get item from item class class org.openhab.core.library.items.NumberItem, state is 234
29-Aug-2017 18:03:41.884 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - found no fractional part
29-Aug-2017 18:03:41.885 [DEBUG] [tence.influxdb.internal.InfluxDBPersistenceService] - got DecimalType value 234
29-Aug-2017 18:03:41.886 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - storing mP6_01_01_V in influxdb value 234, mP6_01_01_V (Type=NumberItem, State=234)
29-Aug-2017 18:03:41.887 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - Tried to get item from item class class org.openhab.core.library.items.NumberItem, state is 8.3
29-Aug-2017 18:03:41.887 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - found fractional part
29-Aug-2017 18:03:41.888 [DEBUG] [tence.influxdb.internal.InfluxDBPersistenceService] - got DecimalType value 8.3
29-Aug-2017 18:03:41.897 [TRACE] [tence.influxdb.internal.InfluxDBPersistenceService] - storing mP6_01_02_P in influxdb value 8.3, mP6_01_02_P (Type=NumberItem, State=8.3)
...(aloooot of entries)...
Hey guys, I’m also unsure what’s going on here. As it seems like the connection is established without issues, I’d suspect the persist file to be faulty, leading to no persistence. Try to recreate the file. Here is mine.