Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json addon (smarthome/j echo binding) not being reinstalled after openhab update #4111

Open
jimtng opened this issue Feb 23, 2024 · 6 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@jimtng
Copy link
Contributor

jimtng commented Feb 23, 2024

I have a Smarthome/j Amazon echo binding installed using Json 3rd Party Add-on Service. Each time I updated my snapshot build (in docker), this binding keeps disappearing from my openhab installation, and I'd have to re-install it manually.

Is this a bug, or by design? Shouldn't it be reinstalled automatically?

@jimtng jimtng added the bug An unexpected problem or unintended behavior of the Core label Feb 23, 2024
@rkoshak
Copy link

rkoshak commented Feb 23, 2024

Add-ons installed from the marketplace should be reinstalled automatically. However there are some potential cases where maybe it shouldn't.

If the "supported versions" (e.g. [4.0.0.0;4.9.9.9] for the forum based marketplace) of the add-on indicates it doesn't support that version of OH I think maybe it shouldn't be installed. But I don't know that there is any sort of warning right now that tells the end user that the add-on is not supported.

Is it better to install a binding that explicitly indicates it doesn't support that version of OH or to silently not reinstall it on an upgrade? Until we have a mechanism to report this version problem I don't know what the least bad idea should be?

I don't know if that's happening with this specific binding but whatever is done to address this issue needs to take this into account I think.

@jimtng
Copy link
Contributor Author

jimtng commented Feb 23, 2024

  • This is happening when I updated my snapshot build - same version 4.2.0-snapshot build #xxxx -> build #yyyy
  • Manual reinstallation works, so this is not caused by version constraints

@rkoshak
Copy link

rkoshak commented Feb 23, 2024

so this is not caused by version constraints

I wasn't trying to suggest it was. I just wanted to make sure that the version constraints are taken into consideration when this problem gets fixed.

@jimtng
Copy link
Contributor Author

jimtng commented Feb 23, 2024

I suspect, the issue might be caused by my mixing addons.cfg for installing openhab-distributed addons, vs using UI for installing the json based addon. Is there a file-based way of installing json-based addons?

@rkoshak
Copy link

rkoshak commented Feb 23, 2024

That could be. If marketplace add-ons get listed on the same line as the bindings then yes that definitely would be the problem. If they have their own line in addons.cfg then that shouldn't be the problem. Each line is handled independently. For example, you could use addons.cfg for bindings but do UIs and transformations through the UI. But if you use bindings in addons.cfg, you have to use addons.cfg for all bindings.

Is there a file-based way of installing json-based addons?

The answer is yes. The answer to the follow up question "how?" is I have no idea. I know I've seen an example somewhere but I can't find it. All I know is it should be possible.

Looking at my addons.config file I don't actually see marketplace bindings listed at all so I don't have an example in my config handy.

@jimtng
Copy link
Contributor Author

jimtng commented Feb 29, 2024

I haven't had a chance to look into this, but I got around the problem by moving the kar file from userdata/marketplace/**/ into the addons folder. Now the addon no longer disappears each time I update my snapshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

2 participants