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

openhab2-flicbutton broken on openhab2 2.5.0 M6 #7

Closed
karidavidsson opened this issue Dec 6, 2019 · 9 comments
Closed

openhab2-flicbutton broken on openhab2 2.5.0 M6 #7

karidavidsson opened this issue Dec 6, 2019 · 9 comments
Assignees
Labels

Comments

@karidavidsson
Copy link

I am using the flic button with openhab2 installation running on Rapsberry PI.
It has been running fine on openhab2 M5, M4 and probably M3 (cant recall exactly when I installed the flic button).
Anyways upgraded the rpi couple of days ago and now the openhab2-flicbutton module does not initialize:

2019-12-04 22:37:45.007 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler@257015': bundleContext java.lang.NoSuchFieldError: bundleContext at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.initButtonDiscoveryService(FlicDaemonBridgeHandler.java:87) ~[?:?] at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.initialize(FlicDaemonBridgeHandler.java:70) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-04 22:37:45.083 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'flicbutton:flicd-bridge:vinaminni': bundleContext java.lang.NoSuchFieldError: bundleContext at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.initButtonDiscoveryService(FlicDaemonBridgeHandler.java:87) ~[?:?] at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.initialize(FlicDaemonBridgeHandler.java:70) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

@pfink pfink added the bug label Dec 19, 2019
@pfink pfink self-assigned this Dec 19, 2019
@pfink
Copy link
Owner

pfink commented Dec 22, 2019

New version is prepared but not sufficiently tested yet. You may want to give it a shot and provide some feedback here. .jar is attached.

New feature: Scanning in PaperUI will now add all buttons that were verified by simpleclient at once.

Please note that the pressed-switch channel has been removed. Profiles are now the recommended way for configuration.

[attachment deleted]

@guyv
Copy link

guyv commented Dec 23, 2019

I'm always getting "Configuration (hostname, port) is invalid and cannot be parsed."

Why should the rawPort be null here?
https://github.com/pfink/openhab2-flicbutton/blob/master/src/main/java/org/openhab/binding/flicbutton/handler/FlicDaemonBridgeConfiguration.java#L37

@karidavidsson
Copy link
Author

When I start the openhab fresh the above reported error is no longer in the log. Unfortunatly it is not connecting to the flic button daemon. The PaperUI shows the flicd with state "Bridge-Unitialized".

If I refresh the thing configuration file for the flicd I get the following crashlog:
2019-12-23 12:00:26.329 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.flicbutton.handler.FlicButtonHandler@a40902': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.handler.FlicButtonHandler.dispose(FlicButtonHandler.java:88) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.367 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while disposing handler of thing 'flicbutton:button:vinaminni:80-e4-da-74-c2-a6': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.handler.FlicButtonHandler.dispose(FlicButtonHandler.java:88) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.419 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.flicbutton.handler.FlicButtonHandler@857bb9': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.handler.FlicButtonHandler.dispose(FlicButtonHandler.java:88) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.428 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while disposing handler of thing 'flicbutton:button:vinaminni:80-e4-da-74-c2-a9': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.handler.FlicButtonHandler.dispose(FlicButtonHandler.java:88) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.477 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler@17318dd': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.stopBackgroundDiscovery(FlicSimpleclientDiscoveryServiceImpl.java:119) ~[?:?] at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.deactivate(AbstractDiscoveryService.java:426) ~[?:?] at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.deactivate(FlicSimpleclientDiscoveryServiceImpl.java:72) ~[?:?] at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.dispose(FlicDaemonBridgeHandler.java:139) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.543 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while disposing handler of thing 'flicbutton:flicd-bridge:vinaminni': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.stopBackgroundDiscovery(FlicSimpleclientDiscoveryServiceImpl.java:119) ~[?:?] at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.deactivate(AbstractDiscoveryService.java:426) ~[?:?] at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.deactivate(FlicSimpleclientDiscoveryServiceImpl.java:72) ~[?:?] at org.openhab.binding.flicbutton.handler.FlicDaemonBridgeHandler.dispose(FlicDaemonBridgeHandler.java:139) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2019-12-23 12:00:26.568 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'Runnable.run()' on 'org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$$Lambda$554/33239@d00ae9': null java.lang.NullPointerException: null at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.stopBackgroundDiscovery(FlicSimpleclientDiscoveryServiceImpl.java:119) ~[?:?] at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.deactivate(AbstractDiscoveryService.java:426) ~[?:?] at org.openhab.binding.flicbutton.internal.discovery.FlicSimpleclientDiscoveryServiceImpl.deactivate(FlicSimpleclientDiscoveryServiceImpl.java:72) ~[?:?] at org.openhab.binding.flicbutton.internal.FlicButtonHandlerFactory.unregisterDiscoveryService(FlicButtonHandlerFactory.java:98) ~[?:?] at org.openhab.binding.flicbutton.internal.FlicButtonHandlerFactory.removeHandler(FlicButtonHandlerFactory.java:81) ~[?:?] at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.unregisterHandler(BaseThingHandlerFactory.java:248) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.lambda$5(ThingManagerImpl.java:794) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
And the flicd thing dissapears from the Configuration->Thing list in the PaperUI.
I have verified that tthe simpleclient is able to connect and get the flic button presses.
The controller has upgraded to 2.5.0 release of openhab.

@pfink
Copy link
Owner

pfink commented Dec 23, 2019

Weird that this didn't occur on my tests. I can only explain that something failed during deployment and I actually tested an older build. This build should be better, I fixed this, now thanks!
org.openhab.binding.flicbutton-1.0.0-SNAPSHOT.zip

@karidavidsson
Copy link
Author

karidavidsson commented Dec 23, 2019

I am not sure how, but the karaf console listed two instances of the jar file.
I cleaned up the addons folder and uninstalled with the bundle:uninstall command on the karaf console and and then reinstalled the jar file into the addons folder (after shutdown).
Now the flic button bridge is initialized and the butten events are deliverd as before.

Is it maybe not enough to copy the new jar file to the addons folder and remove the old jar file as the instructions instruct?

This is with org.openhab.binding.flicbutton-1.0.0-SNAPSHOT.zip.

@pfink
Copy link
Owner

pfink commented Dec 23, 2019

Is it maybe not enough to copy the new jar file to the addons folder and remove the old jar file as the instructions instruct?

I don't know, never trust OSGi 🗡 I have the impression sometimes hot deployment is enough, sometimes restart is needed and sometimes even bundle:uninstall - independently whether it's a different version or not.

@guyv
Copy link

guyv commented Dec 23, 2019

this version is working for me, thx for the swift response

@martonsz85
Copy link

I'm glad I found this issue, it works with OH 2.5.0 for me, too. Thanks for the quick fix. Any plans on a new release?

@pfink
Copy link
Owner

pfink commented Jan 3, 2020

Release is available now: https://github.com/pfink/openhab2-flicbutton/releases/tag/1.0.0

Please consider the upgrade notes, there are some changes that need your attention.

@pfink pfink closed this as completed Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants