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. Discover network topology?

Discover network topology?

Scheduled Pinned Locked Moved Development
13 Posts 5 Posters 3.0k 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.
  • darkhorseD Offline
    darkhorseD Offline
    darkhorse
    wrote on last edited by
    #1

    Impressed by what MYSController does, I would like to add some functionality to my home-built controller to be able to view the network topology (i.e., which nodes are connected to which nodes by which routes). I suspect that the information that I need is hidden in the log messages that are received by the controller, but I haven't been able to decipher them.

    Can anyone tell me where I can find the information about the network topology that is apparently used by MYSController?

    (and while I'm at it: is there some kind of documentation that tells me what all the "internal" messages mean?)

    sundberg84S 1 Reply Last reply
    0
    • darkhorseD darkhorse

      Impressed by what MYSController does, I would like to add some functionality to my home-built controller to be able to view the network topology (i.e., which nodes are connected to which nodes by which routes). I suspect that the information that I need is hidden in the log messages that are received by the controller, but I haven't been able to decipher them.

      Can anyone tell me where I can find the information about the network topology that is apparently used by MYSController?

      (and while I'm at it: is there some kind of documentation that tells me what all the "internal" messages mean?)

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #2

      Hi! @darkhorse
      For documentation about the api check the website: https://www.mysensors.org/download/serial_api_20
      About the topology I dont think you can get more than the last node from the log messages. I know I have seen some discussion about it in the forum but cant find it now - try to make some searches.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      darkhorseD 1 Reply Last reply
      1
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #3

        https://forum.mysensors.org/topic/2680/data-stored-in-the-eeprom/1 has some example code how to extract the routing information (from EEPROM on a node)

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

          @darkhorse

          The parent node number comes from the payload in the I_CONFIG request that the node sends at startup (or when you send I_PRESENT request to the node).

          darkhorseD 1 Reply Last reply
          1
          • sundberg84S sundberg84

            Hi! @darkhorse
            For documentation about the api check the website: https://www.mysensors.org/download/serial_api_20
            About the topology I dont think you can get more than the last node from the log messages. I know I have seen some discussion about it in the forum but cant find it now - try to make some searches.

            darkhorseD Offline
            darkhorseD Offline
            darkhorse
            wrote on last edited by
            #5

            @sundberg84 Thanks! Unfortunately, the API does not tell me anything about the contents of the payload of internal messages like

            Init complete, id=0, parent=0, distance=0, registration=1
            TSP:MSG:READ 3-3-0 s=1,c=1,t=1,pt=7,l=5,sg=0:62.00
            TSP:SANCHK:OK
            
            

            I can guess what some of these things mean, but I would really like to read some documentation to make sure that my interpretations are correct.

            sundberg84S 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              https://forum.mysensors.org/topic/2680/data-stored-in-the-eeprom/1 has some example code how to extract the routing information (from EEPROM on a node)

              darkhorseD Offline
              darkhorseD Offline
              darkhorse
              wrote on last edited by
              #6

              @mfalkvidd Thanks. It might be the case that I can find each node's parent in the EEPROM, but I would like to be able to read the topology "run time". I.e., while the system is in production.

              @hek This might be what I was looking for, thanks, I'll try it out!

              1 Reply Last reply
              0
              • darkhorseD darkhorse

                @sundberg84 Thanks! Unfortunately, the API does not tell me anything about the contents of the payload of internal messages like

                Init complete, id=0, parent=0, distance=0, registration=1
                TSP:MSG:READ 3-3-0 s=1,c=1,t=1,pt=7,l=5,sg=0:62.00
                TSP:SANCHK:OK
                
                

                I can guess what some of these things mean, but I would really like to read some documentation to make sure that my interpretations are correct.

                sundberg84S Offline
                sundberg84S Offline
                sundberg84
                Hardware Contributor
                wrote on last edited by
                #7

                @darkhorse - check this then: https://forum.mysensors.org/topic/2579/about-serial-api-1-5/2

                Controller: Proxmox VM - Home Assistant
                MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                darkhorseD 1 Reply Last reply
                1
                • sundberg84S sundberg84

                  @darkhorse - check this then: https://forum.mysensors.org/topic/2579/about-serial-api-1-5/2

                  darkhorseD Offline
                  darkhorseD Offline
                  darkhorse
                  wrote on last edited by
                  #8

                  @sundberg84 Great, thanks!

                  (pity that there is no official doc, however, but this should suffice for now)

                  sundberg84S 1 Reply Last reply
                  0
                  • darkhorseD darkhorse

                    @sundberg84 Great, thanks!

                    (pity that there is no official doc, however, but this should suffice for now)

                    sundberg84S Offline
                    sundberg84S Offline
                    sundberg84
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    @darkhorse - check debug/faq/how to ask for help in the forum, its kind of official and you find it there as well.

                    Controller: Proxmox VM - Home Assistant
                    MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                    MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                    RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                    1 Reply Last reply
                    0
                    • hekH hek

                      @darkhorse

                      The parent node number comes from the payload in the I_CONFIG request that the node sends at startup (or when you send I_PRESENT request to the node).

                      darkhorseD Offline
                      darkhorseD Offline
                      darkhorse
                      wrote on last edited by
                      #10

                      @hek After a week, I've found some time to test your advice and tried to send the I_PRESENT-message to some of my nodes. The reply that I get unfortunately is not totally clear to me. Can you help me out some more? I've tried sending the message to nodes 1 (being closest to the gateway) and 4 (being far from the gateway and with some nodes in between). I got the following response:

                      Sent to module 1:

                      1;255;3;1;19;
                      

                      Received from module 1 (duplicate lines removed):

                      1;255;0;0;18;2.0.0
                      1;255;3;0;6;0
                      1;255;3;0;6;M
                      1;0;0;0;6;
                      1;1;0;0;7;
                      1;2;0;0;1;
                      

                      Sent to module 4:

                      4;255;3;1;19;
                      

                      Received from module 4 (duplicate lines removed):

                      4;255;3;0;6;3
                      4;255;3;0;6;M
                      4;255;0;0;18;2.0.0
                      4;255;3;0;6;3
                      4;2;0;0;3;
                      

                      If I had to guess, I'd say that the lines '1;255;3;0;6;0' and '4;255;3;0;6;3' are the ones that I am looking for. They seem to tell me that

                      • the parent of node 1 is node 0 (the gateway) and
                      • the parent of node 4 is node 3 (a node that is physically somewhere in between the gateway and node 4).

                      Before I draw conclusions, however, I'd really like to know if I'm correct. Can you confirm this? And if so, can I safely assume that any I_CONFIG-message received not containing an 'M' or 'I' in the payload tells me the parent-node?

                      Thank you very much!

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

                        Yes, you are right..

                        It's a little weird that you receive a message with the payload "M"... Are you sure that it isn't the outgoing reply we're seeing here? Node should not send in anything else with the config request.

                        darkhorseD 1 Reply Last reply
                        1
                        • hekH hek

                          Yes, you are right..

                          It's a little weird that you receive a message with the payload "M"... Are you sure that it isn't the outgoing reply we're seeing here? Node should not send in anything else with the config request.

                          darkhorseD Offline
                          darkhorseD Offline
                          darkhorse
                          wrote on last edited by
                          #12

                          @hek You are right, I forgot that I configured my controller to respond to a I_CONFIG request by sending an 'M'. Apparently, a config request and an answer to I_PRESENT are the same message, so my controller does not differentiate its behaviour.

                          Anyway, thanks for your fast reply, this really helps me out!

                          Y 1 Reply Last reply
                          1
                          • darkhorseD darkhorse

                            @hek You are right, I forgot that I configured my controller to respond to a I_CONFIG request by sending an 'M'. Apparently, a config request and an answer to I_PRESENT are the same message, so my controller does not differentiate its behaviour.

                            Anyway, thanks for your fast reply, this really helps me out!

                            Y Offline
                            Y Offline
                            ykhokhlov
                            wrote on last edited by
                            #13

                            @darkhorse Hi!
                            Did you eventually created a controller that draws a network topology? If yes, could you share it?

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


                            20

                            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