Hello everyone, I wanted to share my recent experience with setting up persistence in OpenHAB 3.4.0 using InfluxDB2. It was quite a journey, but I managed to figure it out, and I thought it might be helpful to others facing similar challenges.
Initially, I noticed that all my items were being persisted, regardless of my configuration. This was puzzling because I had explicitly set persistence strategies for specific items. After some research and trial and error, I discovered that the issue stemmed from how the persistence strategies were defined in my persistence.xml file.
I realized that the default strategy was set to everyChange, which was causing all items to be persisted. To resolve this, I adjusted my configuration to ensure that only the items I wanted were being persisted. Here’s a snippet of my corrected configuration:
xml
*/10 * * * * ?
By explicitly defining which items should use which strategies, I was able to prevent unintended persistence. This adjustment not only reduced the size of my InfluxDB but also made my data more manageable.
I also found that using the InfluxDB UI to query and visualize the data was incredibly helpful. It allowed me to see exactly which items were being persisted and helped me troubleshoot any remaining issues.
If anyone else is struggling with persistence settings, I highly recommend double-checking your persistence.xml file and ensuring that your strategies are correctly applied to the desired items. Happy automating! ![]()