OH3 - MySensors Binding
-
Hello,
has anyone of you guys already a bibdign version for OH3?
-
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" {} ; -
Well it seems that there isn't and ther won't be a mysensors binding anymore. It was abandoned by the developer.
So as of december 2020, with OpenHAB 3, the way to go is plain MQTT.
I can't say I disagree really. MQTT is simple and works.
I'm going to start from scratch and try to document my experience here.
-
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.
-
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 great to know. Thanks
-
Hello,
Is smartsleep option of mysensors is implemented in de mqtt gateway? I have some battery powered units to control blinds which I put a lot in (smart)sleep to preserve batteries. This functions well with OH2 and mysensors binding....I'd rather not keep and OH2 instance running next to my OH3 instance if not necessary.
regards, -
I think so. I have a lot of battery powered nodes heavily using smartsleep and they work just fine with MQTT.
-
I'll look into the changes needed to migrate the binding to OH3 and let you know.
Maybe it's no big deal and I'll provide a version 3 binding. -
I'll look into the changes needed to migrate the binding to OH3 and let you know.
Maybe it's no big deal and I'll provide a version 3 binding. -
@TimO, a binding for openhab 3.0 would be very much appreciated!
I have tried the MQTT gateway, and with standard setup, messages are lost wich are sent to the node when asleep. Does anyone know how to solve this. I didnt find anything in de mqtt-gateway config. I see mqtt messages which could be read by the controller (openhab), when the node goes to sleep and wakes up, but at this moment I don't see how to implement this in openhab MQTT generic things.
Thanks...
-
For those of you willing to help testing the OH3 integration here is a link:
Please don't forget to fulfill the requirements for mqtt und serial. Installation of bindings will do.
What's working after a quick test:
- binding loads in OH3
- serial gateway receives messages (ethernet gateway should work too)
- discovery is working
What's not working:
- MQTT gateway: it's broken some time and needs some tinkering
Please let me know if you found some time to test the binding.
-
Hello,
Is smartsleep option of mysensors is implemented in de mqtt gateway? I have some battery powered units to control blinds which I put a lot in (smart)sleep to preserve batteries. This functions well with OH2 and mysensors binding....I'd rather not keep and OH2 instance running next to my OH3 instance if not necessary.
regards,@haasje30
smartsleep is easy with MQTTInitially a few years ago i tried the binding and it gave me nothing but trouble.
While it was configured I'd watch MQTT to see what it would do.2020-12-31 22:58:22 unoout/202/255/3/0/33 180000 (THIS IS THE SLEEP DURATION)
2020-12-31 22:58:22 unoout/202/255/3/0/32 500 (AT THIS MOMENT YOU HAVE 500MS to GET A COMMAND SENT)So define a thing to the channel ending in 32.
Bind an item to that channel with an expire timer for like 10 seconds state = 0then for your rule you'd have
rule "whatever"
when
Item whateverSleepItem changed from 0 to 500
then
whateverOtherItemThatIsSendingOutACommand.sendCommand(ON/OFF/WHATEVER)
end -
Thanks TimO and waspie. At this moment I have one mysensors hardware gateway, which is connected to my openhab2 instance. I have an OH3 test instance, and no hardware controller for this (yet). I did an short test with my current controller, but this is not the best way for me. So I orderded an wemos D1 mini to create a new mysensors gateway. As soon as this is in I will be testing. Thanks again...
-
For those of you willing to help testing the OH3 integration here is a link:
Please don't forget to fulfill the requirements for mqtt und serial. Installation of bindings will do.
What's working after a quick test:
- binding loads in OH3
- serial gateway receives messages (ethernet gateway should work too)
- discovery is working
What's not working:
- MQTT gateway: it's broken some time and needs some tinkering
Please let me know if you found some time to test the binding.
-
Thanks TimO and waspie. At this moment I have one mysensors hardware gateway, which is connected to my openhab2 instance. I have an OH3 test instance, and no hardware controller for this (yet). I did an short test with my current controller, but this is not the best way for me. So I orderded an wemos D1 mini to create a new mysensors gateway. As soon as this is in I will be testing. Thanks again...
-
For those of you willing to help testing the OH3 integration here is a link:
Please don't forget to fulfill the requirements for mqtt und serial. Installation of bindings will do.
What's working after a quick test:
- binding loads in OH3
- serial gateway receives messages (ethernet gateway should work too)
- discovery is working
What's not working:
- MQTT gateway: it's broken some time and needs some tinkering
Please let me know if you found some time to test the binding.