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

[marketplace] Issue installing UniFiProtect addon from marketplace in openHAB 4 #3800

Open
seaside1 opened this issue Sep 18, 2023 · 12 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@seaside1
Copy link

seaside1 commented Sep 18, 2023

Expected Behavior

Thing types should be available when adding things under the marketplace installed binding of UniFiProtect in OH4

Current Behavior

Thing types are not available

Possible Solution

N/A

Steps to Reproduce (for Bugs)

  1. Installing the addon using Community Marketplace,
  2. Adminstration->Settings->Things click +
  3. Select UnifiProtect binding
    Screenshot from 2023-09-17 21-16-28

You then an error message:
No thing types can be added with this binding.

Screenshot from 2023-09-18 07-50-05

Installing the same binding by dropping it in the openhab addons folder
You don't get that error message. It is working as expected.

Link to jar:
https://github.com/seaside1/unifiprotect/releases/latest/download/org.openhab.binding.unifiprotect-4.x.x-latest.jar

Marketplace post:
https://community.openhab.org/t/unifi-protect-binding-cloudkey-gen2-dream-machine-pro-nvr/107692/1

Thing-types.xml
https://github.com/seaside1/unifiprotect/blob/main/src/main/resources/OH-INF/thing/thing-types.xml

Context

Addon is not available to those using marketplace since it requires manual installation

Your Environment

openHAB 4.1.0
Build #3620

@seaside1 seaside1 added the bug An unexpected problem or unintended behavior of the Core label Sep 18, 2023
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/unifi-protect-binding-cloudkey-gen2-dream-machine-pro-nvr/107692/308

@ThaDaVos
Copy link

I've noticed this issue with multiple addons - so there's probably a bigger problem at hand here

@florian-h05
Copy link
Contributor

I think this is a problem with the naming of the JAR, I think there was an issue or PR related to that by @J-N-K, but I currently cannot find it.

@ThaDaVos
Copy link

@florian-h05 - I guess it has to be one of these - can't really pinpoint the exact one though:
https://github.com/openhab/openhab-core/pulls?q=is%3Apr+author%3AJ-N-K+is%3Aclosed+marketplace+milestone%3A4.0

@florian-h05
Copy link
Contributor

Thanks, I finally found it:

#3641.

If I understand the pattern correctly, this REGEX is used:

.*(.*?)-\d+.\d+.\d+.*

org.openhab.binding.unifiprotect-4.x.x-latest.jar does not match that REGEX, but org.openhab.binding.unifiprotect-4.0.0-latest.jar would.

@seaside1
Copy link
Author

Thanks. Simple enough for me to change name on the jar. Anyway, any specific reason not allowing the name 4.x.x. ?

@J-N-K
Copy link
Member

J-N-K commented Sep 19, 2023

It's not a valid version string, because x is not a number.

@seaside1
Copy link
Author

I would say it is a valid version string (for example maven allows -SNAPSHOT etc). I do agree that x is not a number though.

@seaside1
Copy link
Author

org.openhab.binding.unifiprotect-4-x-x-1.3.3.7-latest.jar This matches though :)

@seaside1
Copy link
Author

I would also think in case you want to enforce the above versioning, it would be better to fail the marketplace addon installation, rather than having it not showing any thing types available.

@J-N-K
Copy link
Member

J-N-K commented Sep 19, 2023

-latest is fine. But the first part of the version (after the bundle name and the first dash) consists of major.minor.patch which are all numeric values.

@weymann
Copy link

weymann commented Oct 19, 2023

Same reported in community here.
Naming:
image

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

6 participants