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. General Discussion
  3. Send message from gateway MQTT to controller

Send message from gateway MQTT to controller

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 1.2k Views 3 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.
  • M Offline
    M Offline
    miclane
    wrote on last edited by
    #1

    Hello,

    I have an MQTT gateway that dialogs with a controller that I developed.
    This works very well.
    I would like the gateway to give additional information to the controller when it connects to the network.
    For example, its IP address on the local network or its subscription topic.
    Is it possible to send information from an MQTT gateway to the controller during a presentation phase?

    Thank you.

    1 Reply Last reply
    0
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      Do you mean on the same topics as mysensors uses or on different ones?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        miclane
        wrote on last edited by
        #3

        On the same publish topic as mysensors gateway.
        Just when the gateway is on the network.

        During the presentation phase of the gateway mqtt, there is little information sent and I would like to complete it.
        Thank you.

        mfalkviddM 1 Reply Last reply
        0
        • M miclane

          On the same publish topic as mysensors gateway.
          Just when the gateway is on the network.

          During the presentation phase of the gateway mqtt, there is little information sent and I would like to complete it.
          Thank you.

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

          @miclane adding a "virtual" sensor locally on the gateway should work. Present the local sensor in the presentation() function, just like you would on any node. If you want to, you can send values the first time loop() is run. Use S_INFO or S_CUSTOM as sensor type and the corresponding V_ variables. Details on S_ and V_ types: https://www.mysensors.org/download/serial_api_20#sensor-types

          1 Reply Last reply
          0
          • M Offline
            M Offline
            miclane
            wrote on last edited by
            #5

            Thank you for this quick response.
            I test this solution which seems to me a bypass and I will make a return.
            Perhaps consider an evolution to allow directly the sending of information by the gateway like the nodes ...
            For other sensors I already use V_variables.
            Thank you.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              miclane
              wrote on last edited by
              #6

              I tested the solution proposed above.
              It works very well.
              I can send to the controller the subscription topic of the gateway, its IP address, etc. during the presentation phase of the gateway.
              Thanks again.

              mfalkviddM 1 Reply Last reply
              1
              • M miclane

                I tested the solution proposed above.
                It works very well.
                I can send to the controller the subscription topic of the gateway, its IP address, etc. during the presentation phase of the gateway.
                Thanks again.

                mfalkviddM Online
                mfalkviddM Online
                mfalkvidd
                Mod
                wrote on last edited by
                #7

                @miclane great! Thanks for reporting back.

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


                26

                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