All Things are gone after restarting openHAB

Thanks , i suspected that might been an issue since am running on really old hw rpi2 :slight_smile:

Q: why do the other parsers get added and parse the backlog, but not things ?

Is there any “hack” I can deploy in the interim to mitigate the issue ?

It’s because those parsers are added after the component has been activated, i.e. after this log statement:

FolderObserver has been activated

After it happens you can move the files temporarily to another folder and then move them back. That should retrigger the logic for adding the files.

I added the system info binding and the execute binding via gui. Then I added a rule, that moves all file from /etc/openhab/things to /tmp and move it back when system is up for 5minutes

I also use a raspberry pi. But a raspberry pi 4. So this ist still not a very fast hardware, but ways faster than rpi2 :smiley:

i get that, my query is that once the parsers are activated they clear “ignored paths” except for things. Why would things related paths remain unprocessed when others seem to work fine in the same scenario.

In above ignored paths was 32 before parsers got loaded. thereafter rules and scripts parsing ran leaving behind 7 for things.

Processing 32 ignored paths for 'script' extension
Processing 32 ignored paths for 'rules' extension
Finished processing ignored paths for 'rules' extension. 7 ignored paths remain

It’s because in the other cases the parser was added before it starts processing files during activation.

1 Like

Thanks. btw, when will the fix go in (appreciate there would be other with higher priority on the backlog) and how would I be able to apply it on my setup ?

Do you want me to open bug / issue ticket for tracking ?

We already have a few issues for this.

I just created a PR with a fix:

Now I need to test it. :slight_smile:

3 Likes

It still works fine for me but I still cannot reproduce that parsers are added by other threads.

To test the fix, update the bundle on the Karaf console using one of these commands and then restart openHAB.

OH 4.0.x

bundle:update org.openhab.core.model.core https://github.com/wborn/openhab-core/releases/download/folder-observer-20231020/org.openhab.core.model.core-4.0.4-SNAPSHOT.jar

Recent OH 4.1.0-SNAPSHOTs or OH 4.1.0.M2

bundle:update org.openhab.core.model.core https://github.com/wborn/openhab-core/releases/download/folder-observer-20231020/org.openhab.core.model.core-4.1.0-SNAPSHOT.jar

1 Like

Thanks - this seems to have solved the issue. Attaching log file after restart in case you want to review.
openhab.2.log (125.3 KB)

Query: I am not able to find the bundle using bundle:list | grep org. is that expected behaviour or is something awry ?

1 Like

:slight_smile: , am waiting for the rpi5 to be available.

Try using bundle:list -s | grep ... instead.

Thanks - that worked

188 x Active x  80 x 4.1.0.202310201909     x org.openhab.core.model.core

one related question - should all bundles be at 4.1.0 or can they be at different level / numbers. I have many at 1.xx , 2.xx, 3.xx as well?

It should use the same version for all the org.openhab bundles except for org.openhab.base-fixes.
The other bundles are third party dependencies which have their own versioning and release cycle.
If you use a SNAPSHOT build it is expected for the timestamp parts (202310211708 in 4.1.0.202310211708) to be different because the bundles are produced by different build jobs.

Issue resurfaced in a different way. The parser loads followed by the .thing files but they don’t get added to the model. Touching file causes them to be added, however non file based things remain un-initialised.

The bundle reverted to the org version
188 x Active x 80 x 4.1.0.M2 x org.openhab.core.model.core

thats strange since i havent run any updates on the system…