Item, rules and sitemaps are missing from openHAB, although still in the folder

I am running openHAB 3 on my Pi (openHAB 3.1.1).
From my previous openHAB 2 installation I have a sitemap and many items and rules. All text based.

Ps: Before this, my system was running smooth with the existing files.

Problem: all my rules, items and sitemaps are gone in openhab, although they are still in etc/openhab2

How did the error occur?

1.I decided to change my heating rules (due to obvious reasons) and had wanted to use Visual Studio. But had to reinstall it on my new PC

  1. I saw that I have an old folder with openhab and a new folder openhab2. I made a backup (copied folder to my hard disk) and deleted openhab, since the active rules and sitemap was in openhab2.

  2. Rules, sitemap, items are gone, although in the folder.

This did not help to solve the problem

  • Restoring the old folders

  • Restarting openHAB

Any ideas how I can get my rules, items and sitemap back?

Thanks so much for your help.

  • What are the permissions on your directories? Can openhab access them?
  • It looks like you switched to openhab3. I think openhab3 stores its stuff in openhab not openhab2
1 Like

the upgrade was > 2 years ago and openhab3 was running smoothly since than. Just today it crashed. openhab can access the folders. no permissions where changed.
2022-11-12 12_13_52-pi@raspberrypi_ _etc

You write that you deleted openhab. What happens if you rename openhab2 to openhab?

a new empty folder openhab2 is instantly created

From ther log
2022-11-12 10:55:22.807 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘things’ does not exist in ‘/etc/openhab’. Please check your configuration settings!
2022-11-12 10:55:22.816 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘scripts’ does not exist in ‘/etc/openhab’. Please check your configuration settings!
2022-11-12 10:55:22.822 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘items’ does not exist in ‘/etc/openhab’. Please check your configuration settings!
2022-11-12 10:55:22.828 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘persistence’ does not exist in ‘/etc/openhab’. Please check your configuration settings!
2022-11-12 10:55:22.834 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘sitemaps’ does not exist in ‘/etc/openhab’. Please check your configuration settings!
2022-11-12 10:55:22.840 [WARN ] [ab.core.service.AbstractWatchService] - Directory ‘rules’ does not exist in ‘/etc/openhab’. Please check your configuration settings!

This confirms that openhab is looking for files in /etc/openhab, not openhab2. Try to stop openhab. Rename /etc/openhab2 to /etc/openhab then start openhab again

okay. stoping opnehab, deleting the opnehab, renaming openhab2 to openhab and restarting it, did the trick. although it instantly created an empty openhab2 folder again. Now visual studio list connection to all things. but this is a different problem.

I would guess VSC is looking for openhab2 …