Running OpenHAB 3 as my main system and OpenHAB 2 with the MySensors binding, under docker, works great. I use the remote binding in OpenHAB 3 to connect to OpenHAB 2. Just make sure to run them on different ports if they run on the same server.
Klabbe
@Klabbe
Best posts made by Klabbe
-
RE: OH3 - MySensors Binding
-
RE: OH3 - MySensors Binding
@TimO Thank you! It works for me with my Ethernet Gateway. I don't have that many nodes but the ones that I have, works as good as they did with OpenHAB2. I have a watermeter, an actuator and a door sensor. Great work!
-
RE: openHAB 2.2 binding
The 2.5-version of the binding does not work out of the box in OpenHAB 3 for me.
2020-12-22 22:53:34.555 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.mysensors-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [272]
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.coreat org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
I guess it might have something to do with this?
https://community.openhab.org/t/guide-binding-development-changes-for-openhab-3-from-2-5-x/104134
Namespace change of openHAB core classes
With the migration of Eclipse Smart Home to openHAB the namespace of all classes in openHAB core needed to be changed. This means all imports done by bindings that refer to org.eclipse.smarthome have been changed to org.openhab.core. With your binding code you can simply do a file level replace of this text string in the java source files to migrate the binding. On linux you can use the following commands in you src/main/java directory:find . -name *.java -exec sed -i "s/org.eclipse.smarthome.core/org.openhab.core/g" {} ;
find . -name *.java -exec sed -i "s/org.eclipse.smarthome/org.openhab.core/g" {} ;
Latest posts made by Klabbe
-
RE: Homie MySensors bridge Controller. For use in OpenHab 3 (and others)
@David-Dawson
Have you seen this topic? TimO has updated the binding to work with openhab 3. Works great for me. Hope it will work for you too![https://forum.mysensors.org/topic/11482/oh3-mysensors-binding/30](link url)
-
RE: OH3 - MySensors Binding
@TimO Thank you! It works for me with my Ethernet Gateway. I don't have that many nodes but the ones that I have, works as good as they did with OpenHAB2. I have a watermeter, an actuator and a door sensor. Great work!
-
RE: OH3 - MySensors Binding
@TimO That would be very appreciated! I really like your binding and it would be great to continue to use it without an extra instance of OpenHAB 2. I tried to compile it and got like 10 errors. Since I have zero java skills, I was unable to fix them.
-
RE: OH3 - MySensors Binding
Running OpenHAB 3 as my main system and OpenHAB 2 with the MySensors binding, under docker, works great. I use the remote binding in OpenHAB 3 to connect to OpenHAB 2. Just make sure to run them on different ports if they run on the same server.
-
RE: OH3 - MySensors Binding
I'm thinking about running a separate instance of OpenHAB 2 under docker, just to get the mysensors binding functionality. Or can I get all the functionality of the binding, via MQTT? Like auto ID and that the sensor (like a watermeter) can request its previous value from the controller.
-
RE: OH3 - MySensors Binding
Sad to hear that. I really liked the binding. I used MQTT before the binding and it worked but the binding was easier to use with auto ID and so on. Looking forward on following your progress. I guess I have to do the same, when I find the time.
-
RE: openHAB 2.2 binding
The 2.5-version of the binding does not work out of the box in OpenHAB 3 for me.
2020-12-22 22:53:34.555 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.mysensors-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [272]
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.coreat org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
I guess it might have something to do with this?
https://community.openhab.org/t/guide-binding-development-changes-for-openhab-3-from-2-5-x/104134
Namespace change of openHAB core classes
With the migration of Eclipse Smart Home to openHAB the namespace of all classes in openHAB core needed to be changed. This means all imports done by bindings that refer to org.eclipse.smarthome have been changed to org.openhab.core. With your binding code you can simply do a file level replace of this text string in the java source files to migrate the binding. On linux you can use the following commands in you src/main/java directory:find . -name *.java -exec sed -i "s/org.eclipse.smarthome.core/org.openhab.core/g" {} ;
find . -name *.java -exec sed -i "s/org.eclipse.smarthome/org.openhab.core/g" {} ; -
RE: OH3 - MySensors Binding
The 2.5 binding does not work out of the box in OpenHAB 3 for me.
2020-12-22 22:53:34.555 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.mysensors-2.5.0-SNAPSHOT.jar org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [272] Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
I guess it has somehing to do with this?
https://community.openhab.org/t/guide-binding-development-changes-for-openhab-3-from-2-5-x/104134
Namespace change of openHAB core classes
With the migration of Eclipse Smart Home to openHAB the namespace of all classes in openHAB core needed to be changed. This means all imports done by bindings that refer to org.eclipse.smarthome have been changed to org.openhab.core. With your binding code you can simply do a file level replace of this text string in the java source files to migrate the binding. On linux you can use the following commands in you src/main/java directory:find . -name *.java -exec sed -i "s/org.eclipse.smarthome.core/org.openhab.core/g" {} ;
find . -name *.java -exec sed -i "s/org.eclipse.smarthome/org.openhab.core/g" {} ;