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. Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

Scheduled Pinned Locked Moved OpenHAB
60 Posts 19 Posters 15.5k Views 23 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.
  • A Offline
    A Offline
    andre_m87
    wrote on last edited by
    #3

    Hey,

    same Problem here. After upgrading to OpenHAB 2.3 i receive the same errors in my /var/log/openhab2/openhab.log

    2018-05-31 16:28:42.776 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto
    2018-05-31 16:28:42.918 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
    
    T 1 Reply Last reply
    0
    • A andre_m87

      Hey,

      same Problem here. After upgrading to OpenHAB 2.3 i receive the same errors in my /var/log/openhab2/openhab.log

      2018-05-31 16:28:42.776 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto
      2018-05-31 16:28:42.918 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
      
      T Offline
      T Offline
      TimO
      Hero Member
      wrote on last edited by
      #4

      @andre_m87 & @MasMat : I have the same problem here. Looks like a change in the OpenHAB MQTT implementation.
      I'm working on it.

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

        @andre_m87 & @MasMat : I found a solution and indeed the MQTT implementation in OH2 (ESH) changed. This was a hard nut to crack, so it took me a while.

        Here are the steps you need to do:

        1. Rename: org.eclipse.smarthome.mqtt.cfg to org.eclipse.smarthome.mqttbroker.cfg
        2. Change the content to:
        name=mosquitto
        host=192.168.2.3
        secure=false
        port=1883
        username=USERNAME
        password=PASSWORD
        retain=false
        

        If you're using a secure connection (SSL): change secure to true and use the correct port.

        Another intersting feature in OpenHAB 2.3 is the embedded broker, so there is no need to have a separate MQTT server up and running.

        jogantJ 1 Reply Last reply
        1
        • T TimO

          @andre_m87 & @MasMat : I found a solution and indeed the MQTT implementation in OH2 (ESH) changed. This was a hard nut to crack, so it took me a while.

          Here are the steps you need to do:

          1. Rename: org.eclipse.smarthome.mqtt.cfg to org.eclipse.smarthome.mqttbroker.cfg
          2. Change the content to:
          name=mosquitto
          host=192.168.2.3
          secure=false
          port=1883
          username=USERNAME
          password=PASSWORD
          retain=false
          

          If you're using a secure connection (SSL): change secure to true and use the correct port.

          Another intersting feature in OpenHAB 2.3 is the embedded broker, so there is no need to have a separate MQTT server up and running.

          jogantJ Offline
          jogantJ Offline
          jogant
          wrote on last edited by jogant
          #6

          @timo unfortunately this solution doesn't work for me.
          After update oh to version 2.3 I don't get mqtt to work. Prior I used mqtt for mysensors and for eventbus. I configured two broker connections and set up a mysensors-mqtt-bridge via things-file. In the broker all events from openhab arrived and all mysensors-messages arrived in openhab.
          After update mysensors doesn't work at all, allthough I followed your instructions. If I setup mqtt1 binding I can see eventbus messages in mqtt broker but my mysensors-mqtt-gateway remains initializing.

          What I'm doing wrong?

          T 1 Reply Last reply
          0
          • jogantJ jogant

            @timo unfortunately this solution doesn't work for me.
            After update oh to version 2.3 I don't get mqtt to work. Prior I used mqtt for mysensors and for eventbus. I configured two broker connections and set up a mysensors-mqtt-bridge via things-file. In the broker all events from openhab arrived and all mysensors-messages arrived in openhab.
            After update mysensors doesn't work at all, allthough I followed your instructions. If I setup mqtt1 binding I can see eventbus messages in mqtt broker but my mysensors-mqtt-gateway remains initializing.

            What I'm doing wrong?

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

            @jogant Yeah. :-( There are still some problems with 2.3 to fix. The binding works fine within the development IDE, but only there. I'm still looking into it.

            1 Reply Last reply
            0
            • MasMatM Offline
              MasMatM Offline
              MasMat
              wrote on last edited by
              #8

              Did that, MQTT bridge stuck at "initializing". Not the full answer yet, but thanks @timo for your effort!

              Openhab.log when I checked the Services - MQTT in Paper UI

              2018-06-08 00:59:19.162 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
              2018-06-08 00:59:19.221 [WARN ] [me.config.core.internal.ConfigMapper] - Could not set field value for field 'port': For input string: "1883.0"
              java.lang.NumberFormatException: For input string: "1883.0"
              	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
              	at java.lang.Integer.parseInt(Integer.java:580) [?:?]
              	at java.lang.Integer.valueOf(Integer.java:766) [?:?]
              	at org.eclipse.smarthome.config.core.internal.ConfigMapper.objectConvert(ConfigMapper.java:159) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
              	at org.eclipse.smarthome.config.core.internal.ConfigMapper.as(ConfigMapper.java:98) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
              	at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:54) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
              	at org.eclipse.smarthome.io.transport.mqtt.internal.MqttBrokerConnectionServiceInstance.modified(MqttBrokerConnectionServiceInstance.java:77) [207:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh230]
              	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
              	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
              	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
              	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
              	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:772) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:727) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:645) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) [41:org.apache.felix.scr:2.0.12]
              	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2090) [8:org.apache.felix.configadmin:1.8.16]
              	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2058) [8:org.apache.felix.configadmin:1.8.16]
              	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
              	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
              	at java.lang.Thread.run(Thread.java:748) [?:?]
              2018-06-08 00:59:19.340 [WARN ] [.MqttBrokerConnectionServiceInstance] - Ignore existing broker connection configuration for: mosquitto```
              T 1 Reply Last reply
              0
              • MasMatM MasMat

                Did that, MQTT bridge stuck at "initializing". Not the full answer yet, but thanks @timo for your effort!

                Openhab.log when I checked the Services - MQTT in Paper UI

                2018-06-08 00:59:19.162 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
                2018-06-08 00:59:19.221 [WARN ] [me.config.core.internal.ConfigMapper] - Could not set field value for field 'port': For input string: "1883.0"
                java.lang.NumberFormatException: For input string: "1883.0"
                	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
                	at java.lang.Integer.parseInt(Integer.java:580) [?:?]
                	at java.lang.Integer.valueOf(Integer.java:766) [?:?]
                	at org.eclipse.smarthome.config.core.internal.ConfigMapper.objectConvert(ConfigMapper.java:159) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
                	at org.eclipse.smarthome.config.core.internal.ConfigMapper.as(ConfigMapper.java:98) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
                	at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:54) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
                	at org.eclipse.smarthome.io.transport.mqtt.internal.MqttBrokerConnectionServiceInstance.modified(MqttBrokerConnectionServiceInstance.java:77) [207:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh230]
                	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
                	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
                	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
                	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:772) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:727) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:645) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) [41:org.apache.felix.scr:2.0.12]
                	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2090) [8:org.apache.felix.configadmin:1.8.16]
                	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2058) [8:org.apache.felix.configadmin:1.8.16]
                	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
                	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
                	at java.lang.Thread.run(Thread.java:748) [?:?]
                2018-06-08 00:59:19.340 [WARN ] [.MqttBrokerConnectionServiceInstance] - Ignore existing broker connection configuration for: mosquitto```
                T Offline
                T Offline
                TimO
                Hero Member
                wrote on last edited by TimO
                #9

                @masmat please check your MQTT configuration. You're receiving an exception because it's trying to set "1883.0" for the value port.

                MasMatM 1 Reply Last reply
                0
                • T TimO

                  @masmat please check your MQTT configuration. You're receiving an exception because it's trying to set "1883.0" for the value port.

                  MasMatM Offline
                  MasMatM Offline
                  MasMat
                  wrote on last edited by
                  #10

                  @timo I did. I can't figure out where it's finding that .0 it adds to the 1883 port I have in the cfg-file

                  M 1 Reply Last reply
                  0
                  • CrankyCoderC Offline
                    CrankyCoderC Offline
                    CrankyCoder
                    wrote on last edited by
                    #11

                    How close is this for 2.3? Worth a try? or should I hold? Thanks for the work so far on it!

                    Home Automation Tinkerer
                    www.CrankyCoder.net

                    Controller: HomeAssistant in Kubernetes
                    Gateway: MQTTClientGateway
                    MySensors: 2.3

                    jogantJ 1 Reply Last reply
                    0
                    • CrankyCoderC CrankyCoder

                      How close is this for 2.3? Worth a try? or should I hold? Thanks for the work so far on it!

                      jogantJ Offline
                      jogantJ Offline
                      jogant
                      wrote on last edited by
                      #12

                      @crankycoder Unfortunately there are still issues with the mqtt implementation. I reverted back to 2.2 yesterday as all my fiddling didn't help.

                      1 Reply Last reply
                      0
                      • CrankyCoderC Offline
                        CrankyCoderC Offline
                        CrankyCoder
                        wrote on last edited by
                        #13

                        my setup is still just using the direct mqtt subscription so i will hold off.

                        is there any discovery working (in 2.2 that is) how about once you configure the things. do you get all the properties of that item from when it presents?

                        Home Automation Tinkerer
                        www.CrankyCoder.net

                        Controller: HomeAssistant in Kubernetes
                        Gateway: MQTTClientGateway
                        MySensors: 2.3

                        jogantJ 1 Reply Last reply
                        0
                        • CrankyCoderC CrankyCoder

                          my setup is still just using the direct mqtt subscription so i will hold off.

                          is there any discovery working (in 2.2 that is) how about once you configure the things. do you get all the properties of that item from when it presents?

                          jogantJ Offline
                          jogantJ Offline
                          jogant
                          wrote on last edited by
                          #14

                          @crankycoder in 2.2 with appropriate binding mysensors is working pretty well. All variables are presented with mysensors lib 2.2.
                          I only updated openhab to 2.3 as this release was presented on my debian system. But I didn't get 2.3 working with mysensors mqtt.

                          1 Reply Last reply
                          1
                          • CrankyCoderC Offline
                            CrankyCoderC Offline
                            CrankyCoder
                            wrote on last edited by
                            #15

                            I did an upgrade the other week from 1.8 to 2.2. Then right about the time I had some stuff working 2.3 came out. So I figured since I have to do all the learning curve anyways I might as well stick with 2.3. The variables being presented in mysensors would be HUGE for me. But hopefully it's not too far out.

                            Home Automation Tinkerer
                            www.CrankyCoder.net

                            Controller: HomeAssistant in Kubernetes
                            Gateway: MQTTClientGateway
                            MySensors: 2.3

                            1 Reply Last reply
                            0
                            • jogantJ Offline
                              jogantJ Offline
                              jogant
                              wrote on last edited by
                              #16

                              @TimO : are there any news concerning compatibility to version 2.3?
                              Thanks for your work!

                              T 1 Reply Last reply
                              0
                              • jogantJ jogant

                                @TimO : are there any news concerning compatibility to version 2.3?
                                Thanks for your work!

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

                                @jogant There already is a working version (2.4 SNAPSHOT) available on the marketplace and on my server. Please let me know if you expierence any problems.

                                jogantJ 1 Reply Last reply
                                0
                                • T TimO

                                  @jogant There already is a working version (2.4 SNAPSHOT) available on the marketplace and on my server. Please let me know if you expierence any problems.

                                  jogantJ Offline
                                  jogantJ Offline
                                  jogant
                                  wrote on last edited by
                                  #18

                                  @timo unfortunately this also does not work for me. I followed your manual very well but I always get errors. It starts after installing feature:install esh-io-transport-mqtt and mysensors binding:

                                  16:59:57.772 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
                                  16:59:57.806 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.96.8' with clientid paho1135997459230242 and file store '/var/lib/openhab2/mqtt/192.168.96.8'
                                  16:59:57.867 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - {}
                                  org.eclipse.paho.client.mqttv3.MqttException: MqttException
                                          at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38) [229:org.eclipse.paho.client.mqttv3:1.0.2]
                                          at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:604) [229:org.eclipse.paho.client.mqttv3:1.0.2]
                                          at java.lang.Thread.run(Thread.java:748) [?:?]
                                  Caused by: java.net.SocketException: Connection reset
                                          at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:?]
                                          at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:?]
                                          at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:?]
                                          at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:?]
                                          at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:?]
                                          at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) ~[?:?]
                                          at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[?:?]
                                          at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) ~[?:?]
                                          at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:89) ~[?:?]
                                          at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:590) ~[?:?]
                                          ... 1 more
                                  
                                  

                                  and reconection starts every 10 seconds.
                                  It must be interference with mqtt1 bindung that I use for eventbus.
                                  The mqtt-bridge remains Offline.
                                  What is wrong?

                                  T 1 Reply Last reply
                                  0
                                  • jogantJ jogant

                                    @timo unfortunately this also does not work for me. I followed your manual very well but I always get errors. It starts after installing feature:install esh-io-transport-mqtt and mysensors binding:

                                    16:59:57.772 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
                                    16:59:57.806 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.96.8' with clientid paho1135997459230242 and file store '/var/lib/openhab2/mqtt/192.168.96.8'
                                    16:59:57.867 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - {}
                                    org.eclipse.paho.client.mqttv3.MqttException: MqttException
                                            at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38) [229:org.eclipse.paho.client.mqttv3:1.0.2]
                                            at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:604) [229:org.eclipse.paho.client.mqttv3:1.0.2]
                                            at java.lang.Thread.run(Thread.java:748) [?:?]
                                    Caused by: java.net.SocketException: Connection reset
                                            at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:?]
                                            at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:?]
                                            at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:?]
                                            at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:?]
                                            at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:?]
                                            at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) ~[?:?]
                                            at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[?:?]
                                            at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) ~[?:?]
                                            at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:89) ~[?:?]
                                            at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:590) ~[?:?]
                                            ... 1 more
                                    
                                    

                                    and reconection starts every 10 seconds.
                                    It must be interference with mqtt1 bindung that I use for eventbus.
                                    The mqtt-bridge remains Offline.
                                    What is wrong?

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

                                    @jogant Indeed this looks like an error in your configuration. I suspect the MQTT configuration. Did you change the MQTT configuration according my posting above? I've also added a text to the Wiki. The name and content of the MQTT configuration differs between OpenHAB 2.2 and 2.3.

                                    jogantJ 2 Replies Last reply
                                    1
                                    • T TimO

                                      @jogant Indeed this looks like an error in your configuration. I suspect the MQTT configuration. Did you change the MQTT configuration according my posting above? I've also added a text to the Wiki. The name and content of the MQTT configuration differs between OpenHAB 2.2 and 2.3.

                                      jogantJ Offline
                                      jogantJ Offline
                                      jogant
                                      wrote on last edited by
                                      #20

                                      @timo with 2.2 I had two configurations which were very similar.
                                      I have one mosquitto mqtt broker on localhost, version 1.5.
                                      The mqtt1 binding is for my mqtt-eventbus connection is called mosquitto and the config file (mqtt.cfg) is as follows:

                                      mosquitto.url=tcp://192.168.96.8:1883
                                      mosquitto.retain=false
                                      mosquitto.clientId=openhab
                                      mosquitto.user=user
                                      mosquitto.pwd=pwd
                                      

                                      With OH2.2 this configuration works. It also works with 2.3 as I can see all openhab events on my mosquitto.
                                      My mysonsors binding is configured by org.eclipse.smarthome.mqttbroker.cfg config file which looks as follows:

                                      name=mosquittomys
                                      host=192.168.96.8
                                      port=1883
                                      retain=false
                                      username=username
                                      password=password
                                      clientId=openhabMys
                                      

                                      I also tried without authentication and also without clientId, all to no succuess.
                                      I cleaned /var/lib/openhab2/cache/ folder and /var/lib/openhab2/tmp/ folder.
                                      I looked at /var/lib/openhab2/config folder for resulting runtime configuration, but all looks fine. Do you have any further idea?

                                      1 Reply Last reply
                                      0
                                      • T TimO

                                        @jogant Indeed this looks like an error in your configuration. I suspect the MQTT configuration. Did you change the MQTT configuration according my posting above? I've also added a text to the Wiki. The name and content of the MQTT configuration differs between OpenHAB 2.2 and 2.3.

                                        jogantJ Offline
                                        jogantJ Offline
                                        jogant
                                        wrote on last edited by
                                        #21

                                        @timo I found the fault in my configuration: it was the missing secure=false config flag in the org.eclipse.smarthome.mqttbroker.cfg config file. I have no idea what happens when the flag is missing but without it one doesn't achieve a valid connection.

                                        name=mosquittomys
                                        host=192.168.96.8
                                        port=1883
                                        secure=false  <-- important !
                                        
                                        

                                        So now I have a working 2.3 installation! Thanks alot for your support.

                                        T 1 Reply Last reply
                                        1
                                        • jogantJ jogant

                                          @timo I found the fault in my configuration: it was the missing secure=false config flag in the org.eclipse.smarthome.mqttbroker.cfg config file. I have no idea what happens when the flag is missing but without it one doesn't achieve a valid connection.

                                          name=mosquittomys
                                          host=192.168.96.8
                                          port=1883
                                          secure=false  <-- important !
                                          
                                          

                                          So now I have a working 2.3 installation! Thanks alot for your support.

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

                                          @jogant Good catch! I'm glad it's working now! :-)

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


                                          11

                                          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