Node not working with existing Gateway



  • I have a very simple test scenario:

    • 1 Gateway
    • 2 Nodes

    Each of them running on the same HW (NodeMCU) with the same Radio (NRFL24+) and using the same sensor (BME280).

    Gateway is running correctly with the MySensors MQTT Gateway sketch, and it's receiving messages from the 1st Node running the MySensors Passive Node sketch.

    I'm trying to insert a 2nd Node into the system: using same HW and same Sketch as the first but I keep hitting this error:

    16:22:31.136 ->  
    16:22:31.136 ->  __  __       ____
    16:22:31.136 -> |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    16:22:31.171 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    16:22:31.171 -> | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    16:22:31.171 -> |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
    16:22:31.171 ->         |___/                      2.3.2-beta
    16:22:31.171 -> 
    16:22:31.171 -> 105 MCO:BGN:INIT NODE,CP=RNNNE---,FQ=80,REL=4,VER=2.3.2-beta
    16:22:31.171 -> 122 TSM:INIT
    16:22:31.171 -> 123 TSF:WUR:MS=0
    16:22:31.171 -> 130 TSM:INIT:TSP OK
    16:22:31.171 -> 132 TSM:INIT:STATID=125
    16:22:31.205 -> 134 TSF:SID:OK,ID=125
    16:22:31.205 -> 136 TSM:FPAR
    16:22:31.205 -> 137 TSM:FPAR:STATP=0
    16:22:31.205 -> 139 TSM:ID
    16:22:31.205 -> 140 TSM:ID:OK
    16:22:31.205 -> 142 TSM:UPL
    16:22:33.444 -> 2395 !TSF:MSG:SEND,125-125-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    16:22:35.443 -> 4402 TSM:UPL
    

    Can't really understand why this second node isn't working, since the HW and the sketch are identical to the first one. (of course NodeID and ChildID are different).

    On Gateway I'm reading this:

    16:42:51.662 -> 37431 TSF:MSG:PINGED,ID=2,HP=1
    16:42:51.724 -> 37496 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    

    The sketch I'm using for the Node is this one:

    // Enable debug prints
    #define MY_DEBUG
    #define MY_NODE_ID 2
    #define MY_PARENT_NODE_ID 0
    #define MY_PARENT_NODE_IS_STATIC
    #define MY_RADIO_RF24
    #define MY_RF24_DATARATE RF24_1MBPS
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_RF24_CE_PIN D3
    #include <MySensors.h>
    #include <SPI.h> 
    #include <Wire.h>
    #include "BlueDot_BME280.h"
    BlueDot_BME280 bme280 = BlueDot_BME280();
    #define LONG_WAIT 500
    #define SHORT_WAIT 150
    #define SECURE_WAIT 60000
    #define SKETCH_NAME "FloHouse Garage"
    #define SKETCH_VERSION "v5.0"
    #define TEMP_CHILD_ID 7
    #define HUM_CHILD_ID 8
    #define BARO_CHILD_ID 9
    uint32_t SLEEP_TIME = 15000; 
    bool metric = true;
    MyMessage temperatureMsg(TEMP_CHILD_ID, V_TEMP);
    MyMessage humidityMsg(HUM_CHILD_ID, V_HUM);
    MyMessage pressureMsg(BARO_CHILD_ID, V_PRESSURE);
    
    void preHwInit()
    {
    Wire.setClock(100000);
    bme280.parameter.communication = 0;
    bme280.parameter.I2CAddress = 0x76;
    bme280.parameter.sensorMode = 0b11;
    bme280.parameter.IIRfilter = 0b010;
    bme280.parameter.humidOversampling = 0b011;
    bme280.parameter.tempOversampling = 0b011;
    bme280.parameter.pressOversampling = 0b101;
    bme280.parameter.pressureSeaLevel = 1013.25; 
    bme280.parameter.tempOutsideCelsius = 15;
    bme280.init();
    }
    
    void setup()
    {
    }
    
    void presentation()
    {
    sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
    wait(LONG_WAIT);
    present(BARO_CHILD_ID, S_BARO);
    wait(SHORT_WAIT);
    present(TEMP_CHILD_ID, S_TEMP);
    wait(SHORT_WAIT);
    present(HUM_CHILD_ID, S_HUM);
    wait(SHORT_WAIT);
    }
    
    void loop()
    {
    send(temperatureMsg.set(bme280.readTempC(), 2));
    wait(SHORT_WAIT);
    send(humidityMsg.set(bme280.readHumidity(), 2));
    wait(SHORT_WAIT);
    send(pressureMsg.set(bme280.readPressure(), 2));
    wait(LONG_WAIT);
    wait(SLEEP_TIME);
    }
    

    Any help is greatly appreciated. Thank you.

    EDIT: After downgrading from Development to Master branch, I'm having a slightly different error on the Node:

    16:57:34.336 ->  __  __       ____
    16:57:34.336 -> |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    16:57:34.382 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    16:57:34.436 -> | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    16:57:34.483 -> |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
    16:57:34.536 ->         |___/                      2.3.1
    16:57:34.583 -> 
    16:57:34.583 -> 237 MCO:BGN:INIT NODE,CP=RNNNE---,REL=255,VER=2.3.1
    16:57:34.636 -> 424 TSM:INIT
    16:57:34.636 -> 438 TSF:WUR:MS=0
    16:57:34.683 -> 462 TSM:INIT:TSP OK
    16:57:34.683 -> 483 TSM:INIT:STATID=2
    16:57:34.736 -> 506 TSF:SID:OK,ID=2
    16:57:34.736 -> 527 TSM:FPAR
    16:57:34.783 -> 541 TSM:FPAR:STATP=0
    16:57:34.783 -> 563 TSM:ID
    16:57:34.783 -> 574 TSM:ID:OK
    16:57:34.836 -> 589 TSM:UPL
    16:57:37.094 -> 2854 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    16:57:39.158 -> 4929 TSM:UPL
    16:57:39.304 -> 5064 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=OK:1
    16:57:39.358 -> 5136 TSF:MSG:READ,100-100-0,s=4,c=1,t=0,pt=7,l=5,sg=0:22.27
    16:57:39.405 -> 5199 !TSF:MSG:REL MSG,NREP
    16:57:39.521 -> 5307 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    16:57:39.605 -> 5365 TSF:MSG:PONG RECV,HP=1
    16:57:39.605 -> 5394 TSM:UPL:OK
    16:57:39.659 -> 5411 TSM:READY:ID=2,PAR=0,DIS=1
    16:57:41.919 -> 7697 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    


  • @neo-mod
    To me, the log seems to indicate that the radio connection is not working.
    If the HW is identical (with capacitor on the radio power connection) then I can see two causes:

    1. Faulty nRF24. Try switching the radion module
    2. Distance between node 2 and GW too far or something blocking the radio transmission. Try moving node closer to GW.

Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 5
  • 6
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts