[SOLVED] Legacy OH1 Binding Causing all Bindings to be Uninstalled on OH Restart

I have not had time yet to migrate to using GPSTracker… so I need to continue using MQTTITUDE for the time being.

With MQTTITUDE having been moved to legacy status in the 2.4.0M4 milestone. According to what I read, to continue to use this OH1 binding, I had to add it to addons.cfg. . The problem is, when OH stops (as when VS Code causes if to “crash”), all of my bindings get uninstalled. I found this - Reinstall bindings after restart OH2. But in my situation, I’m not sure that the workaround of not using addons.cfg is possible - i.e., I have to specify mqttitude1 in addons.cfg so that I can install it; right?

Correct. It works for me and I don’t loose bindings after a restart

@Kai,

I did not find any reference to this bindings being uninstalled being an open issue. The workaround is from Dec. 2016. The latest mention of this issue is Feb. 2017. I’m happy to do so… if directed to where/how I do that.

I meant to mention, the workaround does not resolve my issue. I have to specify mqttitude1 in /addons.cfg. Having mqttitude as legacy does not declare it in userdata/etc/org.openhab.addons.cfg. In other words, I can’t remove it from my services configuration. I was able to operate without this issue up until the MQTTITUDE binding was moved to legacy status.

Mike

P.S. I understand that the ultimate resolution is to get rid of any OH1 bindings in my configuration. In my case, that is not yet possible, at least not immediately. As there is no OH2 binding for MQTTITUDE (since it’s based on the MQTT binding… which just now is getting an OH2 binding), I need to find a sufficiently wide time window where migrating to GPSTracker will allow me to get it properly stabilized (before we travel out of town). For others, they may have a different OH1 binding that they cannot replace. This uninstalling of ALL bindings seems to be something that ought to have a proper issue raised.

Could you post the content of your addons.cfg? Did you set legacy = true in it?

I’ve tried both with and without legacy = true

# The installation package of this openHAB instance
# Note: This is only regarded at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
# as otherwise your definition might be in conflict with what the installation package defines.
#
# Optional. If not set, the dashboard (https://<yourserver>:8080/) will ask you to choose a package.
#
# Valid options:
#   - minimal  : Installation only with dashboard, but no UIs or other add-ons. Use this for custom setups.
#   - simple   : Setup for using openHAB purely through UIs - you need to expect MANY constraints in functionality!
#   - standard : Default setup for normal users, best for textual setup
#   - expert   : Setup for expert users, especially for people migrating from openHAB 1.x
#   - demo     : A demo setup which includes UIs, a few bindings, config files etc.
#
# See https://www.openhab.org/docs/configuration/packages.html for a detailed explanation of these packages.
#
#package = minimal

# Access Remote Add-on Repository
# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons.
# This not only makes latest snapshots of add-ons available, it is also required for the installation of
# any legacy 1.x add-on. (default is true)
#
#remote = true

# Include legacy 1.x bindings. If set to true, it also allows the installation of 1.x bindings for which there is 
# already a 2.x version available (requires remote repo access, see above). (default is false)
#
legacy = true

# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave")
binding = mqttitude1

# A comma-separated list of UIs to install (e.g. "ui = basic,paper")
#ui = 

# A comma-separated list of persistence services to install (e.g. "persistence = rrd4j,jpa")
#persistence = 

# A comma-separated list of actions to install (e.g. "action = mail,pushover")
#action = 

# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
#transformation = 

# A comma-separated list of voice services to install (e.g. "voice = marytts,freetts")
#voice = 

# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab")
#misc = 

Is mqttitude1 the only binding that you are using? If not, you should list ALL bindings here. Or completely remove this line and use Paper UI to select the addons to install.

1 Like

@meingraham
Michael,

You either use the addons.cfg or the PaperUI. You can’t use both.
As soon as you have uncommented the binding line in the addons.cfg, OH will ONLY load these bindings.

I recommend that you list all your bindings in the addons.cfg, but that’s only a personal preference.
This way I can see at a glance the list of my installed bindings instead of scrolling through the paperUI.

OK. The magic combo:

legacy = true
#binding=

I read the doc as them going hand in hand. Without the legacy parameter the OwnTracks binding didn’t “show up” in PaperUI. When I added both parameters in addons.cfg… the binding was there and installed. Never made that association that had I just said legacy=true THEN I could have manually installed it with PaperUI because THAT would have made it show up.

So, #binding= leaves bindings installed and legacy=true allows me to see the OwnTracks binding… and use PaperUI to install it. Got it. And… my bindings aren’t being uninstalled on restart.

THANK YOU!

Mike

I just installed the Karaf webconsole for grins. While familiarizing myself with the interface, I entered “mqttitude” as a filter to the listing. I was surprised to find two active instances of the binding - version 1.13.0.201809300110 and 1.13.0.201810160911. Is this right? Is it OK to uninstall the older version?

Can you explain how you did that, please?

Edit /srv/openhab2-userdata/etc/org.ops4j.pax.url.mvn.cfg

At the end of the file, append:
, \
https://repo1.maven.org/maven2@id=maven.central.repo

to this line:

org.ops4j.pax.url.mvn.repositories= \https://dl.bintray.com/openhab/mvn/online-repo/2.1@id=openhab@snapshots

openhab-cli console
(Log in with openHAB Karaf credentials)

openhab> feature:install webconsole
openhab> logout

To use:
http://localhost:8080/system/console
(Log in with openHAB Karaf credentials)

1 Like

Any issue in having two versions of a binding active?