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. Development
  3. how to ask a node to re-send presentation info

how to ask a node to re-send presentation info

Scheduled Pinned Locked Moved Development
9 Posts 4 Posters 2.9k 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.
  • jjkJ Offline
    jjkJ Offline
    jjk
    wrote on last edited by
    #1

    Hi everyone,
    apologies if this has been discussed before (I'm almost certain it must have), but I can't seem to find the answer in the forum...
    I have a mqtt-gateway setup and would like to send a command via mqtt to a node (ideally a broadcast to all nodes) to re-issue it's startup-presentation info (incl. child-sensor-id's and types).
    Thanks!

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      If it's an awake node, you can send I_PRESENT to it.

      https://github.com/mysensors/MySensors/blob/61a415c42281090d2a4eb0808ce9065674e96022/core/MySensorsCore.cpp#L385

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

        If you have a sleeping node will it respond when it awakes?

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          No, not unless you buffer these messages on the controller side and send when it wakes up (see smart sleep).

          1 Reply Last reply
          0
          • hekH hek

            If it's an awake node, you can send I_PRESENT to it.

            https://github.com/mysensors/MySensors/blob/61a415c42281090d2a4eb0808ce9065674e96022/core/MySensorsCore.cpp#L385

            jjkJ Offline
            jjkJ Offline
            jjk
            wrote on last edited by
            #5

            @hek thanks for the quick reply - would that be the internal command id 19 that controller/gateway needs to send to the node?

            hekH 1 Reply Last reply
            0
            • jjkJ jjk

              @hek thanks for the quick reply - would that be the internal command id 19 that controller/gateway needs to send to the node?

              hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              @jjk

              Yes

              1 Reply Last reply
              0
              • jjkJ Offline
                jjkJ Offline
                jjk
                wrote on last edited by
                #7

                o.k., thanks! - and is there a way to broadcast this to all nodes or would I have to send it individually to every node?

                tekkaT 1 Reply Last reply
                0
                • jjkJ jjk

                  o.k., thanks! - and is there a way to broadcast this to all nodes or would I have to send it individually to every node?

                  tekkaT Offline
                  tekkaT Offline
                  tekka
                  Admin
                  wrote on last edited by
                  #8

                  @jjk Send a C_INTERNAL|I_DISCOVER_REQUEST to the broadcast address (i.e. 255) - all active (=non-sleeping) nodes will reply with I_DISCOVER_RESPONSE and the parent ID as payload. As a second step, iterate over the replies and send C_INTERNAL|I_PRESENTATION to re-request the presentation messages.

                  1 Reply Last reply
                  3
                  • jjkJ Offline
                    jjkJ Offline
                    jjk
                    wrote on last edited by
                    #9

                    thanks, it works - in principle! I'm using smartSleep in my sketches and that causes the nodes to send heartbeat signals, which is o.k. But can it be, that the request for presentation is only received and responded to by the nodes when the node has sent a heartbeat? When I receive a regular sensor reading and fire back a presentation request, the node doesn't seem to care...?!

                    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.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