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. Locally attached sensors are hanging with MQTT Gateway (W5100 LAN Interface)

Locally attached sensors are hanging with MQTT Gateway (W5100 LAN Interface)

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 618 Views 2 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.
  • G Offline
    G Offline
    gryzli133
    wrote on last edited by
    #1

    Dear all,

    I have a centrally controlled system for my Lights and Blinds. I use Arduino MEGA with Ethernet shield and MQTT Gateway. There is no radio, it is cotrolling only locally attached sensors (Lights and Blinds -> buttons and relays). When I have good LAN connection everything is working fine, but when I disconnect the cable, or switch off the Router, then it is not responding. The serial is printing this info only:
    (...)
    1879015 GWT:TPC:IP=0.0.0.0
    1880017 GWT:RMQ:MQTT RECONNECT
    1880321 GWT:TPC:IP=0.0.0.0
    1881324 GWT:RMQ:MQTT RECONNECT
    (...)

    Is there a way to say, that locally sensors and logic have a priority if there is problem with connection?

    mfalkviddM 1 Reply Last reply
    0
    • G gryzli133

      Dear all,

      I have a centrally controlled system for my Lights and Blinds. I use Arduino MEGA with Ethernet shield and MQTT Gateway. There is no radio, it is cotrolling only locally attached sensors (Lights and Blinds -> buttons and relays). When I have good LAN connection everything is working fine, but when I disconnect the cable, or switch off the Router, then it is not responding. The serial is printing this info only:
      (...)
      1879015 GWT:TPC:IP=0.0.0.0
      1880017 GWT:RMQ:MQTT RECONNECT
      1880321 GWT:TPC:IP=0.0.0.0
      1881324 GWT:RMQ:MQTT RECONNECT
      (...)

      Is there a way to say, that locally sensors and logic have a priority if there is problem with connection?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @gryzli133 yes. Use MY_TRANSPORT_WAIT_READY_MS

      If you search the forum for that keyword you'll find some helpful discussions and code.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gryzli133
        wrote on last edited by
        #3

        I forgot to mention, I already use this at the beginning:

        #define MY_TRANSPORT_WAIT_READY_MS 1

        It is working for Serial Gateway, but seems no to work with MQTT Gateway....

        mfalkviddM 1 Reply Last reply
        0
        • G gryzli133

          I forgot to mention, I already use this at the beginning:

          #define MY_TRANSPORT_WAIT_READY_MS 1

          It is working for Serial Gateway, but seems no to work with MQTT Gateway....

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @gryzli133 sorry about that. MY_TRANSPORT_WAIT_READY_MS is used for communication between MySensor nodes.

          There doesn't seem to be a similar parameter for the connection between the gateway and the controller/broker.

          G 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @gryzli133 sorry about that. MY_TRANSPORT_WAIT_READY_MS is used for communication between MySensor nodes.

            There doesn't seem to be a similar parameter for the connection between the gateway and the controller/broker.

            G Offline
            G Offline
            gryzli133
            wrote on last edited by
            #5

            @mfalkvidd can it be requested as new feature? For serial gateway this works without any problems...

            mfalkviddM 1 Reply Last reply
            0
            • G gryzli133

              @mfalkvidd can it be requested as new feature? For serial gateway this works without any problems...

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              @gryzli133 MySensors is a community project. Anyone is welcome to wish for, or contribute new features. See https://www.mysensors.org/download/contributing for a guide on how to get started in case you want to contribute.

              As can be seen in the comment on https://github.com/mysensors/MySensors/blob/development/core/MyGatewayTransportSerial.cpp#L37 Serial prints are always deemed successful, regardless if the serial is connected or not (the Arduino can not know if someone is listening or if the sent messages are lost). There is no need to reconnect a serial port, so writing to serial never disturbs the rest of the code. That's why the serial gateway doesn't have any problems with disconnections. I am not familiar with the mqtt code, so I don't know how much effort would be required to develop a solution.

              Hopefully someone familiar with the mqtt code has som spare time to assist you, in case you need help.

              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