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. Troubleshooting
  3. MQTT Client Gateway - Retry

MQTT Client Gateway - Retry

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 2.5k Views 1 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.
  • B Offline
    B Offline
    britcowboy
    wrote on last edited by
    #1

    Hi Folks,

    I came across an issue where sometimes a MQTT message sent to an actuator using the MQTT Client Gateway fails (http://forum.mysensors.org/topic/524/mqtt-client-gateway/32) which means that OpenHAB think's the actuator is in one state, when in actual fact it's in another. In my case it's a Servo connected to a Thermostat to control my heating - so OpenHAB sends a message to turn it off, but it didn't get through, and it doesn't seem like it's retried - so the heating stays on - obviously this is a problem!

    Is there a way to resend the data if it didn't go through correctly?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      britcowboy
      wrote on last edited by
      #2

      After testing. It seems like it's happening more often than not. I might have to send the same mqtt instruction 4 times before the sensor moves the servo.

      I unfortunately can't debug the gateway as I have to compile it with debug off for the mqtt client gateway to fit on my uno.

      1 Reply Last reply
      0
      • FotoFieberF Offline
        FotoFieberF Offline
        FotoFieber
        Hardware Contributor
        wrote on last edited by
        #3

        In the original code I had to patch the payload according to Post 26 of the thread you quoted. This solved the issue you have for me.

        My new sensors all report back, their state, when they got changed. This has the advantage, that I can react on changes (e.g. in openHAB), if they are not made from outside (e.g. local switch)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          britcowboy
          wrote on last edited by
          #4

          Hi Foto,

          Thanks for the response, but I already had that code as I forked your code. I don't think the message is getting to the client full stop, the lights on the node don't flash when the node doesn't respond. It's almost as though I need the gateway to insist on getting an ack from the node, and it it doesn't get one, keep sending it till it does.

          The actual radio issue though strikes me as a power issue but, both the gateway and the node use 100uf capacitors which should provide enough reserve power to ensure the radios are fed well?

          1 Reply Last reply
          0
          • B Offline
            B Offline
            britcowboy
            wrote on last edited by
            #5

            I changed the radio to be powered by the external power supply (it can power both 3.3V and 5V) - and it's much more reliable until eventually it stops - I think the power supply struggles supplying both the servo and the radio.

            I'm going to try hooking up another Nano tonight to purely provide the 3.3V to the radio, see if that improves things.

            But I was wondering what the best power supplies people use to power this stuff? I do seem to have a lot of issues with reliable power. Also, I still would like to implement an ACK feature - I could get the sensor to send a state update on MQTT when the state changes I suppose, but would be nice if the ACK's were built in.

            AWIA 1 Reply Last reply
            0
            • B britcowboy

              I changed the radio to be powered by the external power supply (it can power both 3.3V and 5V) - and it's much more reliable until eventually it stops - I think the power supply struggles supplying both the servo and the radio.

              I'm going to try hooking up another Nano tonight to purely provide the 3.3V to the radio, see if that improves things.

              But I was wondering what the best power supplies people use to power this stuff? I do seem to have a lot of issues with reliable power. Also, I still would like to implement an ACK feature - I could get the sensor to send a state update on MQTT when the state changes I suppose, but would be nice if the ACK's were built in.

              AWIA Offline
              AWIA Offline
              AWI
              Hero Member
              wrote on last edited by
              #6

              @britcowboy take a look at the conversation a lot has been written on power and supplies

              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