[SOLVED] Problems with InfluxDB persistence (Grafana link)

Hi,

My name is Josep and I’m doing a school research project on home automation.
I’m trying to link openHAB to InfluxDB in order to link it later to Grafana graphs. I’m running the latest Raspbian version on a Raspberry Pi 3 B+.

I’ve installed Influx DB by the Add-ons persistence section on PaperUI. Then I can find the files influxdb.cfg and influxdb.persist and configured properly:

influxdb.cfg

url=http://192.168.1.220:8086
user=openhab
password=openhab
db=openhab_db
retentionPolicy=autogen
# 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(s)://<host>:<port>

# The name of the database user, e.g. openhab.
# Defaults to: openhab
# user=<user>

# The password of the database user.
# password=

# The name of the database, e.g. openhab.
# Defaults to: openhab
# db=<database>

influxdb.persist

Strategies
{
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
}
Items
{
gTemperature* : strategy = everyMinute
gHumidity* : strategy = everyMinute
gLuminosity* : strategy = everyMinute
Luminosity : strategy = everyMinute
Temperature : strategy = everyMinute
Humidity : strategy = everyMinute
}

Added on influxdb.conf on…

http endpoint…

enabled = true

bind adress http service

bind-address = ":8086"

http authentication

auth-enabled = true

And when I add the data source on Grafana I don’t found any point on the graphs.

If I go to openHAB system configuration
InfluxDB is the default persistence service.

I have some questions:

  1. But I would like InfluxDB and RRD4J to work simultaneously, is it ok?
  2. I would like to know where can I find a log or the database to see if openHAB is saving there the data.
  3. How do I have to config the graph on Grafana, I think I’m not doing well. (The data source is config properly because the test is OK).

Thank you very much,

Josep

Disclaimer: I am not using either, but here some pointers.
Did you need to do it all by yourself or can you use OpenHABian. The configurations are not super difficult but can be a little tricky and OpenHABian is doing it all for you, right out of the box:

You can do that, but you will then need to ensure that you pull the right persistence service. You probably have your reasons, but at first glance it seems simply to be a duplication, as you can have influxDB persist everything that rrd4j would be able to persist.

Did you search the forum? there are quite a few threads on this, e.g., InfluxDB+Grafana persistence and graphing (watch out, this is a really long thread)

You may want to look into setting the log-levels to a lower level for OH2 to be more verbose: https://www.openhab.org/docs/administration/logging.html

Good morning and thank you very much for your response.

I still don’t understand if the unique persistence system that’s activated is the default set on the openHAB system config or that all the persistence systems that are installed and configurated are activated.

The thing would be the system to activate more than one system.

Then, I have entered to the log folder, seeing the link you have attatched me and on InfluxDB folder, there’s nothing. No log.

On the openHAB log folder, yes, there are some log files which not include any InfluxDB log.

I’m so sorry if my issue is really beginner.

Thank you very much for the helping,

Josep

All persistence service work at the same time
I use InfluxDB, rddj4 and mapDB
They all have their advantages
InfluxDB for pretty graphing
Rdd4j for fast graphing in sitemaps
mapdb for restoreonstartup

I followed: InfluxDB+Grafana persistence and graphing
to the letter to install Influx with OH and I have no issues

I suggest you remove your current influx instance
Remove the persistence service inOH
Restart your machine
Clear the openHAB cache
Start OH

Follow the link…

Hi, thanks, will do :slight_smile:

A last question, if when I terminal SHOW MEASUREMENTS on my db and nothing is show, that means openHAB isn’t sending the data, right?

Thanks,
Josep

All solved reinstalling, thank you very much,

Josep