# OH 2.5 snapshot and MySensors binding

**URL:** <https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580>\
**Category:** Bindings\
**Tags:** snapshot-25\
**Created:** [November 30, 2019, 5:50pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580 "2019-11-30T17:50:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumy](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8c91f0/32.png) [@kumy](https://community.openhab.org/u/kumy)\
**Post date:** [November 30, 2019, 5:50pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/1 "2019-11-30T17:50:25Z")

</div>

Hi,  
I’ve tried to update my fresh installation to 2.5.0-SNAPSHOT Build #1766 because of issue [https://github.com/openhab/openhab2-addons/issues/6224](https://github.com/openhab/openhab2-addons/issues/6224)

Unfortunately, the upgrade is breaking MySensors binding.

I have MySensor binding 2.4.0 and 2.5.0 installed.

```auto
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:

```auto
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:

```auto
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!!!

---

<div class="post-metadata">

**Author:** ![TimO](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@TimO](https://community.openhab.org/u/TimO)\
**Post date:** [November 30, 2019, 8:07pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/2 "2019-11-30T20:07:54Z")

</div>

Hey @kumy!

I’m in the middle of the migration progress to support the current OH versions.  
Please test [THIS](http://oberfoell.com/openhab2/org.openhab.binding.mysensors-2.5.0-SNAPSHOT.jar) 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!

---

<div class="post-metadata">

**Author:** ![Frasier](https://community.openhab.org/user_avatar/community.openhab.org/frasier/32/77724_2.png) [@Frasier](https://community.openhab.org/u/Frasier)\
**Post date:** [November 30, 2019, 10:22pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/3 "2019-11-30T22:22:40Z")

</div>

Excellent, just in time! 🙂

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.

---

<div class="post-metadata">

**Author:** ![kumy](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8c91f0/32.png) [@kumy](https://community.openhab.org/u/kumy)\
**Post date:** [November 30, 2019, 11:24pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/4 "2019-11-30T23:24:17Z")

</div>

Thanks a lot @TimO, just replaced the plugin had with yours and it’s working fine.

```auto
openhab> bundle:list|grep -i senso                                                                                                                                                                                                                                    
266 x Active x 80 x 2.5.0.201911301940 x openHAB Add-ons :: Bundles :: MySensors Binding

```

Just a side question, is there a page, or where can I find such ‘unofficial’ plugins builds?

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 16, 2019, 9:49pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/5 "2019-12-16T21:49:07Z")

</div>

hi there. I had everything working with 2.4. Now I upgraded openhab and TimO binding and I’m getting bridge offline.

Could you please share your config so I can compare? Thanks

---

<div class="post-metadata">

**Author:** ![Pea](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@Pea](https://community.openhab.org/u/Pea)\
**Post date:** [December 16, 2019, 10:20pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/6 "2019-12-16T22:20:41Z")

</div>

Just upgraded and it works 👍  
+1 h running so far

```csv
openhab> bundle:list | grep Sensors
234 x Active x 80 x 2.5.0.201911301940 x openHAB Add-ons :: Bundles :: MySensors Binding
openhab>

```

---

<div class="post-metadata">

**Author:** ![ddc](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/919ad9/32.png) [@ddc](https://community.openhab.org/u/ddc)\
**Post date:** [December 16, 2019, 10:32pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/7 "2019-12-16T22:32:26Z")

</div>

Hmm,

It seems that the latest version is missing support for the MQTT gateway? Is this temporary?

Kind regards

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 16, 2019, 10:35pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/8 "2019-12-16T22:35:46Z")

</div>

Yeah! Same question here. I was using it via MQTT. Now it stopped working but it resumed when I uploaded the simple ethernet gateway sketch.

Would love to have MQTT support as I use this system with other controllers also.

Regards

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 17, 2019, 1:53pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/9 "2019-12-17T13:53:10Z")

</div>

Hi Tim. Once again, thanks for your effort.

Some issues regarding your module:

1. It works. OpenHAB 2.5 + mysensors 2.3.1 + ethernet gateway. It connects and communicate with the modules.
2. It doesn’t discover new sensors. Whatever I already had it worked, new sensors had to be added manually.
3. 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.
4. 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.

Thanks again

regards

Guillermo

---

<div class="post-metadata">

**Author:** ![Bruce\_Osborne](https://community.openhab.org/user_avatar/community.openhab.org/bruce_osborne/32/38531_2.png) [@Bruce\_Osborne](https://community.openhab.org/u/Bruce_Osborne)\
**Post date:** [December 17, 2019, 1:55pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/10 "2019-12-17T13:55:31Z")

</div>

> [@Guillermo\_Schimmel](#):
>
> It works. OpenHAB 2.5

Is this the stable version released last weekend? Most of the posts in this thread appear to have been using 2.5 snapshots.

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 17, 2019, 2:00pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/11 "2019-12-17T14:00:47Z")

</div>

Openhab 2.5 stable rpm packaged version.

---

<div class="post-metadata">

**Author:** ![rzylius](https://community.openhab.org/user_avatar/community.openhab.org/rzylius/32/42619_2.png) [@rzylius](https://community.openhab.org/u/rzylius)\
**Post date:** [December 17, 2019, 8:12pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/12 "2019-12-17T20:12:08Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![ddc](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/919ad9/32.png) [@ddc](https://community.openhab.org/u/ddc)\
**Post date:** [December 17, 2019, 8:37pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/13 "2019-12-17T20:37:33Z")

</div>

Hi Tim,  
is there any location where we can find the latest code and try it out? Anything we can do to help with the MQTT part?

Kind regards,  
Dries

---

<div class="post-metadata">

**Author:** ![TimO](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@TimO](https://community.openhab.org/u/TimO)\
**Post date:** [December 18, 2019, 3:03pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/14 "2019-12-18T15:03:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 18, 2019, 3:06pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/15 "2019-12-18T15:06:56Z")

</div>

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.

Anyways, thanks A LOT for your effort.

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 18, 2019, 3:15pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/16 "2019-12-18T15:15:52Z")

</div>

> [@TimO](#):
>
> …the latest code is on github…

Where, if I may ask is this github? I can’t seem to find it at your link [GitHub - tobof/openhab-addons: The next-generation open Home Automation Bus (openHAB)](https://github.com/tobof/openhab2-addons)

It all says like 11 months old there.

Thanks

---

<div class="post-metadata">

**Author:** ![TimO](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/c4cdca/32.png) [@TimO](https://community.openhab.org/u/TimO)\
**Post date:** [December 18, 2019, 3:22pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/17 "2019-12-18T15:22:40Z")

</div>

There is a different branch for the bnd migration:

> **[openhab-addons/ at MySensors\_Binding\_bnd · tobof/openhab-addons](https://github.com/tobof/openhab-addons/tree/MySensors_Binding_bnd?files=1)**
>
> The next-generation open Home Automation Bus (openHAB) - tobof/openhab-addons

---

<div class="post-metadata">

**Author:** ![kumy](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8c91f0/32.png) [@kumy](https://community.openhab.org/u/kumy)\
**Post date:** [December 18, 2019, 3:24pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/18 "2019-12-18T15:24:28Z")

</div>

@Guillermo_Schimmel Maybe latest code is in branch `MySensors_Binding_bnd`, it is only 23 days ago 😉

> **[GitHub - tobof/openhab-addons at MySensors\_Binding\_bnd](https://github.com/tobof/openhab-addons/tree/MySensors_Binding_bnd)**
>
> MySensors\_Binding\_bnd

---

<div class="post-metadata">

**Author:** ![Guillermo\_Schimmel](https://community.openhab.org/user_avatar/community.openhab.org/guillermo_schimmel/32/42175_2.png) [@Guillermo\_Schimmel](https://community.openhab.org/u/Guillermo_Schimmel)\
**Post date:** [December 18, 2019, 3:35pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/19 "2019-12-18T15:35:22Z")

</div>

Oh I see it. Thank you very much.

---

<div class="post-metadata">

**Author:** ![ddc](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/919ad9/32.png) [@ddc](https://community.openhab.org/u/ddc)\
**Post date:** [December 18, 2019, 9:27pm UTC](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580/20 "2019-12-18T21:27:01Z")

</div>

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.

[Next page](https://community.openhab.org/t/oh-2-5-snapshot-and-mysensors-binding/86580.md?page=2)
