[SOLVED] My node fails to send
David Muller last edited by Yveaux
Hello everyone, I'm new here.
I built my first project with the MySensors framework, and I don't know why I have communication issues.
Here's the hardware configuration :
- Sensor node : arduino nano with a DS18B20 and a NRF24L01+ (with 47µF cap on Vcc Gnd)
- Gateway : ESP8266 and NRF24L01+ (send MQTT message via wifi)
- Message decoder : Raspberry Pi 3B with node red
I can see on my Raspberry incomming MQTT messages when I subscribe to the topic, but the payload is always empty !
When I check the nodes console log, I see always the same error at the same moment.
Here is what I get in the console (sensor node)
16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
33 TSM:INIT:TSP OK
336 TSF:MSG:FPAR OK,ID=0,D=1
20109 TSM:INIT:TSP OK
Here is the failed line using the log parser : "Transition to Failure state, consecutive failure counter is 1"
So I think this is why I never get a payload in my MQTT messages, the sensor node does'nt even send the sensor data, but I don't know why !
Have someone ever had the same situation ?
Thanks for your help.
@david-muller hi and welcome to the forum!
Your sensor node should either have a fixed node ID, or your controller should hand one out on request by the node.
As you're using node-red the easiest solution is to hardcore the node ID in the sensor node :
#define MY_NODE_ID 1
and place it before #include <MySensors.h>
If you don't want to hardcode node ID's then there is the option of using node-red-contrib-mysensors, and the MysController node within that package, as it can hand out node ids for you.
David Muller last edited by
Beautiful, I added the define and it works very good now !
Big thanks to you !!!