Skip to content
  • 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. MQTT Broker gateway
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

MQTT Broker gateway

Scheduled Pinned Locked Moved Controllers
132 Posts 34 Posters 115.6k Views 7 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.
  • FrancoisF Offline
    FrancoisF Offline
    Francois
    wrote on last edited by
    #45

    If I run the MQTTGateway my temperature shows in fahrenheit when I run the same nodes on a SerialGateway it is showing Celsius why will this be the case?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adrianmihai83
      wrote on last edited by adrianmihai83
      #46

      Downloaded from https://github.com/Damme/MQTTGateway latest MQTT Gateway (the one that responds on serial with "Ok!" not "Started!", with the modifications to MySensors.cpp) but no difference, still no sketch name and with the above settings, openHAB cannot control the relay sensor...

      I used the same arduino that is working with Temp_Humidity sensor so the setup is good, the relay pins are specified in the sketch. I used the Clean_Eeprom_Config before uploading, I even used other Arduino Uno, no diffrerence, still cannot control the relay sensor from openHAB.

      Anyone has a clue, a hint or something? The serial output from both the sensor and the gateway, together with openHAB configuration are two posts up.

      Edit: 3 hours later and managed to make many of the sensors (Door, Distance, Dust, Gas, Humidity, Light, Motion) everyone working in conjunction with MQTT Gateway and openHAB except the Relay one...

      Any help is appreciated.

      Regards,
      Adrian

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adrianmihai83
        wrote on last edited by
        #47

        Callback for incomming messages does not occur so I guess that the message does not get to the relay sensor. Is there someone that is using this with MQTT Gateway and openHAB?

        1 Reply Last reply
        0
        • FrancoisF Offline
          FrancoisF Offline
          Francois
          wrote on last edited by Francois
          #48

          @adrianmihai83 I was testing this today and it was working with the MQTTGateway. Here is my config file same as above:

          Switch node2_sw2 "Study Lights" (node2,all) { mqtt=">[mysensor:MyMQTT/2/1/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/2/1/V_LIGHT:command:OFF:0],<[mysensor:MyMQTT/2/1/V_LIGHT:command:MAP(1on0off.map)]" }

          Here is the info from the serial port monitor.

          upload-805fea56-06b2-4632-a2c0-fb8cd80a8ec5

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adrianmihai83
            wrote on last edited by adrianmihai83
            #49

            Will test it tomorrow morning and come back with result, what i see is exactly the same configuration, the only difference is that your's is on the 3'rd node and mine on 1'st node. Anyway, will see.

            Thank you for your answer.

            I am still waiting for my other NRF24L01 ( I ordered 30 pcs), they will arive this week. Maybe there is a problem running the sketch on node one, id 0. Tomorrow I will go and buy 2 of the NRF24 from a store even if they are 4 times more expensive, this not working is killing me :)

            1 Reply Last reply
            0
            • A Offline
              A Offline
              adrianmihai83
              wrote on last edited by adrianmihai83
              #50

              Why is the broker offering me the same id for all of the sensors? I start the first one, broker offers me id 0, without disconnecting it I connect the second sensor and the gateway offers me same id, id=0.

              I have cleared eeprom to both of them and see the requesting id first time i power them up, but still same id for both...

              Edit 1:

              Defined static ID and the relay works, didn't modify anything, just static ID 2 to the relay...

              Edit 2:

              Just tested with ID 0, 1 and 2 and I can confirm that the relay does NOT work with ID 0, it's almost a week now and I have tried everything and the answer was as simple as this: does not work with ID 0.

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                Zeph
                Hero Member
                wrote on last edited by
                #51

                By ID do you mean node ID? If so, the gateway has node ID 0, so I'm not surprised if it's not good for other nodes.

                But you may be talking about a child ID or something else.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  adrianmihai83
                  wrote on last edited by
                  #52

                  Yes, I am talking about node ID, but what I can tell you is that until two days ago I didn't assigned node ID manual and I didn't have 3 NRF's to test with gateway + 2 nodes. Only when I got other RF's and made a couple of sensors saw that the gateway is assigning node ID 0 to all of the sensors, and all sensors worked, for example:

                  1. temp humidity node had Node ID 0 and Child 0 and 1, and from openHAB I could use them at MYMQTT/0/0/V_HUM and MYMQTT/0/1/V_TEMP
                  2. motion sensor at MYMQTT/0/2/V_MOTION
                  3. and do on, other 2 sensors, all I had to take care is that all of them had distinct Child ID

                  Only when I got other NRF's and could make sensors and use them in paralel saw that the gateway is offering NODE ID 0 to all of my sensors, I don't know why, checked MYMQTT.h and it was set to auto assign Node ID, even in the statemant gateway.begin() assumes that the gateway should auto assign Node ID, and gw.begin(incomingMessage, AUTO, true) states it clear that relay sensor should get Node ID from the gateway.

                  All I did is manual assigned nodes for every one and workking like a charm. I simply like it this way, it let's more control, it's simply more "my way".

                  Now I want to combine some of the sensors and use a Mega2560 for this, hoping for a nice outcome.

                  1 Reply Last reply
                  0
                  • JohnJ Offline
                    JohnJ Offline
                    John
                    Plugin Developer
                    wrote on last edited by John
                    #53
                    This post is deleted!
                    DammeD 1 Reply Last reply
                    0
                    • JohnJ John

                      This post is deleted!

                      DammeD Offline
                      DammeD Offline
                      Damme
                      Code Contributor
                      wrote on last edited by
                      #54

                      @John Could you send me log from MQTTgateway also? (or tcpdump)

                      JohnJ 1 Reply Last reply
                      0
                      • DammeD Damme

                        @John Could you send me log from MQTTgateway also? (or tcpdump)

                        JohnJ Offline
                        JohnJ Offline
                        John
                        Plugin Developer
                        wrote on last edited by
                        #55
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          toomij
                          wrote on last edited by
                          #56

                          I have a next problem:
                          OpenHAB (192.168.1.3) <-> Arduino GW mqtt (192.168.1.234:1883)<-> Arduino TEMP (DHT)

                          org.eclipse.paho.client.mqttv3.MqttException: ═х єфрхЄё  яюфъы■ўшЄ№ё  ъ ёхЁтхЁє
                          at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
                          workModule.java:75)
                          at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Cli
                          entComms.java:538)
                          at java.lang.Thread.run(Unknown Source)
                          Caused by: java.net.ConnectException: Connection timed out: connect
                          at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
                          at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
                          at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
                          at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
                          at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
                          at java.net.PlainSocketImpl.connect(Unknown Source)
                          at java.net.SocksSocketImpl.connect(Unknown Source)
                          at java.net.Socket.connect(Unknown Source)
                          at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
                          workModule.java:66)
                          at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Cli
                          entComms.java:538)
                          at java.lang.Thread.run(Unknown Source)

                          with ping everything is ok.
                          test

                          1 Reply Last reply
                          0
                          • JohnJ Offline
                            JohnJ Offline
                            John
                            Plugin Developer
                            wrote on last edited by John
                            #57
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              toomij
                              wrote on last edited by
                              #58

                              I connected the serial to MQTT GW:
                              If I have connected Wiznet, I've got "0;0;3;0;9;check wires",
                              if i disconnected Wiznet then got "Started!"

                              1 Reply Last reply
                              0
                              • JohnJ Offline
                                JohnJ Offline
                                John
                                Plugin Developer
                                wrote on last edited by
                                #59

                                @Damme
                                You can forget about my posts, after some quite intensive debugging i found out there was an ugly inconsistent race condition going on in my app. Issue is gone now.

                                1 Reply Last reply
                                1
                                • K Offline
                                  K Offline
                                  kihotx
                                  wrote on last edited by
                                  #60

                                  Could anyone help me with running MQTTGateway with enc28j60 ethernet module? Should a gateway respond to ping? Openhab says 'no route to host'. Should i change anything else than Ethernet.h to UIPEthernet.h in source code ?

                                  1 Reply Last reply
                                  1
                                  • DammeD Offline
                                    DammeD Offline
                                    Damme
                                    Code Contributor
                                    wrote on last edited by
                                    #61

                                    I just wanted to say hello again to everyone. I had to disappear for a while. Just had too much for my brain to handle. So all my automation project were on halt but will be continued again.

                                    I know there are lot of bugs in this GW and I will hopefullt start developing soon again. Just write your experience you had so far and I'll try to keep up :)

                                    //Damme

                                    CARSTENC 1 Reply Last reply
                                    0
                                    • JohnJ Offline
                                      JohnJ Offline
                                      John
                                      Plugin Developer
                                      wrote on last edited by
                                      #62

                                      @Damme Good luck!

                                      1 Reply Last reply
                                      0
                                      • DammeD Damme

                                        I just wanted to say hello again to everyone. I had to disappear for a while. Just had too much for my brain to handle. So all my automation project were on halt but will be continued again.

                                        I know there are lot of bugs in this GW and I will hopefullt start developing soon again. Just write your experience you had so far and I'll try to keep up :)

                                        //Damme

                                        CARSTENC Offline
                                        CARSTENC Offline
                                        CARSTEN
                                        wrote on last edited by
                                        #63

                                        @Damme I tried today the mysensor 1.4.1 library, uploaded with Arduino 1.5.8 to UNO with Ethernet Shield (W5100) and an NRF24L01+pa+lna. Compilation and upload worked fine.
                                        I can ping the IP address defined in the MQTTGateway.ino sketch.
                                        I maintained on my RPI the openhab.cfg file with the url and port number from the gateway.
                                        When starting the openhab it shows:
                                        ... - MQTT Service initialization completed.
                                        ... - Starting MQTT broker connection 'mysensor'.

                                        Then a couple of message later:
                                        ...Mqtt Exception
                                        Caused by: java.net.SocketTimeoutException: connect timed out

                                        Any suggestion what I could look at.

                                        I also tried to work with the development library of Mysensors but did not get very far with that. My ultimate goal is to something like a moteino with the RFM69HW radio module in connection with either openhab or pidome.
                                        I have a quite a bit of hardware lying around here so I am happy to do any testing if somebody gives me some guidance.
                                        Thanks.

                                        C 1 Reply Last reply
                                        0
                                        • CARSTENC CARSTEN

                                          @Damme I tried today the mysensor 1.4.1 library, uploaded with Arduino 1.5.8 to UNO with Ethernet Shield (W5100) and an NRF24L01+pa+lna. Compilation and upload worked fine.
                                          I can ping the IP address defined in the MQTTGateway.ino sketch.
                                          I maintained on my RPI the openhab.cfg file with the url and port number from the gateway.
                                          When starting the openhab it shows:
                                          ... - MQTT Service initialization completed.
                                          ... - Starting MQTT broker connection 'mysensor'.

                                          Then a couple of message later:
                                          ...Mqtt Exception
                                          Caused by: java.net.SocketTimeoutException: connect timed out

                                          Any suggestion what I could look at.

                                          I also tried to work with the development library of Mysensors but did not get very far with that. My ultimate goal is to something like a moteino with the RFM69HW radio module in connection with either openhab or pidome.
                                          I have a quite a bit of hardware lying around here so I am happy to do any testing if somebody gives me some guidance.
                                          Thanks.

                                          C Offline
                                          C Offline
                                          C.r.a.z.y.
                                          wrote on last edited by
                                          #64
                                          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


                                          16

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular