Serial GW and motion sensor functionning, but no activity between them
-
@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!
-
@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!
@Rolland and you should put this into your code from both (if not there yet)
#define MY_DEBUG -
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. -
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.@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. -
try and put this into your code of the node
#define MY_NODE_ID 2replace the number (2) for each further node with numbers between 1 and 255
what happens then?
@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 2replace 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...
-
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.
-
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.
-
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.
-
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.
@mfalkvidd true.
this is the log if the radio works and it does not have an ID. just uploaded to a blank Nano0 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:TPDif 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 -
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. -
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 !
-
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 !
@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? -
@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. -
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 !
@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
-
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. -
@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.