No communication between Sensor and Gateway
-
I use version 1.5
@sundberg84
@samuel235
On the gateway I loaded the sketch SerialGateway.ino from the examples folder.
On the Sensor I loaded the sketch BinarySwitchSensor.ino from the examples folder.@jantup
No, I did not change anything on the example sketches, how do I assign an ID to the gateway and sensor? (I thought this was an automated proces?)Thanks for your replies!
-
If you have some sort of controller they assign the id (gateway is 0 by default). what does your serial logs lock like?
-
@sundberg84
My serials logs are on the OP -
@sundberg84
My serials logs are on the OP@Martien-Wijnands By the look of the logs i would say that your Gateway has a ID of 0 (Which is default). Now, the node needs to be assigned an ID. Some controllers do support auto assignment however, for troubleshooting at least i would force an ID on the node manually. To do so you need to edit "gw.begin()" on the sensor node sketch to read:
gw.begin(NULL, [NODE_ID], true)Just add a number between 1-254 (Any number that isn't already taken by another node on the network) in the above code. Remember to remove the square brackets too.
-
Sorry I didnt explain @Martien-Wijnands I was interested i how the node serial looks during startup, in OP it its only when you press the button? As samuel235 explains that can help setting a node ID but if you dont see the node in MYSController i dont think the node radio traffic reaches the gw...
Do you see anything about ST:Fail or ST:OK (or this was removed in 1.5? maybe, I never used 1.5).
-
Hi,
Sketches needs not to be changed. Node IDs are not encoded in software, they are data from MySensors perspective. Nodes doesn't manage IDs themselves, but any node need an ID in order to communicate. Assigning node IDs must be done from outside MySensors network and totally depends on the controller you use.
I use OpenHab as a controller, you can automate (code) ID assigning there.
Honestly, I myself am too lazy and still assign node IDs manually by sending appropriate string to controller's USB port the gateway is attached to from command line as a response to gateway when a node asks for ID on the nodes radio network. You can do the same without even having a controller, just attach the gateway node to a computer through USB, monitor what's incoming and send the right string back to the USB port when you see a node asking for the ID.
I was very surprised when I found out that MySensors nodes network is not self-sufficient in this sense. You can see how I figured it out here, but as I said, it really depends on the controller you use.
-
I use MYScontroller as the controller, when this works I plan for using domoticz.
@samuel235
The logs on the gateway;
0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.The logs on the node (after setting the node ID to 5)
find parent
send: 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
find parent
send: 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
find parent
send: 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
repeater started, id=5, parent=255, distance=255
find parent
send: 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
find parent
send: 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:No ST:Fail or ST:OK in both outputs. I really think my radio's are not sending/receiving data!
-
-
Hi,
did you solve the issue?
I have the same behavior between my Gateway (Arduino Nano 5V ) and just one sensor (Arduino Pro Mini 3.3V connected to PC USB port via Arduino UNO board). The Serial Monitor get just the same entries as yours.
Thank you. -
Hi @samuel235 , Yes, v1.5.
I also connected the caps between the radio Vcc and GND connectors to exclude power issues, but I wanted to recycle some pieces I already had, so I used 3.3 uF, could be the problem?
Thank you. -
It could possibly be, its all depending on your environment. I would like a hardware contributer to confirm or correct me on this one but i would change that cap to something higher, check the 'connecting the radio' page, don't quote me on this but i think the recommended is something like a 4.7uF to start with. I actually have 100uF on mine, i went over the top and was just being safe. However on my custom board thats in design stages i will be trying a 47uF.
It could quite possibly not be this thats the issue, but it would be step 1 of trial and error troubleshooting that i would take.
-
Hi,
I solved the issue. After reading many posts I went to check if my radio module was a real NRF24L01+ plus version, and I realized that one of the 5 modules I bought as one pack, the one connected to the serial gateway, is different. So I connected a real plus version and now is working!
Thank you. -
Hi,
I solved the issue!
My radio's were fake/defect.
I ordered some new radio's and they work like a charm!
Thanks for all your help and tips/tricks.