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. openHAB 2.2 binding

openHAB 2.2 binding

Scheduled Pinned Locked Moved OpenHAB
132 Posts 32 Posters 58.2k Views 34 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.
  • J Jet

    Re: Persistence in use error message, by accident (typo in specifying broker.clientId), I've figured out the cause:

    [11:12:04] openhabian@openHABianPi:~$ netstat -a | grep 1883
    tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
    tcp6 0 0 [::]:1883 [::]:* LISTEN
    feature:install esh-io-transport-mqtt
    [11:12:20] openhabian@openHABianPi:~$ netstat -a | grep 1883
    tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
    tcp 0 0 localhost:1883 localhost:53256 ESTABLISHED
    tcp 0 0 localhost:1883 localhost:53254 ESTABLISHED
    tcp6 0 0 [::]:1883 [::]:* LISTEN
    tcp6 0 0 localhost:53256 localhost:1883 ESTABLISHED
    tcp6 0 0 localhost:53254 localhost:1883 ESTABLISHED

    esh-io-transport-mqtt opens 2 connections to mosquito (not sure why), but as each connection needs a unique clientId, if you've specified a clientId, it will fail one of the connections with that error message.

    The solution is to remove your <broker>.clientId definition in the config file (also remember to remove the backup file, otherwise it won't have any effect). When you do this a unique clientId is generated on every connection (which you can see in the mosquito log), and the error message goes away.

    See these log files (Note without clientId, 2 connections from localhost are made and are pinging):
    with clientId specified:
    1525969562: Opening ipv4 listen socket on port 1883.
    1525969562: Opening ipv6 listen socket on port 1883.
    1525970154: New connection from 127.0.0.1 on port 1883.
    1525970154: New client connected from 127.0.0.1 as openhab2 (c1, k60, u'openhabian').
    1525970154: Sending CONNACK to openhab2 (0, 0)
    1525970214: Received PINGREQ from openhab2
    1525970214: Sending PINGRESP to openhab2
    1525970274: Received PINGREQ from openhab2
    1525970274: Sending PINGRESP to openhab2
    1525970334: Received PINGREQ from openhab2

    without clientId Specified:
    1525971402: Opening ipv4 listen socket on port 1883.
    1525971402: Opening ipv6 listen socket on port 1883.
    1525971428: New connection from 127.0.0.1 on port 1883.
    1525971428: New connection from 127.0.0.1 on port 1883.
    1525971428: New client connected from 127.0.0.1 as paho31354324154 (c1, k60, u'openhabian').
    1525971428: Sending CONNACK to paho31354324154 (0, 0)
    1525971428: New client connected from 127.0.0.1 as paho31177339570 (c1, k60, u'openhabian').
    1525971428: Sending CONNACK to paho31177339570 (0, 0)
    1525971496: Received PINGREQ from paho31177339570
    1525971496: Sending PINGRESP to paho31177339570
    1525971496: Received PINGREQ from paho31354324154
    1525971496: Sending PINGRESP to paho31354324154
    1525971556: Received PINGREQ from paho31177339570
    1525971556: Sending PINGRESP to paho31177339570
    1525971556: Received PINGREQ from paho31354324154

    and with debugging enabled on esh-io-transport-mqtt (when running feature:install esh-io-transport-mqtt) - again 2 connections:
    11:25:46.778 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto' to 'tcp://localhost:1883' with clientid paho1741848008350 and file store '/var/lib/openhab2/tmp/mosquitto'
    11:25:46.815 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto' to 'tcp://localhost:1883' with clientid paho1741975903334 and file store '/var/lib/openhab2/tmp/mosquitto'

    I'm digging into the code for esh-io-transport-mqtt to see if I can find the root cause, but this openhab stuff is a whole load of bloatware :-)

    fixjunkF Offline
    fixjunkF Offline
    fixjunk
    wrote on last edited by
    #117

    @jet who knew! ultimately clientid isn't really a critical piece of info to provide, but not knowing that providing it causes the error is unfortunate.

    would this apply to future mqtt bindings using esh-io-transport-mqtt even besides mysensors, essentially rendering the broker.clientid setting useless?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jet
      wrote on last edited by
      #118

      This happens before mysensors is even loaded, so yes.

      Here's the code: https://github.com/eclipse/smarthome/blob/master/bundles/io/org.eclipse.smarthome.io.transport.mqtt/src/main/java/org/eclipse/smarthome/io/transport/mqtt/MqttBrokerConnection.java

      But I'm not seeing anything requesting 2 connections, unless openhab is requesting it of something is wrong or not working with the reconnect code

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jet
        wrote on last edited by
        #119

        Couldn't figure out why it launches 2 instances or how to stop it, it seems to be 2 instances launches from just one module (esh-io-transport-mqtt) if anybody figures out why, please post an update. Otherwise not defining clientId for now is a workaround.

        1 Reply Last reply
        0
        • T TimO

          Dear fellow openHAB2 binding users,

          it's time for a new release of the binding. The added functionality is low, but under the hood there were a few changes, so after the refactoring @andreacioni has done at the beginning of this year, I've done some refactoring too, with the objective to fullfil the regulations for an integration into the official openhab2-addons repository.
          I've tried to improve the readability of the configuration and of the code itself.

          This leads to an important point: The current release is not backwards compatible!!
          Whatever is configured (MySensors binding related) will not work anymore with the current release.

          But why?

          • nodeId & childId were Strings in the old bindings and now are Integer
          • skipStartupCheck was renamed to startupCheckEnabled

          If you've configured the things with the *.things file you just have to do two easy steps:

          1. Look for skipStartupCheck and switch it with startupCheckEnabled and reverse the logic (true to false and vice versa)

          2. Look for nodeId="123", childId="456" and remove the quotation marks ", so it will look like: nodeId=123, childId=456

          Copy the new jar file into the addons folder, start OpenHAB2 and you're good to go.

          If you've configured the things in PaperUI the easiest way is to delete all things and rediscover them. Of course in large installations this won't be much fun.

          I hope this won't happen again in further versions! :s

          Fixed in this release:

          • RGB & RGBW corrections
          • Removed bug that prevented autodiscovery of deleted things
          • mysensors.test fragment added / tests moved
          • Static code analysis
          • Move to 2.2.0 Snapshot

          The changes in functionality were small so there is no need to install the new version asap if you are able to forgo the above mentioned functionality.

          Downloads:
          OpenHAB MySensors Binding 2.2.0

          OpenHAB MySensors Binding 2.1.0 (old binding version, with old configuration if you still need it)

          D Offline
          D Offline
          doctor64
          wrote on last edited by
          #120

          @timo Looks like new binding no more support reporting of battery voltage from sensors, or I missed something?

          1 Reply Last reply
          0
          • T TimO

            Dear fellow openHAB2 binding users,

            it's time for a new release of the binding. The added functionality is low, but under the hood there were a few changes, so after the refactoring @andreacioni has done at the beginning of this year, I've done some refactoring too, with the objective to fullfil the regulations for an integration into the official openhab2-addons repository.
            I've tried to improve the readability of the configuration and of the code itself.

            This leads to an important point: The current release is not backwards compatible!!
            Whatever is configured (MySensors binding related) will not work anymore with the current release.

            But why?

            • nodeId & childId were Strings in the old bindings and now are Integer
            • skipStartupCheck was renamed to startupCheckEnabled

            If you've configured the things with the *.things file you just have to do two easy steps:

            1. Look for skipStartupCheck and switch it with startupCheckEnabled and reverse the logic (true to false and vice versa)

            2. Look for nodeId="123", childId="456" and remove the quotation marks ", so it will look like: nodeId=123, childId=456

            Copy the new jar file into the addons folder, start OpenHAB2 and you're good to go.

            If you've configured the things in PaperUI the easiest way is to delete all things and rediscover them. Of course in large installations this won't be much fun.

            I hope this won't happen again in further versions! :s

            Fixed in this release:

            • RGB & RGBW corrections
            • Removed bug that prevented autodiscovery of deleted things
            • mysensors.test fragment added / tests moved
            • Static code analysis
            • Move to 2.2.0 Snapshot

            The changes in functionality were small so there is no need to install the new version asap if you are able to forgo the above mentioned functionality.

            Downloads:
            OpenHAB MySensors Binding 2.2.0

            OpenHAB MySensors Binding 2.1.0 (old binding version, with old configuration if you still need it)

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

            @timo Hi! Do you plan to continue the development into openhab 2.4?

            T 1 Reply Last reply
            0
            • G Guillermo Schimmel

              @timo Hi! Do you plan to continue the development into openhab 2.4?

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

              @guillermo-schimmel Yes, the binding is (should) be compatible with OH 2.4 and I continue to hope for an integration in the main repository. ;-)
              I've recently cleaned up the history of my git repository and will look forward to an integration in OH 2.5.

              G 1 Reply Last reply
              1
              • T TimO

                @guillermo-schimmel Yes, the binding is (should) be compatible with OH 2.4 and I continue to hope for an integration in the main repository. ;-)
                I've recently cleaned up the history of my git repository and will look forward to an integration in OH 2.5.

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

                @timo Great news! I'm testing it today. Thanks

                G 1 Reply Last reply
                0
                • G Guillermo Schimmel

                  @timo Great news! I'm testing it today. Thanks

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

                  @guillermo-schimmel Hi there, it's me again. Do you still need to remove the other standard mqtt binding for this to work?

                  I'm getting HANDLER_INITIALIZING_ERROR.

                  Thanks

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    freynder
                    wrote on last edited by
                    #125

                    @timo said in openHAB 2.2 binding:

                    I continue to hope for an integration in the main repository. ;-)

                    Hi @TimO,
                    What is preventing this? I'm willing to help if needed.

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jimmy loyens
                      wrote on last edited by jimmy loyens
                      #126

                      Hello, I just started to use the mysensors binding 2.2 (moving from serial gateway to ethernet gateway to accomadate MYSController) and I have some (maybe stupid) questions I cant find the answers to (I have been poking around the forum though).

                      First off, I have a whole bunch of the same type nodes: child0=battery/child1=humidity/child2=temperature/child3=lightintensity/child4-9 are digital inputs for doors and windows. Are such nodes supported by the binding, and how to configure them? I can find temperature, humidity and lightlevel nodes in the list (paperUI) but how can i combine these?

                      Second, can the nodes be automaticly discovered by the binding? In my case i have to add them all manually.

                      Third, what are the var1-5 channels for? (is this the answer to my first question?)

                      Fourth, what is the difference between the two variable1 channels? in the channel name one says "var1" the other one says "custom"?

                      Fifth, is there a comprehencive tutorial out there on how to configure the nodes? (I have looked but cant seem to find one)

                      Sixed, when i add any sensor manualy i get a status for it of "UNINITIALIZED - HANDLER_INITIALIZING_ERROR ". The node ID/child ID is online sending data though.

                      am i using the latest stable version of the binding? I downloaded it a few weeks ago from eclipse market.

                      Any help would be appreciated

                      J G 2 Replies Last reply
                      0
                      • J jimmy loyens

                        Hello, I just started to use the mysensors binding 2.2 (moving from serial gateway to ethernet gateway to accomadate MYSController) and I have some (maybe stupid) questions I cant find the answers to (I have been poking around the forum though).

                        First off, I have a whole bunch of the same type nodes: child0=battery/child1=humidity/child2=temperature/child3=lightintensity/child4-9 are digital inputs for doors and windows. Are such nodes supported by the binding, and how to configure them? I can find temperature, humidity and lightlevel nodes in the list (paperUI) but how can i combine these?

                        Second, can the nodes be automaticly discovered by the binding? In my case i have to add them all manually.

                        Third, what are the var1-5 channels for? (is this the answer to my first question?)

                        Fourth, what is the difference between the two variable1 channels? in the channel name one says "var1" the other one says "custom"?

                        Fifth, is there a comprehencive tutorial out there on how to configure the nodes? (I have looked but cant seem to find one)

                        Sixed, when i add any sensor manualy i get a status for it of "UNINITIALIZED - HANDLER_INITIALIZING_ERROR ". The node ID/child ID is online sending data though.

                        am i using the latest stable version of the binding? I downloaded it a few weeks ago from eclipse market.

                        Any help would be appreciated

                        J Offline
                        J Offline
                        jimmy loyens
                        wrote on last edited by
                        #127

                        @jimmy-loyens Ok now i found "some" info on the configuration via things/items files here:https://github.com/tobof/openhab2-addons/wiki/Configuration.

                        Is there anything more i should know about?

                        I configured an ethernet gateway and1 node with a temp, humidity, lightlevel and battery child. The battery child is not even showing up in paperUI, the other 3 are showing up as a thing (and online, bridge allso) but in control tab of paperUI all channels are shown as NaN.

                        1 Reply Last reply
                        0
                        • J jimmy loyens

                          Hello, I just started to use the mysensors binding 2.2 (moving from serial gateway to ethernet gateway to accomadate MYSController) and I have some (maybe stupid) questions I cant find the answers to (I have been poking around the forum though).

                          First off, I have a whole bunch of the same type nodes: child0=battery/child1=humidity/child2=temperature/child3=lightintensity/child4-9 are digital inputs for doors and windows. Are such nodes supported by the binding, and how to configure them? I can find temperature, humidity and lightlevel nodes in the list (paperUI) but how can i combine these?

                          Second, can the nodes be automaticly discovered by the binding? In my case i have to add them all manually.

                          Third, what are the var1-5 channels for? (is this the answer to my first question?)

                          Fourth, what is the difference between the two variable1 channels? in the channel name one says "var1" the other one says "custom"?

                          Fifth, is there a comprehencive tutorial out there on how to configure the nodes? (I have looked but cant seem to find one)

                          Sixed, when i add any sensor manualy i get a status for it of "UNINITIALIZED - HANDLER_INITIALIZING_ERROR ". The node ID/child ID is online sending data though.

                          am i using the latest stable version of the binding? I downloaded it a few weeks ago from eclipse market.

                          Any help would be appreciated

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

                          @jimmy-loyens said in openHAB 2.2 binding:

                          Hello, I just started to use the mysensors binding 2.2 (moving from serial gateway to ethernet gateway to accomadate MYSController) and I have some (maybe stupid) questions I cant find the answers to (I have been poking around the forum though).

                          First off, I have a whole bunch of the same type nodes: child0=battery/child1=humidity/child2=temperature/child3=lightintensity/child4-9 are digital inputs for doors and windows. Are such nodes supported by the binding, and how to configure them? I can find temperature, humidity and lightlevel nodes in the list (paperUI) but how can i combine these?

                          Second, can the nodes be automaticly discovered by the binding? In my case i have to add them all manually.

                          Yes they can. Use the openhab-mysensors-2.4.0-snapshot binding and they will appear.

                          Third, what are the var1-5 channels for? (is this the answer to my first question?)

                          Good question. I wonder that myself. When you know it please tell me.

                          Fourth, what is the difference between the two variable1 channels? in the channel name one says "var1" the other one says "custom"?

                          Fifth, is there a comprehencive tutorial out there on how to configure the nodes? (I have looked but cant seem to find one)

                          No there isn't. I think it would be a great idea to write something.

                          Sixed, when i add any sensor manualy i get a status for it of "UNINITIALIZED - HANDLER_INITIALIZING_ERROR ". The node ID/child ID is online sending data though.

                          I resolved a lot of those messages by restarting the complete OpenHAB. Not cool, but works.

                          am i using the latest stable version of the binding? I downloaded it a few weeks ago from eclipse market.

                          Use this:

                          http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar

                          Any help would be appreciated

                          J 1 Reply Last reply
                          1
                          • G Guillermo Schimmel

                            @jimmy-loyens said in openHAB 2.2 binding:

                            Hello, I just started to use the mysensors binding 2.2 (moving from serial gateway to ethernet gateway to accomadate MYSController) and I have some (maybe stupid) questions I cant find the answers to (I have been poking around the forum though).

                            First off, I have a whole bunch of the same type nodes: child0=battery/child1=humidity/child2=temperature/child3=lightintensity/child4-9 are digital inputs for doors and windows. Are such nodes supported by the binding, and how to configure them? I can find temperature, humidity and lightlevel nodes in the list (paperUI) but how can i combine these?

                            Second, can the nodes be automaticly discovered by the binding? In my case i have to add them all manually.

                            Yes they can. Use the openhab-mysensors-2.4.0-snapshot binding and they will appear.

                            Third, what are the var1-5 channels for? (is this the answer to my first question?)

                            Good question. I wonder that myself. When you know it please tell me.

                            Fourth, what is the difference between the two variable1 channels? in the channel name one says "var1" the other one says "custom"?

                            Fifth, is there a comprehencive tutorial out there on how to configure the nodes? (I have looked but cant seem to find one)

                            No there isn't. I think it would be a great idea to write something.

                            Sixed, when i add any sensor manualy i get a status for it of "UNINITIALIZED - HANDLER_INITIALIZING_ERROR ". The node ID/child ID is online sending data though.

                            I resolved a lot of those messages by restarting the complete OpenHAB. Not cool, but works.

                            am i using the latest stable version of the binding? I downloaded it a few weeks ago from eclipse market.

                            Use this:

                            http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar

                            Any help would be appreciated

                            J Offline
                            J Offline
                            jimmy loyens
                            wrote on last edited by
                            #129

                            @guillermo-schimmel thanks for the very detailed anser 😀

                            J 1 Reply Last reply
                            0
                            • J jimmy loyens

                              @guillermo-schimmel thanks for the very detailed anser 😀

                              J Offline
                              J Offline
                              jimmy loyens
                              wrote on last edited by jimmy loyens
                              #130
                              This post is deleted!
                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                jimmy loyens
                                wrote on last edited by
                                #131
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • K Offline
                                  K Offline
                                  Klabbe
                                  wrote on last edited by
                                  #132

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

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


                                  16

                                  Online

                                  11.7k

                                  Users

                                  11.2k

                                  Topics

                                  113.0k

                                  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