I’m having trouble visualizing my sensor data over time in OpenHAB, despite what appears to be persistence set up. I’d like to share my configuration to help identify the issue.
As per the documentation, persistence is configured in two ways: through a file named <persistenceservice>.persist in $OPENHAB_CONF/persistence, and from the UI (referencing Main UI docs). Since $OPENHAB_CONF/persistence is empty, I assume persistence is enabled from the UI.
However, I don’t see any persistence configuration applied to the individual items.
I have the following model tree:
For Main electric power, Secondary electric power, Room Temperature, and Target Temperature, there are no settings that reference persistence.
Despite this, clicking on these items always displays an empty graph. Where am I going wrong? What else should I provide to help troubleshoot this issue?
Thank you,
Zsolt
Platform information:
Hardware: Linux 5.19.0-42-generic 22.04.1-Ubuntu, x86_64, 16 GB RAM
Thank you, @Larsen! I set rrd4j as the default, and the graphs appeared! Does this mean that other persistence services, such as InfluxDB, do not work? This is disappointing, as I was unable to query it in other programs. I have not seen this mentioned in the documentation, but I have a few questions:
What happens if the same persistence settings are applied to multiple services? For example, if I set everyChange, restoreOnStartup, and everyMinute for rrd4j, and everyChange and restoreOnStartup for InfluxDB, which service will save data on everyChange? Additionally, I noticed that there is no everyMinute strategy for InfluxDB. Why is that?
How can I determine if the database connection is functioning properly? There is no “Test Connection” option available. I am asking because I have entered some credentials in my InfluxDB settings, but I am unsure if they are current or outdated. On the server host, I can access the database REPL without a username or password by simply entering influx. However, OpenHab requires non-empty database credentials.
It would also be beneficial to document some additional features. I have noticed that when an item is clicked, the displayed graph is not dynamic; it does not update automatically as time passes or when events occur, unlike how it can be configured in Grafana.
Furthermore, there is a “Save” button in the top right corner of the page. What is its purpose?
Lastly, there are controls at the bottom that allow you to set various features, such as displaying multiple item plots on the same diagram. This is incredibly useful, but I am unsure how to save these settings. When I leave the diagram, those settings (including the time interval) are lost.
I have enough questions for now. Thank you for your assistance!
I’m not the master of persistence (I only use rrd4j and mapdb) so I don’t have all the answers. Here my part:
Alle persistence services work, but only rrd4j is displayed when you click on “Analyze” under items. Usually you create pages with graphs where you can use other persistence services
If an item has more than one persistence service (that’s very common) then each of them works independently according to the given strategy. E.g. everyChange works in both services.
I also don’t know much about persistence, but I read this part of the documentation as if other services, which can store time series, should also work, not just rrd4j:
You should configure a default persistence service even if you have only one persistence add-on installed. The default persistence service is used to provide data for the UI charting features and rules
And, yes, for charts I can only set another than the default persistence service once I saved the chart as a page and activate the advanced settings of a data series.