seaside1 / unifiprotect

openHAB UniFi Protect Addon
Eclipse Public License 2.0
21 stars 6 forks source link

upgrade openhab 4.0 #14

Closed stamateviorel closed 10 months ago

stamateviorel commented 1 year ago

currently this binding is not compatible with openhab 4.0 would you be interested to update it ?

seime commented 12 months ago

@stamateviorel I built the latest commit and it worked just fine (at least no errors in the log - no extensive testing from my side)

stamateviorel commented 12 months ago

@stamateviorel I built the latest commit and it worked just fine (at least no errors in the log - no extensive testing from my side)

Did some testing by building your addon the only thing I have found is some errors complaining about heat map image etc even though I set the path to store them and also the binding is not taking advance of the new set log level feature from the UI so I had to do it the old fashioned way

alaub81 commented 11 months ago

Can someone tell me how to build the latest version. I am now also on openhab 4.0.1 and I see the following errors, when snapshotting:

2023-08-08 18:50:46.690 [WARN ] [ity.CommunityMarketplaceAddonService] - Could not determine bundle name from url: https://github.com/seaside1/unifiprotect/releases/latest/download/org.openhab.binding.unifiprotect-3.x.x-latest.jar
2023-08-08 18:54:45.564 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler@508b3dfb': 'void org.openhab.core.library.types.DecimalType.<init>(long)'
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.refreshChannel(UniFiProtectBaseThingHandler.java:141) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.refreshChannel(UniFiProtectG4CameraThingHandler.java:83) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.refresh(UniFiProtectBaseThingHandler.java:103) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.refresh(UniFiProtectG4CameraThingHandler.java:72) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.handleSnapshot(UniFiProtectBaseThingHandler.java:410) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.handleCommand(UniFiProtectBaseThingHandler.java:353) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.handleCommand(UniFiProtectG4CameraThingHandler.java:89) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) ~[?:?]
        at jdk.proxy3946.$Proxy4086.handleCommand(Unknown Source) ~[?:?]
        at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:85) ~[?:?]
        at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

perhaps someone can just give me a hint, how to install the latest version.

cheers Andreas

stamateviorel commented 11 months ago

Can someone tell me how to build the latest version. I am now also on openhab 4.0.1 and I see the following errors, when snapshotting:

2023-08-08 18:50:46.690 [WARN ] [ity.CommunityMarketplaceAddonService] - Could not determine bundle name from url: https://github.com/seaside1/unifiprotect/releases/latest/download/org.openhab.binding.unifiprotect-3.x.x-latest.jar
2023-08-08 18:54:45.564 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler@508b3dfb': 'void org.openhab.core.library.types.DecimalType.<init>(long)'
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.refreshChannel(UniFiProtectBaseThingHandler.java:141) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.refreshChannel(UniFiProtectG4CameraThingHandler.java:83) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.refresh(UniFiProtectBaseThingHandler.java:103) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.refresh(UniFiProtectG4CameraThingHandler.java:72) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.handleSnapshot(UniFiProtectBaseThingHandler.java:410) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectBaseThingHandler.handleCommand(UniFiProtectBaseThingHandler.java:353) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectG4CameraThingHandler.handleCommand(UniFiProtectG4CameraThingHandler.java:89) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) ~[?:?]
        at jdk.proxy3946.$Proxy4086.handleCommand(Unknown Source) ~[?:?]
        at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:85) ~[?:?]
        at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

perhaps someone can just give me a hint, how to install the latest version.

cheers Andreas

He release a version for openhab 4 compiled already

ThaDaVos commented 11 months ago

Installing from Marketplace seems to fail though - with the following error: Could not determine bundle name from url: https://github.com/seaside1/unifiprotect/releases/latest/download/org.openhab.binding.unifiprotect-4.x.x-latest.jar

Manual install - by wgetting that url into the addons folder - works though

seaside1 commented 11 months ago

Not sure what is wrong. I'll take s look and see if I can find out

alaub81 commented 11 months ago

same here. I am not able to install the new binding via marketplace.

seaside1 commented 10 months ago

I have posted a bug on marketplace here: https://github.com/openhab/openhab-core/issues/3800

seaside1 commented 10 months ago

Fixed by renaming jar file. Market should work now.