nrf24 raspi gateway & controller



  • Hi everyone,

    I can't seem to find a straightforward tutorial or just lack some general knowledge on how to set up a network. There are many topics started and so much information that I'm overwhelmed.

    I would like to use my Rasberry Pi 2 as a gateway and a controller with nrf24l01 radio connected on the GPIO. I followed the tutorial (https://www.mysensors.org/build/raspberry) and got no errors during the installation, but I can't seem to figure out how to test if the radio is listening for messages. Also, I'm not sure which gateway type should I choose (i guess serial or virtual serial)? I tested some sensors earlier and they communicated with each other successfully (pro minis with nrf24).

    Config at the moment:

    sudo ./configure --my-gateway=serial --my-rf24-irq-pin=15 --my-rf24-channel=111 --my-transport=rf24 
    

    No errors when starting mysgw:

    pi@gw:~/MySensors $ sudo ./bin/mysgw
    Mar 20 02:30:52 INFO  Starting gateway...
    Mar 20 02:30:52 INFO  Protocol version - 2.3.1
    Mar 20 02:30:52 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,REL=255,VER=2.3.1
    Mar 20 02:30:52 DEBUG TSF:LRT:OK
    Mar 20 02:30:52 DEBUG TSM:INIT
    Mar 20 02:30:52 DEBUG TSF:WUR:MS=0
    Mar 20 02:30:52 DEBUG TSM:INIT:TSP OK
    Mar 20 02:30:52 DEBUG TSM:INIT:GW MODE
    Mar 20 02:30:52 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
    Mar 20 02:30:52 DEBUG MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.3.1
    Mar 20 02:30:52 DEBUG MCO:BGN:STP
    Mar 20 02:30:52 DEBUG MCO:BGN:INIT OK,TSP=1
    

    Is this the correct setup the system I'm trying to create? How can I test if the nrf24 is actually working? Probably going to use OpenHAB if that's relevant.

    Cheers!


  • Mod

    @fipster yes the setup looks good.

    The easiest way to test is to build a MySensors node, for example https://www.mysensors.org/build/temp
    If you don't have temperature sensors you can replace the temperature reading with random, just to get something to send. Remember to set the define for your radio channel in the sketch, before including MySensors.h:

    #define MY_RF24_CHANNEL   (111)
    


  • Thank you @mfalkvidd!

    I have been busy and had many issues to figure out for myself, but I still can't understand how binding with openHAB works.

    How does the information from nRF24 get to openHAB? I have MySensors Binding add-on installed in openHAB.

    I would be very grateful if someone could help with this last step. After this my first little sensor will be ready to go live.



199
Online

8.7k
Users

9.5k
Topics

99.5k
Posts