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. Noob : Cant get Sensor talking to gateway

Noob : Cant get Sensor talking to gateway

Scheduled Pinned Locked Moved Troubleshooting
38 Posts 7 Posters 5.0k Views 6 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.
  • mfalkviddM mfalkvidd

    @Angelo-Santagata the gateways are designed to be stateless. The stateless design makes it easy to implement a gateway on low-power hardware. It also makes it easier to correctly implement and verify the gateway functionality, and to troubleshoot if there are problems. If gateways had to remember which ids had been assigned, they would no longer be stateless.

    A Offline
    A Offline
    angeloS
    wrote on last edited by angeloS
    #17

    @mfalkvidd thanks, very impressive this mySensors stuff BTW

    mfalkviddM 1 Reply Last reply
    1
    • A angeloS

      @mfalkvidd thanks, very impressive this mySensors stuff BTW

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

      @angeloS thanks. I agree. I can't take credit for it though, most of the stuff was designed before I found the project :)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        manutremo
        wrote on last edited by
        #19

        Mistery solved :satisfied:

        1 Reply Last reply
        0
        • mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #20

          Does anyone have suggestions on a clearer log message? One that would make it easy to understand what is happening? If we could make the log clearer, other people could understand the reason quicker, saving time and frustration.

          A 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            Does anyone have suggestions on a clearer log message? One that would make it easy to understand what is happening? If we could make the log clearer, other people could understand the reason quicker, saving time and frustration.

            A Offline
            A Offline
            angeloS
            wrote on last edited by
            #21

            @mfalkvidd In my case I think if the log had said, No Controller provided SensorID, that would have been my first clue

            M 1 Reply Last reply
            1
            • A angeloS

              @mfalkvidd In my case I think if the log had said, No Controller provided SensorID, that would have been my first clue

              M Offline
              M Offline
              manutremo
              wrote on last edited by
              #22

              @angeloS Fully agree - a warning instead of just sending a message with an empty payload would have been easier to spot. Maybe something to propose in Github?

              mfalkviddM 1 Reply Last reply
              0
              • M manutremo

                @angeloS Fully agree - a warning instead of just sending a message with an empty payload would have been easier to spot. Maybe something to propose in Github?

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

                @manutremo which message are you referring to?

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

                  We could add a sample message, in the troubleshooting guide, when the node has no Node ID and the gateway is responding an empty message, so a Node ID must be defined in the sketch

                  mfalkviddM 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @manutremo which message are you referring to?

                    M Offline
                    M Offline
                    manutremo
                    wrote on last edited by
                    #25

                    @mfalkvidd Without being an specialist in the MySensors protocol, it could be something like

                    • a debug message at some point in the gateway log when a node ID is requested and there is no ID to provide (no controller available),

                    • something similar in the node log when an empty ID is provided form the gw

                    • additionally, a warning in the log parser to check the controller when the payload is empty.

                    mfalkviddM 1 Reply Last reply
                    0
                    • gohanG gohan

                      We could add a sample message, in the troubleshooting guide, when the node has no Node ID and the gateway is responding an empty message, so a Node ID must be defined in the sketch

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

                      @gohan and @manutremo when does the gateway respond with an empty message? I am not able to find that in the logs posted earlier in this thread.

                      M 1 Reply Last reply
                      0
                      • mfalkviddM mfalkvidd

                        @gohan and @manutremo when does the gateway respond with an empty message? I am not able to find that in the logs posted earlier in this thread.

                        M Offline
                        M Offline
                        manutremo
                        wrote on last edited by
                        #27

                        @mfalkvidd Just reviewed the gw log and you're right, the gw just doesn't answer... I guess in this case it's just not possible to separate the cases when the gateway doesn't have a controller, or is off, or communication didn't arrive, or... in all cases, the node seems to end up with a ID=255.

                        As I said, not familiar with the protocol...

                        1 Reply Last reply
                        0
                        • M manutremo

                          @mfalkvidd Without being an specialist in the MySensors protocol, it could be something like

                          • a debug message at some point in the gateway log when a node ID is requested and there is no ID to provide (no controller available),

                          • something similar in the node log when an empty ID is provided form the gw

                          • additionally, a warning in the log parser to check the controller when the payload is empty.

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

                          @manutremo the gateway is just a dumb forwarder. When the ID request is received from the sensor node, the gateway forwards that message to it's configured interface (mqtt, ethernet, serial, ...). If the controller responds, the gateway will forward the response.

                          To do your suggested no 1, the gateway would have to keep track of all ID requests and set some time to know when the response from the controller is deemed too slow. That could probably be done, but would require quite a lot of work to get right and to keep compact enough to still fit the gateway in popular constrained devices like the atmega328.

                          The message in no 2 doesn't exist, as we have agreed on, so this is unfortunately not viable either.

                          Your suggestion no 3 sounds promising I think. Whenever the node prints !TSM:ID:FAIL, the log parser should spell out that the most likely cause is that no controller is present. I'm not sure how to update the log parser, but maybe @hek can chip in here? At the moment, the log parser seems unable to parse that message at all.

                          https://www.mysensors.org/apidocs/group__MyTransportgrp.html#details should be updated to mention the controller on the line where TSM ID FAIL is mentioned.

                          It would also be nice if the !TSM:ID:FAIL message was more verbose (for people who don't immediately use the log parser), but the log messages need to be kept very short to keep the binary size small.

                          1 Reply Last reply
                          0
                          • mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #29

                            A suggestion for updating the documentation is available at https://github.com/mysensors/MySensors/pull/984
                            Feedback is welcome.

                            1 Reply Last reply
                            0
                            • mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by
                              #30

                              Updated documentation is available here: https://ci.mysensors.org/job/MySensors/job/MySensors/job/PR-984/2/Doxygen_HTML/group__MyTransportgrp.html

                              1 Reply Last reply
                              0
                              • ahmedadelhosniA Offline
                                ahmedadelhosniA Offline
                                ahmedadelhosni
                                wrote on last edited by
                                #31

                                I have been facing the same problem all day today. Actually as far as I remember my old nodes used to setup the node assignation to AUTO by default.

                                Was that changed during the last month ? because I was busy at that period.

                                mfalkviddM 1 Reply Last reply
                                0
                                • ahmedadelhosniA ahmedadelhosni

                                  I have been facing the same problem all day today. Actually as far as I remember my old nodes used to setup the node assignation to AUTO by default.

                                  Was that changed during the last month ? because I was busy at that period.

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

                                  @ahmedadelhosni auto id has been default since inception, as far as I know. It was default 2.5 years ago when I first learned about MySensors. So nothing has changed.

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

                                    It defaults to Auto if no manual define is set, but it still needs a controller or just myscontroller application that keeps track of the IDs and assign new unused ones.

                                    1 Reply Last reply
                                    0
                                    • mfalkviddM mfalkvidd

                                      @ahmedadelhosni auto id has been default since inception, as far as I know. It was default 2.5 years ago when I first learned about MySensors. So nothing has changed.

                                      ahmedadelhosniA Offline
                                      ahmedadelhosniA Offline
                                      ahmedadelhosni
                                      wrote on last edited by
                                      #34

                                      @mfalkvidd That's what I know but as I have said, I have been facing the same error to assign an ID for my node and it was solved when I change it to static ID... strange !

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        angeloS
                                        wrote on last edited by
                                        #35

                                        i was thinking about this, perhaps as part of a welcome tutorial we connect the GW to a gateway (pick one , an easy one). And whilst doing this we simply explain why the Controller is needed.. this would help newbies like me from the start..

                                        Which controller.. well Ive been looking at openhab but settled on Homeassistant, appears more active that OH

                                        Angelo

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • A angeloS

                                          i was thinking about this, perhaps as part of a welcome tutorial we connect the GW to a gateway (pick one , an easy one). And whilst doing this we simply explain why the Controller is needed.. this would help newbies like me from the start..

                                          Which controller.. well Ive been looking at openhab but settled on Homeassistant, appears more active that OH

                                          Angelo

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

                                          @angeloS do you mean to add information to this page? https://www.mysensors.org/build/select_gateway

                                          The getting started guide already mentions (twice actually) that the controller is responsible for handling automatic node id assignment.

                                          If people don't read the getting started guide, will they really read the Select gateway page?

                                          rzyliusR 1 Reply Last reply
                                          1
                                          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