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. MQTT controller - ping but Connection timeout on MQTT clients

MQTT controller - ping but Connection timeout on MQTT clients

Scheduled Pinned Locked Moved Controllers
portnetworkingnrf24l01+mqttnrf24l01
17 Posts 6 Posters 11.3k Views 4 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.
  • gaduG Offline
    gaduG Offline
    gadu
    wrote on last edited by
    #7

    I'm pretty far from my computer today and tomorrow,but I'll check.
    I have the latest IDE at least.

    Meanwhile perhaps @ntruchsess himself can help? :)

    1 Reply Last reply
    0
    • caycoC Offline
      caycoC Offline
      cayco
      wrote on last edited by
      #8

      Last night I downloaded whole https://github.com/ntruchsess/MySensors/tree/mqttclient branch and tried to compile it - I got errors that ntruchsess supposed to fix in this branch (https://github.com/knolleary/pubsubclient/pull/47). Which is weird, I suspect some problems with my IDE... I will look into this today.

      1 Reply Last reply
      0
      • gaduG Offline
        gaduG Offline
        gadu
        wrote on last edited by
        #9

        I use the latest 1.0.6 IDE on Win7 and loaded the latest MySensor libraries
        https://github.com/mysensors/Arduino/
        Added the attached libraries and they compiled just fine for me...

        MyMQTTGateway.zip
        Note1: Included is MyMQTTGateway and Pubsubclient.

        Note2: This will make the gateway act as a MQTT client so you need Mosquitto (or similar) where you publish the topics from the gateway.

        Note3: Remember to change the IP and Mac.

        1 Reply Last reply
        1
        • caycoC Offline
          caycoC Offline
          cayco
          wrote on last edited by
          #10

          @gadu - thank you very much!

          In the meanwhile I managed to compile on @ntruchsess code. I got past compiler error and also I noticed that my baund rater for serial monitor was incorrect (so I couldn't see anything usefull). Anyway I got this:

          0;0;3;0;9;check wires

          On all controllers: MQTTGateway, Ethernet gateway, Serial... I checked those wires many times, even I switched the radio. No luck. Then I noticed that I bought NRF24L01 - the verison withot + at the and. It should be NRF24L01+

          Does it matter? I found that NRF24L01+ it differs only slightly from NRF24L01 version but I think that might be the casue. Anyone had such experience? It's hard to search for it on the forum since everyone is writing about NRF24L01+ only...

          B 1 Reply Last reply
          0
          • caycoC cayco

            @gadu - thank you very much!

            In the meanwhile I managed to compile on @ntruchsess code. I got past compiler error and also I noticed that my baund rater for serial monitor was incorrect (so I couldn't see anything usefull). Anyway I got this:

            0;0;3;0;9;check wires

            On all controllers: MQTTGateway, Ethernet gateway, Serial... I checked those wires many times, even I switched the radio. No luck. Then I noticed that I bought NRF24L01 - the verison withot + at the and. It should be NRF24L01+

            Does it matter? I found that NRF24L01+ it differs only slightly from NRF24L01 version but I think that might be the casue. Anyone had such experience? It's hard to search for it on the forum since everyone is writing about NRF24L01+ only...

            B Offline
            B Offline
            boozz
            wrote on last edited by
            #11

            @cayco
            Yes, the non-plus variant is pretty useless. You can make it work (select 1MBPS instead of 250 kbps), but the price you have to pay is the distance you can maintain between sensor nodes, repeater(s) and gateway.
            I personally invested many hours to get it working, but was very disappointed with the distance.
            I bought new radio's (nrf24l01+) and found out that I wasted my time 😔

            Succes!

            Boozz

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gambituk
              wrote on last edited by
              #12

              Just a THANK YOU for @gadu, the info above was exactly what i was looking for. Now i can continue with the rest of my project!! :+1:

              1 Reply Last reply
              0
              • gaduG Offline
                gaduG Offline
                gadu
                wrote on last edited by
                #13

                glad to help!

                1 Reply Last reply
                0
                • caycoC Offline
                  caycoC Offline
                  cayco
                  wrote on last edited by
                  #14

                  I also managed to get it working! Besides non '+' radio I did not have SoftSPI enabled. I thought that I do not need it since I have a Ethernet Shield version. After enabling MQTT Gateway and MQTT ClientGateway started.

                  Now it's time for some soldering to make a client :)

                  1 Reply Last reply
                  0
                  • gaduG Offline
                    gaduG Offline
                    gadu
                    wrote on last edited by
                    #15

                    great!

                    My working setup is
                    Sensors -> ETH MQTT ClientGateway -> Mosquitto -> OpenHAB

                    Capture.PNG

                    (sorry for the swedish)

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      TommySharp
                      wrote on last edited by
                      #16

                      @gadu

                      When I try your files I get this error when compiling...

                      Any ideas? I'm using the Arduino 1.6.3 application.

                      In file included from C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/MyMQTTClient.h:16:0,
                      from MyMQTTClient.ino:46:
                      C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/PubSubClient.h:72:46: error: section attribute not allowed for '<anonymous>'
                      boolean publish_P(char *, uint8_t PROGMEM *, unsigned int, boolean);

                      1 Reply Last reply
                      0
                      • gaduG Offline
                        gaduG Offline
                        gadu
                        wrote on last edited by
                        #17

                        @TommySharp
                        Hmm dont really remember, but I think this was the solution
                        https://github.com/knolleary/pubsubclient/issues/46

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


                        21

                        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