I’ve been trying to get this working all day, and feel like i’m hammering myself against a brick wall!
I’ve set up influxdb and grafana on an internet-facing server, behind an nginx proxy, and am able to access and query them both. I’ve manually inserted test data into the influxdb and graphed it in grafana so i’m fairly happy with that side. The problem i’m having is that openhab refuses to put any data into the influxdb.
My setup:
- Openhab 2.0 release
- Influxdb binding 1.9.0
- Influxdb 1.2.0
- I’ve set my default persistence to influxdb.
My configs are as follows:
###services/influxdb.cfg
url=https://iot.thinkl33t.co.uk/influx/
user=backend
password=<password here>
db=iot
retentionPolicy=autogen
###items/sensors.items
Number lounge_temp "Temperature [%.2f C]" <temperature> (gSensors,gLounge) {mqtt="<[mosquitto:homie/sc-lounge/sc/temperature:state:default]"}
Number lounge_humi "Humidity: [%.2f]%" <humidity> (gSensors,gLounge) {mqtt="<[mosquitto:homie/sc-lounge/sc/humidity:state:default]"}
Number lounge_light "Light [%d]" <light> (gSensors,gLounge) {mqtt="<[mosquitto:homie/sc-lounge/sc/light:state:default]"}
Number lounge_noise "Noise: [%d]" <noise> (gSensors,gLounge) {mqtt="<[mosquitto:homie/sc-lounge/sc/noise:state:default]"}
Number lounge_dusty "Air Quality: [%d]" <smoke> (gSensors,gLounge) {mqtt="<[mosquitto:homie/sc-lounge/sc/dusty:state:default]"}
###persistence/influxdb.persist
Strategies {
everyHour : "0 0 * * * ?"
everyMinute : "0 * * * * ?"
default: everyMinute
}
Items {
gSensors* : strategy = everyChange, everyMinute
}
I’ve tried replacing gSensors*
with ‘*’ and lounge_temp
but that diddnt help.
When i change the persistence file, i get the following in my openhab.log:
17:15:03.823 [DEBUG] [org.openhab.persistence.influxdb ] - BundleEvent STARTED - org.openhab.persistence.influxdb
17:15:03.856 [DEBUG] [.internal.InfluxDBPersistenceService] - influxdb persistence service activated
17:15:04.894 [DEBUG] [.internal.InfluxDBPersistenceService] - database status is OK, version is 1.2.0
17:15:05.019 [DEBUG] [org.openhab.persistence.influxdb ] - ServiceEvent REGISTERED - {org.openhab.core.persistence.PersistenceService, org.openhab.core.persistence.QueryablePersistenceService}={service.pid=org.openhab.influxdb, db=iot, user=backend, url=https://iot.thinkl33t.co.uk/influx, password=<passwordhere>, component.name=org.openhab.persistence.influxdb, retentionPolicy=autogen, component.id=207, service.id=352, service.bundleid=209, service.scope=bundle} - org.openhab.persistence.influxdb
You can see from the log that the influx version is correct, and in my influxdb log i get:
Jan 29 17:15:04 iot influxd[1276]: [httpd] 82.69.23.89,192.168.122.6 - - [29/Jan/2017:17:15:04 +0000] "GET /ping HTTP/1.1" 204 0 "-" "okhttp/2.4.0" 79df22be-e646-11e6-8057-0000
When this happens. The item values are constantly updating and are viewable in my openhab dashboard, but the persistance job never seems to be firing off.
If anyone has any ideas how i can debug this or get it working, i’d be very grateful!