Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. OpenHAB
  4. OH3 - MySensors Binding

OH3 - MySensors Binding

Scheduled Pinned Locked Moved OpenHAB
135 Posts 34 Posters 1.8k Views 40 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gieemek
    wrote on last edited by gieemek
    #2

    Hi,
    I don't use MySensors binding so I have not tested it in OH3. But I know, that there are not binding special for OH3. All binding 2x should work with OH3. Difference is with binding 1x - these are not working with OH3.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Klabbe
      wrote on last edited by
      #3

      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" {} ;

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Guillermo Schimmel
        wrote on last edited by
        #4

        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.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Klabbe
          wrote on last edited by
          #5

          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.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Klabbe
            wrote on last edited by
            #6

            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.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Klabbe
              wrote on last edited by
              #7

              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.

              G 1 Reply Last reply
              1
              • K Klabbe

                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.

                G Offline
                G Offline
                Guillermo Schimmel
                wrote on last edited by
                #8

                @Klabbe great to know. Thanks

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  haasje30
                  wrote on last edited by
                  #9

                  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,

                  W 1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    Guillermo Schimmel
                    wrote on last edited by
                    #10

                    I think so. I have a lot of battery powered nodes heavily using smartsleep and they work just fine with MQTT.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      haasje30
                      wrote on last edited by
                      #11

                      Thanks Guillermo, are you using qos 1 for this, or are messages kept on the gateway automatically to deliver to a sensor which is asleep. Think I have to rebuild my gateway to mqtt then....

                      Thanks.

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        TimO
                        Hero Member
                        wrote on last edited by
                        #12

                        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.

                        K 1 Reply Last reply
                        0
                        • T TimO

                          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.

                          K Offline
                          K Offline
                          Klabbe
                          wrote on last edited by
                          #13

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

                          1 Reply Last reply
                          0
                          • H Offline
                            H Offline
                            haasje30
                            wrote on last edited by
                            #14

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

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              TimO
                              Hero Member
                              wrote on last edited by
                              #15

                              For those of you willing to help testing the OH3 integration here is a link:

                              Jar Download

                              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.

                              DbagioniD K G kerberosK Dustin HagstromD 5 Replies Last reply
                              3
                              • H haasje30

                                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,

                                W Offline
                                W Offline
                                waspie
                                wrote on last edited by waspie
                                #16

                                @haasje30
                                smartsleep is easy with MQTT

                                Initially 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 = 0

                                then for your rule you'd have

                                rule "whatever"
                                when
                                Item whateverSleepItem changed from 0 to 500
                                then
                                whateverOtherItemThatIsSendingOutACommand.sendCommand(ON/OFF/WHATEVER)
                                end

                                1 Reply Last reply
                                0
                                • H Offline
                                  H Offline
                                  haasje30
                                  wrote on last edited by
                                  #17

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

                                  W 1 Reply Last reply
                                  0
                                  • T TimO

                                    For those of you willing to help testing the OH3 integration here is a link:

                                    Jar Download

                                    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.

                                    DbagioniD Offline
                                    DbagioniD Offline
                                    Dbagioni
                                    wrote on last edited by
                                    #18
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • H haasje30

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

                                      W Offline
                                      W Offline
                                      waspie
                                      wrote on last edited by
                                      #19

                                      @haasje30 if it's mqtt both can subscribe at the same time

                                      1 Reply Last reply
                                      1
                                      • T TimO

                                        For those of you willing to help testing the OH3 integration here is a link:

                                        Jar Download

                                        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.

                                        K Offline
                                        K Offline
                                        Klabbe
                                        wrote on last edited by
                                        #20

                                        @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!

                                        T G 2 Replies Last reply
                                        1
                                        • K Klabbe

                                          @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!

                                          T Offline
                                          T Offline
                                          TimO
                                          Hero Member
                                          wrote on last edited by
                                          #21

                                          @Klabbe thank you for your feedback!

                                          1 Reply Last reply
                                          2
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          27

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular