Hi everyone, I recently upgraded my OpenHAB installation from version 2 to 3.0.0 and encountered some issues with InfluxDB persistence. I wanted to share my experience and how I resolved them in case others are facing similar problems.
After the upgrade, I noticed that some of my rules were failing with error messages related to query parsing. Specifically, the error mentioned that the retention policy name ‘2year’ was causing issues. This was puzzling because everything worked fine in OpenHAB 2.
Upon closer inspection, I realized that the way InfluxDB handles retention policies had changed slightly in OpenHAB 3.0.0. The error occurred when the system tried to execute a query using the retention policy name directly in the SELECT statement, which InfluxDB doesn’t support in the same way anymore.
To fix this, I had to modify how I referenced the retention policy in my queries. Instead of including the retention policy name in the query, I adjusted the configuration to ensure that the data was stored correctly without relying on the retention policy name in the query itself. This involved updating my persistence configuration files and ensuring that all relevant data points were correctly mapped.
After making these changes, the errors stopped, and my rules began functioning as expected again. It was a bit of a learning curve, but it taught me more about how InfluxDB interacts with OpenHAB, especially after an upgrade.
I hope this helps anyone else who might be encountering similar issues. If you have any questions or need further clarification, feel free to ask! Happy automating! ![]()