openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
911 stars 420 forks source link

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

Open seaside1 opened 1 year ago

seaside1 commented 1 year ago

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

openhab-bot commented 1 year ago

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 commented 1 year ago

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

florian-h05 commented 12 months ago

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 commented 12 months ago

@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 commented 12 months ago

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.

seaside1 commented 12 months ago

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 commented 12 months ago

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

seaside1 commented 12 months ago

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 commented 12 months ago

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

seaside1 commented 12 months ago

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 commented 12 months ago

-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 commented 11 months ago

Same reported in community here. Naming: image