Openhab2, InfluxDB no longer working

(Jimbob) #1

I’m picking up the migration from OH1 to OH2…

I have persistence of a number of (mainly) weather and lighting (levels) stored in influxdb working fine with OH1. With OH2, it’s not writing data; and I’m unsure whether it can read.



// Configuration file for "influxdb" persistence module
Strategies {
    everyMinute : "0 * * * * ?"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"
    default = everyChange

Items {
    //gSchedules*, gEnvironment*	:	strategy = everyMinute, restoreOnStartup
    gMotion*		:	strategy = everyChange, restoreOnStartup
    //gSettings*		:	strategy = everyChange, restoreOnStartup
    gStats*			:	strategy = everyChange, restoreOnStartup
    gLights*		:	strategy = everyChange, restoreOnStartup
    //gSqueezebox*	:	strategy = everyMinute, restoreOnStartup
    //gRadiator*		:	strategy = everyMinute, restoreOnStartup
    gWeather*		:	strategy = everyMinute, restoreOnStartup
    * : strategy = everyChange, restoreOnStartup

I’ve got logging set to DEBUG through the Karaf console:

log:set DEBUG org.openhab.persistence.influxdb

The only log entries I get are:

22:56:46.721 [DEBUG] [.internal.InfluxDBPersistenceService] - got a query
22:56:46.722 [DEBUG] [.internal.InfluxDBPersistenceService] - query string: select value from Weather_Temperature where  time > 1478217600s  limit 21474836472

Logging into the influxdb admin console shows no data being stored since I stopped OH1 earlier this evening.

Any pointers please?


( ) #2

The first obvious (possible) cause for the problem i can see is that you are still using influxdb08. Did you consider upgrading or did you by any chance select the wrong binding?

(Jimbob) #3


I hadn’t considered either; wrong binding or upgrade…

So, A quick check and yes, i was using the default binding, and not the 08 version, now installed, set as default… I’ll see if it works properly in the morning

As for upgrading, I’m using an RPi3, and from what I recall from installing 08, it wasn’t a straight forward apt-get install , so have stayed away for the time being…I’ll get ym current OH1 setup working with the OH2 core before I tackle that - I don’t want to break too many things :slight_smile:

Thanks for you help

(Paul Dix) #4

We have ARM binaries for the current versions of InfluxDB (1.0 and 1.1-rc1) so it should be much more straight forward than the 0.8 install. However, there isn’t a clean migration path because the API changed significantly. FWIW, 1.x is much more powerful and stable than 0.8.

(Jimbob) #5

Thanks Paul, I saw that binaries were now available for ARM.

I’ve been battling in vain for many hours trying to get the upgraded OH2 to work, once that’s done and I’ve gone through the migration challenge, I’ll take another look.


( ) #6

Hey Paul, who is “we”? Are you with InfluxDB?
Installing the binaries from the official repo is actually what I am recommending in the InfluxDB+Grafana persistence and graphing tutorial at:

This is also part of the pre-configured raspbian image openHABian. This might be the easiest option for you @james_2_roberts

(Paul Dix) #7

Sorry, should have mentioned that I’m with Influx. Yes, installing from the official repo is the best way to go.

( ) #8

Hey nice, welcome :smile:
Feel free to leave feedback over in the InfluxDB+Grafana+openHAB Tutorial thread. You can probably add a few nice recommendations.
Out of my mind one thing constantly asked about is Retention Policies. My answer normally is “don’t care, it’s a few megabytes per year” but an answer with real arguments and experience would be amazing.Thanks :wink: