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.4k 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.
  • 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
                                • MasMatM Offline
                                  MasMatM Offline
                                  MasMat
                                  wrote on last edited by
                                  #23

                                  I'm still unsuccesful.
                                  Do I need to reinstall all the files as well? I didn't find a new set of instructions.

                                  In my /etc/openhab2/services-folder I have:
                                  mqtt-eventbus.cfg containing just

                                  broker=mosquitto
                                  

                                  and org.eclipse.smarthome.mqttbroker.cfg:

                                  name=mosquitto
                                  host=127.0.0.1
                                  secure=false
                                  port=1883
                                  secure=false
                                  username=XXXX
                                  password=YYYYY
                                  retain=false
                                  clientId=openhabMys
                                  

                                  openhab.log everything mysensors related:

                                  2018-07-09 06:40:36.782 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho175068223000 and file store '/var/lib/openhab2/mqtt/127.0.0.1'
                                  2018-07-09 06:40:37.050 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTING - org.openhab.binding.mysensors
                                  2018-07-09 06:40:37.075 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTED - org.openhab.binding.mysensors
                                  2018-07-09 06:40:37.206 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=119, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=17} - org.openhab.binding.mysensors
                                  2018-07-09 06:42:36.466 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole)
                                  2018-07-09 06:42:36.685 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
                                  2018-07-09 06:42:37.484 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
                                  2018-07-09 06:42:38.136 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
                                  2018-07-09 06:42:38.178 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5]
                                  2018-07-09 06:42:38.608 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog
                                  2018-07-09 06:42:38.830 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=281, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors
                                  2018-07-09 06:42:38.897 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan
                                  2018-07-09 06:42:38.926 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
                                  

                                  Anyone spot what's still wrong?

                                  P.S. I remember seeing someone got MyS gateway to log to a different file. Does anyone know how to implement that in the ./configure -command? Or how can I do that?

                                  jogantJ 1 Reply Last reply
                                  0
                                  • MasMatM MasMat

                                    I'm still unsuccesful.
                                    Do I need to reinstall all the files as well? I didn't find a new set of instructions.

                                    In my /etc/openhab2/services-folder I have:
                                    mqtt-eventbus.cfg containing just

                                    broker=mosquitto
                                    

                                    and org.eclipse.smarthome.mqttbroker.cfg:

                                    name=mosquitto
                                    host=127.0.0.1
                                    secure=false
                                    port=1883
                                    secure=false
                                    username=XXXX
                                    password=YYYYY
                                    retain=false
                                    clientId=openhabMys
                                    

                                    openhab.log everything mysensors related:

                                    2018-07-09 06:40:36.782 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho175068223000 and file store '/var/lib/openhab2/mqtt/127.0.0.1'
                                    2018-07-09 06:40:37.050 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTING - org.openhab.binding.mysensors
                                    2018-07-09 06:40:37.075 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTED - org.openhab.binding.mysensors
                                    2018-07-09 06:40:37.206 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=119, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=17} - org.openhab.binding.mysensors
                                    2018-07-09 06:42:36.466 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole)
                                    2018-07-09 06:42:36.685 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
                                    2018-07-09 06:42:37.484 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
                                    2018-07-09 06:42:38.136 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
                                    2018-07-09 06:42:38.178 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5]
                                    2018-07-09 06:42:38.608 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog
                                    2018-07-09 06:42:38.830 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=281, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors
                                    2018-07-09 06:42:38.897 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan
                                    2018-07-09 06:42:38.926 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
                                    

                                    Anyone spot what's still wrong?

                                    P.S. I remember seeing someone got MyS gateway to log to a different file. Does anyone know how to implement that in the ./configure -command? Or how can I do that?

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

                                    @masmat two things come to my mind: I have two different broker-names for eventbus connection and mysensors connection. For eventbus binding you need classic mqtt1 binding with its own configuration like this:

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

                                    And second: can you show your mysensors bridge configuration? Not shure but debug log looks like an ethernet bridge and not a mqtt bridge.

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

                                      Not sure how to answer some of your questions...but here goes.
                                      configuration:

                                      sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
                                      

                                      I'm not sure what "eventbus"-binding is. Something I need to install in Paper UI?
                                      Is the configuration file mqtt-eventbus.cfg or something else? Should I try to install it? I have not installed the MQTT binding in OpenHab because at least originally the instructions said not to.

                                      jogantJ 1 Reply Last reply
                                      0
                                      • MasMatM MasMat

                                        Not sure how to answer some of your questions...but here goes.
                                        configuration:

                                        sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
                                        

                                        I'm not sure what "eventbus"-binding is. Something I need to install in Paper UI?
                                        Is the configuration file mqtt-eventbus.cfg or something else? Should I try to install it? I have not installed the MQTT binding in OpenHab because at least originally the instructions said not to.

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

                                        @masmat I just wanted to understand your configuration. So I read through whole thread and saw your problems began with upgrade to OH2.3.
                                        I mentioned eventbus as you wrote something about eventbus.cfg.
                                        You need eventbus only if you want to send all oh events to mqtt broker.
                                        I wanted to see your mqtt bridge configuration. You can either configure dynamicly via paper ui or you set it up via things file. The later is what I did. So here is my things file with bridge configuration.

                                        
                                        Bridge mysensors:bridge-mqtt:gateway [  brokerName="mosquittomys",
                                                                                topicPublish="mysensors1/in",
                                                                                topicSubscribe="mysensors1/out",
                                                                                startupCheckEnabled=true ] {
                                        
                                        }
                                        

                                        Here the brokername has to be the same as in mqttbroker.cfg. Fix topic names to match your mysensors gateway.
                                        Hope this is of any help.

                                        MasMatM 1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          shadowbreed
                                          wrote on last edited by
                                          #27
                                          This post is deleted!
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          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