Hi everyone,
I recently migrated from OpenHAB 2 to version 3 and encountered an issue with MQTT item persistence. While most functionalities have transitioned smoothly, I noticed that items received from my MQTT broker are no longer being persisted using the JDBC/MariaDB setup. This is concerning as it affects my ability to track historical data effectively.
To provide some context, I’ve been using MQTT for integrating various sensors into my smart home setup. In OpenHAB 2, I had configured the JDBC persistence service with MariaDB, and it worked flawlessly. However, after the migration, while SystemInfo binding items are still being persisted, MQTT items are not.
I’ve reviewed the configuration files, including jdbc.cfg
and jdbc.persist
, and they seem correctly set up. The persistence strategies are defined, and the items are listed with the everyChange
strategy. The logs indicate that items are being updated, but they’re not making it into the database. Here’s a snippet from my logs:
20:11:58.834 [INFO ] [openhab.event.ChannelTriggeredEvent ] - mqtt:topic:mosquitto:T02_DS18x20:I02_DS18x20_2887EE1005000004_T triggered 28.937504
20:11:58.837 [DEBUG] [ntime.internal.engine.DSLScriptEngine] - Script uses context ‘mqtt-4’.
…
20:12:03.866 [DEBUG] [enhab.persistence.jdbc.db.JdbcBaseDAO] - JDBC::storeItemValueProvider: newVal.doubleValue: ‘52.1’
Despite these updates, the MQTT items aren’t being stored. I’ve tried searching the community and documentation but haven’t found a clear solution yet. I’m wondering if there’s an additional configuration step required for MQTT in OpenHAB 3 or if this might be a bug in the persistence module.
If anyone has encountered a similar issue or has advice on how to resolve this, I’d greatly appreciate your insights. Let’s keep the conversation positive and collaborative!
Best regards,
[Your Name]