openhab-core
openhab-core copied to clipboard
[marketplace] Issue installing UniFiProtect addon from marketplace in openHAB 4
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)
- Installing the addon using Community Marketplace,
- Adminstration->Settings->Things click +
- Select UnifiProtect binding
You then an error message: No thing types can be added with this binding.
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
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
I've noticed this issue with multiple addons - so there's probably a bigger problem at hand here
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 - 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
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.
Thanks. Simple enough for me to change name on the jar. Anyway, any specific reason not allowing the name 4.x.x. ?
It's not a valid version string, because x
is not a number.
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.
org.openhab.binding.unifiprotect-4-x-x-1.3.3.7-latest.jar This matches though :)
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.
-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.
Same reported in community here.
Naming: