Simple persistance tutorial for openhab2

Where do I find a simple openhab2 persistence tutorial? Trying now for hours and hours. I just want to add ANY persistance without hussle… All resource I found seem to be outdated…

  1. Tried to install PaperUI->MySQL Persistance (installed) - nothing happens, no configuration appears. ok.
  2. added config to /usr/share/openhab2/services/mysql.cfg -> “driver not found”.
  3. added the newest driver to /etc/openhab2/addons, restarted “driver not found”.
  4. deleted and added recommended driver: “driver not found”
  5. installed PaperUI->JDBC MySQL Persistence - yay a config appeared but “driver not found”
  6. installed Sqlite3 -> “driver not found”
  7. added sqlite driver to addons -> “Error while starting bundle: file:/usr/share/openhab2/addons/sqlite-jdbc-3.28.0.jar org.osgi.framework.BundleException: Could not resolve module: org.xerial.sqlite-jdbc”

Thanks for your help!

OH is flexible. A LOT depends on what you wish to accomplish with persistence.

Read the docs and search the forum for “persistence”
Note: written with an “e” not “a”. Guess that’s why you didn’t find anything useful.

2 Likes

That is why they teach “speling” in “skool”?

Please do not configure openHAB via /usr/share/openhab2/ but through /etc/openhab2/
Steps are:

  1. Install persistence -> openHAB will create mysql.cfg in /etc/openhab2/services/ immediately.
  2. Change configuration in /etc/openhab2/services/mysql.cfg
  3. Create a file /etc/openhab2/persistence/mysql.persist for configuration about which items to persist in which manner.

This is for a new openHAB setup, excluding the setup of MySQL itself.

1 Like