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. Sensor doesn´t reconnect after connecting lost!?

Sensor doesn´t reconnect after connecting lost!?

Scheduled Pinned Locked Moved Troubleshooting
23 Posts 6 Posters 7.0k Views 5 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #2

    Is it possible to see anything in the gateway log when this happens?

    1 Reply Last reply
    0
    • vgaV Offline
      vgaV Offline
      vga
      wrote on last edited by
      #3

      the controller gateway doesn´t write anything to the log, when the sensor lose connection.

      when I start the sensor, it connects to the controller correctly. But wenn it is out of range, the connection will be lost, of course.
      but if the sensor is back in reachable distance, it will not be reconnecting.
      the Serial output of the sensor still stands at the above written lines, and do nothing anymore.

      only a restart of the sensor will establish a new connection.

      Is there a function for the sensor sketch to reconnect, when connection is broken?

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

        The broadcast message used when searching for parents is only transmitted once unlike the normal messages which is transmitted in quick bursts of several resends. So broadcasts is less likely to be picked up.

        Not sure what could be the issue for you. I suspect the usual powering/shielding issues.

        1 Reply Last reply
        0
        • vgaV Offline
          vgaV Offline
          vga
          wrote on last edited by
          #5

          @hek, thanks for your help so far!
          The sensor sends every 10 seconds data to the gateway.
          When the sensor is out of range, the transmitting fails 6 times and then stuck in "find parent" and do nothing anymore.
          Is there any counter, which catch the failed transmits in line?
          Does the "find parent" mode repeat in any intervals?
          may it is possible to repeat the interval more often?

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

            @vga said:

            Is there any counter, which catch the failed transmits in line?

            Yes, 5 failed sends in a row that triggers it.
            https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyTransport.h#L27

            Does the "find parent" mode repeat in any intervals?

            Every time you try to send a new value and parent is lost, it will retry.

            Do you see a lot of transmission error when the node starts up?

            1 Reply Last reply
            0
            • vgaV Offline
              vgaV Offline
              vga
              wrote on last edited by
              #7

              When node is in range of gateway, there are no transmission errors on node when startup, and since the node stay in range, all went fine.

              so, when node went out of range and 5 transmits in row fails, the node starts to find the gateway again, but only for one time, and then hangs up.

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

                Weird... and you're sure the sketch continuous to run (and calls send)? It doesn't hang for some other reason in your code?

                1 Reply Last reply
                0
                • vgaV Offline
                  vgaV Offline
                  vga
                  wrote on last edited by
                  #9

                  no, i think the sketch doesn´t work anymore.
                  In Serial Monitor, after 5 fails, i can see the node calls "find parent" for one time, and after that there is nothing more happening in the serial monitor.

                  but the sketch works fine all the time when transmutation is OK.

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

                    It looks like you might be overwriting MySensor's routing information. That is likely to interfere with the node's ability to communicate. You should only write to EEPROM_LOCAL_CONFIG_ADDRESS and above.

                    1 Reply Last reply
                    0
                    • vgaV Offline
                      vgaV Offline
                      vga
                      wrote on last edited by vga
                      #11

                      hm, i´ve changed my eprom_write function, so that i only write to dresses above EEPROM_LOCAL_CONFIG_ADDRESS.
                      this is 0x123 -> address 291, and now i begin to write at 300.

                      but still the problem persists, after losing connection, no reconnect. :confused:

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

                        If you haven't already, run the clearEeprom sketch (Examples->MySensors). That will clear the corrupt routing table and let the sensor build a new table.

                        If you eant, you can use MySesnor's saveState (described at https://www.mysensors.org/download/sensor_api_15#the-full-api ) instead of keeping track of the address manually. saveState will always write above the local config address.

                        1 Reply Last reply
                        0
                        • vgaV Offline
                          vgaV Offline
                          vga
                          wrote on last edited by
                          #13

                          @mfalkvidd
                          now i´ve clears the EEPROM, and completely removed the part from sketch, with writing anything to EEPROM.

                          still the same issue.
                          i´m thinking about to rase the counter of fails in row, till connecting will be reinitialized.
                          Sure, this is not the best way to do, but till i have no other clue, the best workaround for keeping it working.

                          Or any more other ideas? ;)

                          1 Reply Last reply
                          0
                          • vgaV Offline
                            vgaV Offline
                            vga
                            wrote on last edited by
                            #14

                            btw,
                            i downloaded the new library folder from github repo, thinking maybe there are some changes with this issue.

                            Now i see, the whole MySensor function is changed, and i have to edit my sketches for the new way!?

                            before update, i have to do this:
                            MySensor gw;

                            and now, this part is complete removed, am I right??

                            is there any announcement for this changes? didn´t find anything about these changes.

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

                              There is a conversion guide here:
                              https://docs.google.com/document/d/1NKq5uuNdnxF5jWnum7VT32mbKLjuvqlx2A5D1qQ-H3Q/edit

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

                                There is no announcement because it has not been released yet :)
                                The default branch on github is the development (non-stable, non-released) version. It is assumed that developers use github and regular users use the download links in the official documentation (which points to the released version).

                                1 Reply Last reply
                                0
                                • vgaV Offline
                                  vgaV Offline
                                  vga
                                  wrote on last edited by
                                  #17

                                  @hek said:

                                  Yes, 5 failed sends in a row that triggers it.
                                  https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyTransport.h#L27

                                  oh, ok, I understand :)
                                  ...the link above refers to the beta, and i was wondering, why my library contains something else than this... so i just wait, thanks ;)

                                  ...but any other idea for the real topic issue? ;)

                                  1 Reply Last reply
                                  0
                                  • vgaV Offline
                                    vgaV Offline
                                    vga
                                    wrote on last edited by vga
                                    #18

                                    Hi!
                                    still have no solution for the topic-problem. :disappointed:

                                    i tested both, the stable v1.5 mySensors and the beta v2.0.

                                    Both are working till connection is lost, then both version doesn´t reconnect. Same behavior again.

                                    i didn´t think it is because of some hardware issue, because it works, till connection is lost.
                                    also my code is reduced to the minimum, for testing this option, but same issue again.

                                    so there must be a problem with the "find parent" function.
                                    it looks like, when connection is lost and 5 send commands in line has been failed, the "find parent" is calling, but for some reason, the node sketch crashes.

                                    the last serial monitor output from node is this:

                                    find parent
                                    send: 48-48-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
                                    

                                    ...and I got this only for one time, then nothing happens anymore, also my usual sketch operations doesn´t operate anymore and didn't make serial outputs.

                                    Is there nothing more i can do?? how does the reconnect is working normally?

                                    corbinC 1 Reply Last reply
                                    0
                                    • vgaV vga

                                      Hi!
                                      still have no solution for the topic-problem. :disappointed:

                                      i tested both, the stable v1.5 mySensors and the beta v2.0.

                                      Both are working till connection is lost, then both version doesn´t reconnect. Same behavior again.

                                      i didn´t think it is because of some hardware issue, because it works, till connection is lost.
                                      also my code is reduced to the minimum, for testing this option, but same issue again.

                                      so there must be a problem with the "find parent" function.
                                      it looks like, when connection is lost and 5 send commands in line has been failed, the "find parent" is calling, but for some reason, the node sketch crashes.

                                      the last serial monitor output from node is this:

                                      find parent
                                      send: 48-48-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
                                      

                                      ...and I got this only for one time, then nothing happens anymore, also my usual sketch operations doesn´t operate anymore and didn't make serial outputs.

                                      Is there nothing more i can do?? how does the reconnect is working normally?

                                      corbinC Offline
                                      corbinC Offline
                                      corbin
                                      wrote on last edited by
                                      #19

                                      @vga
                                      I'm having a similar problem, my battery powered motion sensors do not reconnect after going out of range, or when the controller is restarted. Restarting the sensor will allow it to reconnect to the controller.

                                      My mains powered motion sensors will reconnect automatically after the controller is restarted (I haven't tried taking them out of range whilst powered up). One battery powered motion sensor that is connected through a repeater node will stay connected/reconnect after the controller is restarted.

                                      I've cleared eeprom using the sketch on https://www.mysensors.org/build/debug, for the controller and all nodes.

                                      I've tried with and without a capacitor on the radios.

                                      I've started with the 1.5 API and also the new 2.0 API.

                                      The battery powered nodes are all running a Sensebender Micro with 2 x 1.2v NiMH batteries, nRF24L01+ (from Itead), and a HC-SR501 PIR (running on the 3.3v input as on http://techgurka.blogspot.com.au/2013/05/cheap-pyroelectric-infrared-pir-motion.html).

                                      My next ideas are to try normal 1.5v batteries, powering the PIR from 5v on a separate power supply, and Arduino mini pros instead of Sensebenders.

                                      Regards,
                                      Corbin

                                      tekkaT 1 Reply Last reply
                                      0
                                      • bjacobseB Offline
                                        bjacobseB Offline
                                        bjacobse
                                        wrote on last edited by
                                        #20

                                        Hi I have something similar, not sure if this is related to mysensors or the Agocontrol Home Automation.
                                        My scenario; My Agocontrol crashed due to corrupted SD card on my RPI, due to power outtage.
                                        I installed Agocontroll from scratch on a new SD card. copied most of my Agocontrol configuration files. (So I have now learned to use UPS for power backup)

                                        Then I plugged in my Zwave, Tellstick, Mysensors serial gateway (ver 1.5.4) and none of my sensors was accepted by the serial gateway.

                                        I would assume that all sensors would be found and accepted? But instead I have to reset each Arduino Pro Mini on the sensors, and this is for both battery powered and for Arduino Nano that is powered from mains via 5V USB PS

                                        1 Reply Last reply
                                        0
                                        • corbinC corbin

                                          @vga
                                          I'm having a similar problem, my battery powered motion sensors do not reconnect after going out of range, or when the controller is restarted. Restarting the sensor will allow it to reconnect to the controller.

                                          My mains powered motion sensors will reconnect automatically after the controller is restarted (I haven't tried taking them out of range whilst powered up). One battery powered motion sensor that is connected through a repeater node will stay connected/reconnect after the controller is restarted.

                                          I've cleared eeprom using the sketch on https://www.mysensors.org/build/debug, for the controller and all nodes.

                                          I've tried with and without a capacitor on the radios.

                                          I've started with the 1.5 API and also the new 2.0 API.

                                          The battery powered nodes are all running a Sensebender Micro with 2 x 1.2v NiMH batteries, nRF24L01+ (from Itead), and a HC-SR501 PIR (running on the 3.3v input as on http://techgurka.blogspot.com.au/2013/05/cheap-pyroelectric-infrared-pir-motion.html).

                                          My next ideas are to try normal 1.5v batteries, powering the PIR from 5v on a separate power supply, and Arduino mini pros instead of Sensebenders.

                                          Regards,
                                          Corbin

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

                                          @corbin Can you provide debug logs (on 2.0.0) of both, GW and node, showing what you described?

                                          corbinC 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          7

                                          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