Binding installed and uninstalled in the same time (aka Schrodinger cat)

openhabian installed in the last few weeks. Settings migrated from another installation (that could be the source of the problem, I developed code changes to denonmarantz)
The console looks OK:

openhab> la -s | grep -i denon
246 │ Active   │  80 │ 4.1.0                  │ org.openhab.binding.denonmarantz

But it’s installed and uninstalled in the same time.


How to fix it? Where is the info stored?

I’m OK with ant type of fix, down to manual mods of databases using SQL, if needed.

If you have a jar add-on inside the add-ons folder, you’ll see two entries in the add-on Store. One for the stock add-on, the other one for the jar.

Thanks for the hint! Can you tell is this is OK?

openhabian@openhabian:/ $ sudo find -name "*jar" | grep denon
[sudo] password for openhabian: 
./srv/openhab-userdata/tmp/kar/openhab-addons-4.1.0/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.0/org.openhab.binding.denonmarantz-4.1.0.jar
./srv/openhab-userdata/tmp/kar/openhab-addons-4.1.1/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.1/org.openhab.binding.denonmarantz-4.1.1.jar
./var/lib/openhab/tmp/kar/openhab-addons-4.1.0/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.0/org.openhab.binding.denonmarantz-4.1.0.jar
./var/lib/openhab/tmp/kar/openhab-addons-4.1.1/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.1/org.openhab.binding.denonmarantz-4.1.1.jar

It doesn’t look like a duplicate. It was fresh install of openhabian + migration of settings using backup/restore method. I didn’t copy the jar files manually.

I would delete the older addon files.

Things in userdata (and tmp/cache?) got backed up / restored. You need to do the clean up accordingly.

Clear your cache + tmp (while openhab is shut down)

1 Like

I removed the old ones, no change. Now going for cache/tmp.

openhabian@openhabian:/ $ sudo find -name "*jar" | grep denon
./srv/openhab-userdata/tmp/kar/openhab-addons-4.1.1/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.1/org.openhab.binding.denonmarantz-4.1.1.jar
./var/lib/openhab/tmp/kar/openhab-addons-4.1.1/org/openhab/addons/bundles/org.openhab.binding.denonmarantz/4.1.1/org.openhab.binding.denonmarantz-4.1.1.jar


They are both 4.1.1 in the GUI

Thank you! That worked. The details for future users (OH ver 4.1.1):

  1. Log in to the openhab server
  2. Stop openhab with systemctl stop openhab
  3. Check that it’s really stopped with systemctl status openhab
  4. Go to /var/lib/openhab/cache
  5. Wipe the content out with e.g. rm *
  6. Go to /var/lib/openhab/tmp
  7. Wipe the content out
  8. Start openhab with systemctl start openhab

Reference topic: Clean cache and tmp from UI

If you are using an installed OH (not Docker, not manual install) use sudo openhab-cli clean-cache.

2 Likes