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. Serial GW and motion sensor functionning, but no activity between them

Serial GW and motion sensor functionning, but no activity between them

Scheduled Pinned Locked Moved Troubleshooting
28 Posts 5 Posters 192 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.
  • R Rolland

    @parachutesj Reading the library's API, I've understood that the node ID is defined automatically. I don't know how to find the info on seeing this is manually, if this is needed in my case. Can you help?

    parachutesjP Offline
    parachutesjP Offline
    parachutesj
    wrote on last edited by
    #9

    @Rolland as far as I know, you need a controller which assigns the node ID's - this of course means that you need a fully functioning setup from the beginning e.g. your gateway connected to a controller.
    As a workaround you could specify the node ID manually. see my other post.

    1 Reply Last reply
    1
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by
      #10

      @Rolland - The advice from @parachutesj is spot on! - You NEED a controller.

      The gateway is only a conduit through which communications from nodes to the controller flow. With no controller there is no flow of data and so you will see little traffic. A raspberry pi is all you need, then choose from the available software downloads to act as controller. Simple!

      parachutesjP 1 Reply Last reply
      1
      • skywatchS skywatch

        @Rolland - The advice from @parachutesj is spot on! - You NEED a controller.

        The gateway is only a conduit through which communications from nodes to the controller flow. With no controller there is no flow of data and so you will see little traffic. A raspberry pi is all you need, then choose from the available software downloads to act as controller. Simple!

        parachutesjP Offline
        parachutesjP Offline
        parachutesj
        wrote on last edited by
        #11

        @Rolland and you should put this into your code from both (if not there yet)

        #define MY_DEBUG 
        
        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rolland
          wrote on last edited by
          #12

          Ok guys, thanks a lot for all your advices. I understand better. @skywatch : my gateway is on USB port of a Raspberry Pi 3+ with Home Assitant. But on this side I don't understand fully how to configure the link between gateway and HA, or at least to see if everything is going normal. HA is powerful but there's so much to learn when you discover it.
          I'm discovering a lot of things in a little time : Mysensors, Home assistant, arduino...
          Thanks anyway for your help and kindness.
          @parachutesj , I'll modify my sketch and see what happens.

          skywatchS 1 Reply Last reply
          0
          • R Rolland

            Ok guys, thanks a lot for all your advices. I understand better. @skywatch : my gateway is on USB port of a Raspberry Pi 3+ with Home Assitant. But on this side I don't understand fully how to configure the link between gateway and HA, or at least to see if everything is going normal. HA is powerful but there's so much to learn when you discover it.
            I'm discovering a lot of things in a little time : Mysensors, Home assistant, arduino...
            Thanks anyway for your help and kindness.
            @parachutesj , I'll modify my sketch and see what happens.

            skywatchS Offline
            skywatchS Offline
            skywatch
            wrote on last edited by
            #13

            @Rolland The best way to see what is happening is to connect the gateway to the usb of a computer and open the serial monitor in the arduino IDE. Then you can see the values being sent by the nodes to test if it is working.
            @parachutesj suggestion to add my debug to the config is also needed for this, but then reflash the node without my debug before you plug it back into the pi as it can cause issues. I never used HA so can't help you with that side of things, sorry.

            1 Reply Last reply
            0
            • parachutesjP parachutesj

              try and put this into your code of the node

              #define MY_NODE_ID 2
              

              replace the number (2) for each further node with numbers between 1 and 255

              what happens then?

              R Offline
              R Offline
              Rolland
              wrote on last edited by
              #14

              @parachutesj said in Serial GW and motion sensor functionning, but no activity between them:

              try and put this into your code of the node

              #define MY_NODE_ID 2
              

              replace the number (2) for each further node with numbers between 1 and 255

              what happens then?

              Hi. Nothing change. I still got the same 3 debug lines, no sign of communication between node and gw...

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rolland
                wrote on last edited by
                #15

                I've also tried to clear the eeprom memory of the node, and flash again sensor sketch, but still the same problem... i've also tried to see if the motion sensor was working correctly, and made up a simple sketch with just the sensor and the Arduino, it's working fine.

                skywatchS 1 Reply Last reply
                0
                • R Rolland

                  I've also tried to clear the eeprom memory of the node, and flash again sensor sketch, but still the same problem... i've also tried to see if the motion sensor was working correctly, and made up a simple sketch with just the sensor and the Arduino, it's working fine.

                  skywatchS Offline
                  skywatchS Offline
                  skywatch
                  wrote on last edited by
                  #16

                  @Rolland Does the motion sensor go HIGH or LOW when activated?

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

                    as @electrik mentioned, the sensor node does not complete its initialization of the radio.

                    Therefore, it does not (yet) matter if node ID is defined, or how the motion sensor works. The node never reaches any of that stuff.

                    @Rolland if you can, replace the radio on the sensor node. If that doesn't help, try replacing the Arduino. Also try to disconnect everything but the power and the radio from the Arduino.

                    parachutesjP 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      as @electrik mentioned, the sensor node does not complete its initialization of the radio.

                      Therefore, it does not (yet) matter if node ID is defined, or how the motion sensor works. The node never reaches any of that stuff.

                      @Rolland if you can, replace the radio on the sensor node. If that doesn't help, try replacing the Arduino. Also try to disconnect everything but the power and the radio from the Arduino.

                      parachutesjP Offline
                      parachutesjP Offline
                      parachutesj
                      wrote on last edited by parachutesj
                      #18

                      @mfalkvidd true.
                      this is the log if the radio works and it does not have an ID. just uploaded to a blank Nano

                      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
                      3 TSM:INIT
                      4 TSF:WUR:MS=0
                      11 TSM:INIT:TSP OK
                      13 TSM:FPAR
                      15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      1024 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                      1029 TSF:MSG:FPAR OK,ID=0,D=1
                      2022 TSM:FPAR:OK
                      2023 TSM:ID
                      2024 TSM:ID:REQ
                      2027 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                      4034 TSM:ID
                      4035 TSM:ID:REQ
                      4037 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                      6045 TSM:ID
                      6046 TSM:ID:REQ
                      6048 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                      

                      and like this if the NODE_ID was set (here to 155)

                      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
                      3 TSM:INIT
                      4 TSF:WUR:MS=0
                      11 TSM:INIT:TSP OK
                      13 TSM:INIT:STATID=155
                      15 TSF:SID:OK,ID=155
                      16 TSM:FPAR
                      53 TSF:MSG:SEND,155-155-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      146 TSF:MSG:READ,0-0-155,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                      151 TSF:MSG:FPAR OK,ID=0,D=1
                      2060 TSM:FPAR:OK
                      2061 TSM:ID
                      2062 TSM:ID:OK
                      2064 TSM:UPL
                      2067 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
                      2079 TSF:MSG:READ,0-0-155,s=255,c=3,t=25,pt=1,l=1,sg=0:1
                      2084 TSF:MSG:PONG RECV,HP=1
                      2086 TSM:UPL:OK
                      2088 TSM:READY:ID=155,PAR=0,DIS=1
                      2093 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                      2100 TSF:MSG:READ,0-0-155,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                      2108 TSF:MSG:SEND,155-155-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
                      2116 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
                      4125 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=OK:Motion Sensor
                      4134 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
                      4143 TSF:MSG:SEND,155-155-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
                      4149 MCO:REG:REQ
                      4155 TSF:MSG:SEND,155-155-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
                      4170 TSF:MSG:READ,0-0-155,s=255,c=3,t=27,pt=1,l=1,sg=0:1
                      4175 MCO:PIM:NODE REG=1
                      4177 MCO:BGN:STP
                      4178 MCO:BGN:INIT OK,TSP=1
                      0
                      4188 TSF:MSG:SEND,155-155-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
                      4194 MCO:SLP:MS=120000,SMS=0,I1=1,M1=1,I2=255,M2=255
                      4199 MCO:SLP:TPD
                      

                      if I "kill" the radio, it looks like this, which is still different than what @Rolland got. But would be worth a try to replace the radio.

                      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
                      3 TSM:INIT
                      4 TSF:WUR:MS=0
                      11 !TSM:INIT:TSP FAIL
                      12 TSM:FAIL:CNT=1
                      14 TSM:FAIL:PDT
                      
                      1 Reply Last reply
                      1
                      • parachutesjP Offline
                        parachutesjP Offline
                        parachutesj
                        wrote on last edited by
                        #19

                        almost forgot:
                        to just eliminate the issues with ID, missing controller etc. You could test the radios with a simple NRF24 test script, just google "NRF24 test code" and you will find a bunch to test if the communication works between nodes and radios are ok.

                        1 Reply Last reply
                        0
                        • skywatchS Offline
                          skywatchS Offline
                          skywatch
                          wrote on last edited by
                          #20

                          Photos of your hardware would be good as 'nano clone' and 'nrf24' come in lots of types and qualities...

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Rolland
                            wrote on last edited by
                            #21

                            Hi everybody.
                            I'm progressing, thanks to you. Here is some more infos :

                            • @mfalkvidd and @electrik , ok thanks a lot, i'll put the ID part of the plan aside for a while. Following your advice, when I unplug everything but the power and radio, I've got some weird things happening, worst of all is a sudden crash and reboot of computer when I try to open serial link monitor... :-x
                            • @skywatch : nano clones are these ones, and nRF24L01+ are those ones.
                            • @parachutesj : i've tried some very good sketches and begin to see a little clearer about nrf24. Using TMRh20 libraries and sketches, I've tried to make a couple of radios+nanos to communicate. The result I got is not so good : One radio just made my computer reboot :-x , while the two others seem more stable, BUT, when sending the ping between the two of them, the serial link console freezes for a little while, then shows back the sketch from the beginning. From what I've been reading, I think this could be a power supply problem (this post, "Power problems" section. I'll try to connect capacitors between VCC and GND of radios to avoid this "freeze" and "reboot" symptoma.

                            Next steps for me would be (I think) :

                            • see if capacitors can do the job and solve the problem
                            • try some other radio modules maybe ?
                            • try an official Arduino nano maybe ?

                            Again, thank you all for your help !

                            skywatchS parachutesjP 2 Replies Last reply
                            1
                            • R Rolland

                              Hi everybody.
                              I'm progressing, thanks to you. Here is some more infos :

                              • @mfalkvidd and @electrik , ok thanks a lot, i'll put the ID part of the plan aside for a while. Following your advice, when I unplug everything but the power and radio, I've got some weird things happening, worst of all is a sudden crash and reboot of computer when I try to open serial link monitor... :-x
                              • @skywatch : nano clones are these ones, and nRF24L01+ are those ones.
                              • @parachutesj : i've tried some very good sketches and begin to see a little clearer about nrf24. Using TMRh20 libraries and sketches, I've tried to make a couple of radios+nanos to communicate. The result I got is not so good : One radio just made my computer reboot :-x , while the two others seem more stable, BUT, when sending the ping between the two of them, the serial link console freezes for a little while, then shows back the sketch from the beginning. From what I've been reading, I think this could be a power supply problem (this post, "Power problems" section. I'll try to connect capacitors between VCC and GND of radios to avoid this "freeze" and "reboot" symptoma.

                              Next steps for me would be (I think) :

                              • see if capacitors can do the job and solve the problem
                              • try some other radio modules maybe ?
                              • try an official Arduino nano maybe ?

                              Again, thank you all for your help !

                              skywatchS Offline
                              skywatchS Offline
                              skywatch
                              wrote on last edited by
                              #22

                              @Rolland I was hoping you'd post a photo of what you have made so we can see the wiring etc.... But, you have unshielded pa/lna radio modules and I suggest getting some non-pa/lna ones from cdebyte on aliexpress.

                              How are you powering the radios?
                              What are you using to power the nano?

                              1 Reply Last reply
                              1
                              • parachutesjP Offline
                                parachutesjP Offline
                                parachutesj
                                wrote on last edited by
                                #23

                                @Rolland unfortunately I have to confirm what @skywatch said: the radios are crap. I had those and never made good experience with them. Also the amplified long range radios are not really needed in most cases and if, then they need a really good power source to run otherwise I never got stable connections.
                                Besides, any cheap NRF24 from China worked quite well for me. Some very few were faulty but if you get 10 for 7 USD you can live with that
                                https://www.aliexpress.com/item/32518935864.html?spm=a2g0o.productlist.0.0.686fe77cXL8wSb&algo_pvid=ad7873cd-c5ff-4de5-8f42-f1648f896a0b&algo_expid=ad7873cd-c5ff-4de5-8f42-f1648f896a0b-1&btsid=0ab6d70515882563711402031e6ae8&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
                                Not saying those are the best, but easier than the PA-ones.

                                1 Reply Last reply
                                0
                                • R Rolland

                                  Hi everybody.
                                  I'm progressing, thanks to you. Here is some more infos :

                                  • @mfalkvidd and @electrik , ok thanks a lot, i'll put the ID part of the plan aside for a while. Following your advice, when I unplug everything but the power and radio, I've got some weird things happening, worst of all is a sudden crash and reboot of computer when I try to open serial link monitor... :-x
                                  • @skywatch : nano clones are these ones, and nRF24L01+ are those ones.
                                  • @parachutesj : i've tried some very good sketches and begin to see a little clearer about nrf24. Using TMRh20 libraries and sketches, I've tried to make a couple of radios+nanos to communicate. The result I got is not so good : One radio just made my computer reboot :-x , while the two others seem more stable, BUT, when sending the ping between the two of them, the serial link console freezes for a little while, then shows back the sketch from the beginning. From what I've been reading, I think this could be a power supply problem (this post, "Power problems" section. I'll try to connect capacitors between VCC and GND of radios to avoid this "freeze" and "reboot" symptoma.

                                  Next steps for me would be (I think) :

                                  • see if capacitors can do the job and solve the problem
                                  • try some other radio modules maybe ?
                                  • try an official Arduino nano maybe ?

                                  Again, thank you all for your help !

                                  parachutesjP Offline
                                  parachutesjP Offline
                                  parachutesj
                                  wrote on last edited by
                                  #24

                                  @Rolland don't bother with official Arduino (imho). the clones work flawless. I have a lot here in my home and they work well. It is just not worth it to pay 10x the price

                                  1 Reply Last reply
                                  0
                                  • skywatchS Offline
                                    skywatchS Offline
                                    skywatch
                                    wrote on last edited by
                                    #25

                                    @Rolland these are the modules I would recommend.....

                                    https://www.aliexpress.com/item/4000186023497.html

                                    1 Reply Last reply
                                    1
                                    • R Offline
                                      R Offline
                                      Rolland
                                      wrote on last edited by
                                      #26

                                      Hello everybody. Ok, I've made some shopping, according to your advices, waiting for items to arrive. Until then, see you soon and take care, thanks again. I'll post the results of the new combination, hoping for success.
                                      Ciao.

                                      skywatchS 1 Reply Last reply
                                      2
                                      • R Rolland

                                        Hello everybody. Ok, I've made some shopping, according to your advices, waiting for items to arrive. Until then, see you soon and take care, thanks again. I'll post the results of the new combination, hoping for success.
                                        Ciao.

                                        skywatchS Offline
                                        skywatchS Offline
                                        skywatch
                                        wrote on last edited by skywatch
                                        #27

                                        @Rolland That is good news - what capacitors did you get for the NRF24's ???

                                        R 1 Reply Last reply
                                        0
                                        • skywatchS skywatch

                                          @Rolland That is good news - what capacitors did you get for the NRF24's ???

                                          R Offline
                                          R Offline
                                          Rolland
                                          wrote on last edited by
                                          #28

                                          @skywatch I've got some 10 µF and 100 µF electrolytic capacitors, and just received a bunch of other various capacitors, ranging from 1 to 470 µF. I haven't tested them for now.
                                          But good news ! I also received 3 NRF24L01+ with built in antennas, reset the entire crew of nodes and gateway, and it works like a charm :blush:
                                          I'm more than happy. Thanks again for all your advices.
                                          I'll post some news later, testing the capacitors with NRF24L01+ and antennas.
                                          Ciao.

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


                                          13

                                          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