Unfortunately, the upgrade is breaking MySensors binding.
I have MySensor binding 2.4.0 and 2.5.0 installed.
openhab> bundle:list|grep -i senso
264 x Resolved x 80 x 2.4.0.201812040738 x MySensors Binding
265 x Installed x 80 x 2.5.0.201902051046 x MySensors.test Binding
When I start MySensors 2.4.0, I get such logs:
openhab> bundle:start 264
----
2019-11-30 18:46:05.977 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@4b668bd1': bundleContext
java.lang.NoSuchFieldError: bundleContext
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.registerDeviceDiscoveryService(MySensorsBridgeHandler.java:216) ~[?:?]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:86) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
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_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2019-11-30 18:46:05.986 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'mysensors:bridge-eth:gateway': bundleContext
java.lang.NoSuchFieldError: bundleContext
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.registerDeviceDiscoveryService(MySensorsBridgeHandler.java:216) ~[?:?]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:86) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
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_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2019-11-30 18:46:06.698 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
If I try with 2.5.0:
openhab> bundle:stop 264
openhab> bundle:start 265
Error executing command: Error executing command on bundles:
Error starting bundle 265: Invalid operation on a fragment.
Any help appreciated to bring this service back
Thanks a lot!!!
I’m in the middle of the migration progress to support the current OH versions.
Please test THIS version, but be aware that this is a work in progress release and is not tested that well yet. Please report back to me, if you find the time to test this release!
I just made the switch from OH stable to snapshot and got problems with the 2.4.0 MySensors snapshot. It wasn’t completely broken, I had to comment and uncomment the thing definitions within the bridge after the controller went online.
Just now tried the 2.5.0 snapshot and it seems to work just fine from the little time I’ve tested it.
Thanks @TimO! Looking forward to an official, stable release.
It works. OpenHAB 2.5 + mysensors 2.3.1 + ethernet gateway. It connects and communicate with the modules.
It doesn’t discover new sensors. Whatever I already had it worked, new sensors had to be added manually.
It doesn’t work via MQTT. I suppose that is by design? I’d love to use it via MQTT because I share controllers between openhab and mycontroller, so i can do FOTA, and some topology discovery which openhab won’t do.
I’m a heavy user of the rollershutter element. I don’t know if it’s on this 2.5 snapshot or the problem is that I’m not using it via MQTT anymore, but it doesn’t report cover percentaje, and of course it wont update openhab icons or labels.
Same here. I installed openhab 2.5 release and mysensors 2.4 jar stopped working. But with 2.5 jar seems things back to normal (I had my configuration in .things and .items files).
Hey Dries,
the latest code is on github and yes, I’ve excluded the MQTT gateway from the current code. There were some dependency problems and the code needed some testing. I’ll look into it.
Any help needed regarding the MQTT gateway, count me in. It’s not that mysensors can’t work without it, but it’s so much better.
You can try different controllers, you can use even different controllers at the same time. And you can benefit from it without putting pressure on the openhab (my preferred controller) developers on some functionality, i.e. FOTA or topology mapping.
There is also some simple automation that you can do “outside” openhab that it’s easier with mqtt.
Thanks for the update and info. I certainly want to help, as this library is very important for my installation and I appreciate the work you already put into this.
I can see that the move to bnd requires some big changes. That is new for me too. If you can use some help with the MQTT specific part, does it require an update to to API changes in the org.eclipse.smarthome.io.transport.mqtt library or is it also due to the bnd changes? If you can give us some pointers, I might be able to help this weekend.