openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

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

Open seaside1 opened this issue 1 year ago • 12 comments

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 avatar Sep 18 '23 05:09 seaside1

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

openhab-bot avatar Sep 18 '23 05:09 openhab-bot

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

ThaDaVos avatar Sep 18 '23 07:09 ThaDaVos

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.

florian-h05 avatar Sep 19 '23 06:09 florian-h05

@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

ThaDaVos avatar Sep 19 '23 07:09 ThaDaVos

Thanks, I finally found it:

https://github.com/openhab/openhab-core/pull/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.

florian-h05 avatar Sep 19 '23 08:09 florian-h05

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

seaside1 avatar Sep 19 '23 20:09 seaside1

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

J-N-K avatar Sep 19 '23 20:09 J-N-K

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 avatar Sep 19 '23 20:09 seaside1

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

seaside1 avatar Sep 19 '23 21:09 seaside1

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.

seaside1 avatar Sep 19 '23 21:09 seaside1

-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.

J-N-K avatar Sep 19 '23 22:09 J-N-K

Same reported in community here. Naming: image

weymann avatar Oct 19 '23 14:10 weymann