Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Pi 4 ethernet gateway with NRF24L01 + PA and LNA & Domoticz

Pi 4 ethernet gateway with NRF24L01 + PA and LNA & Domoticz

Scheduled Pinned Locked Moved My Project
gateway
17 Posts 3 Posters 154 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by
    #7

    yes, rf module directly connected to rpi is not ideal, as rpi doesn't provide a very clean RF power source.

    1 Reply Last reply
    0
    • B bsmtdweller

      @bsmtdweller Another update:

      Im beginning to think these radios suck! But alas, give them what they want and they do work! This configuration is: power comes from Raspberry Pi 4 (5v) fed into a small voltage regulator then on to the 'solution' -- premium low-ESR capacitors (1) 470 mic farad followed by a 230 mic farad right before the radio. Also, twisted wires between the reg and radio and the radio was rewired where the wires (not dupont jumper wires anymore, but 24ga silicone wires) soldered right to the board. I also crimped new ends on the communication wires connected to the Pi pins.

      So far so good! Most successful concurrent transmissions so far! And no loss of communication yet! I'm thrilled! Now on to how to cram all those capacitors into the fancy enclosure I printed out - ugh.

      B Offline
      B Offline
      bsmtdweller
      wrote on last edited by mfalkvidd
      #8

      @bsmtdweller Next challenge with this project:

      I'm trying to connect another node now, the first one is humming along with no issues at all. The new node is a arduino nano running the DHT temp sketch. Smaller NRF24 is the radio and powered by an external wall wort --> into regulator --> into a 230 mic farad cap, then a .1 mic farad tantalum --> into radio. This is the second radio I've tried and the symptoms are the same - radio sends message ok, but FPAR fails - much like when I set up the gateway radio. But the 1st node is running fine on through the gw. I've cleared the nodes eeprom, and ran the sketch that @mfalkvidd posted back in 2016 to set a new node ID. Heres a little of the output from the node. Am I supposed to be posting the output this way? or is there a better/preferred way? Thanks for the help!

      MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
      26 TSM:INIT
      28 TSF:WUR:MS=0
      34 TSM:INIT:TSP OK
      36 TSF:SID:OK,ID=42
      38 TSM:FPAR
      41 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2050 !TSM:FPAR:NO REPLY
      2052 TSM:FPAR
      2056 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4063 !TSM:FPAR:NO REPLY
      4065 TSM:FPAR
      4069 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6076 !TSM:FPAR:NO REPLY
      6078 TSM:FPAR
      6082 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8089 !TSM:FPAR:FAIL
      8090 TSM:FAIL:CNT=1
      
      mfalkviddM 1 Reply Last reply
      0
      • B bsmtdweller

        @bsmtdweller Next challenge with this project:

        I'm trying to connect another node now, the first one is humming along with no issues at all. The new node is a arduino nano running the DHT temp sketch. Smaller NRF24 is the radio and powered by an external wall wort --> into regulator --> into a 230 mic farad cap, then a .1 mic farad tantalum --> into radio. This is the second radio I've tried and the symptoms are the same - radio sends message ok, but FPAR fails - much like when I set up the gateway radio. But the 1st node is running fine on through the gw. I've cleared the nodes eeprom, and ran the sketch that @mfalkvidd posted back in 2016 to set a new node ID. Heres a little of the output from the node. Am I supposed to be posting the output this way? or is there a better/preferred way? Thanks for the help!

        MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
        26 TSM:INIT
        28 TSF:WUR:MS=0
        34 TSM:INIT:TSP OK
        36 TSF:SID:OK,ID=42
        38 TSM:FPAR
        41 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        2050 !TSM:FPAR:NO REPLY
        2052 TSM:FPAR
        2056 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        4063 !TSM:FPAR:NO REPLY
        4065 TSM:FPAR
        4069 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        6076 !TSM:FPAR:NO REPLY
        6078 TSM:FPAR
        6082 ?TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        8089 !TSM:FPAR:FAIL
        8090 TSM:FAIL:CNT=1
        
        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #9

        @bsmtdweller the debug output will be rendered better if you select it and press the </> button.

        Is the nrf24 antenna clear from metal on all sides? Does the gateway log show anything?

        B 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @bsmtdweller the debug output will be rendered better if you select it and press the </> button.

          Is the nrf24 antenna clear from metal on all sides? Does the gateway log show anything?

          B Offline
          B Offline
          bsmtdweller
          wrote on last edited by
          #10

          @mfalkvidd The radio is out in the open, I've tried holding it up and in different orientations as well as touching the rx antenna. The Domoticz log only shows the original node as connected, it doesn't see the new node. Is there a way to see more detailed output directly from the raspberry pi regarding what it happening with the gateway radio?

          mfalkviddM 1 Reply Last reply
          0
          • B bsmtdweller

            @mfalkvidd The radio is out in the open, I've tried holding it up and in different orientations as well as touching the rx antenna. The Domoticz log only shows the original node as connected, it doesn't see the new node. Is there a way to see more detailed output directly from the raspberry pi regarding what it happening with the gateway radio?

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #11

            @bsmtdweller yes. See https://www.mysensors.org/build/raspberry#troubleshooting for the different options.

            B 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @bsmtdweller yes. See https://www.mysensors.org/build/raspberry#troubleshooting for the different options.

              B Offline
              B Offline
              bsmtdweller
              wrote on last edited by
              #12

              @mfalkvidd Please forgive my newness, but I'm not sure where to do what with those instructions. I've been playing with arduino for a couple years, but this is my first go round with raspberry pi. So the configuration file is accessible how? I see it is stated that the path is /etc/mysensors.conf but how do I manipulate it? Is it from the base prompt (pi@raspberrypi:~ $ )? Or from pi@raspberrypi:~/MySensors $ .

              I entered all the commands for each type in the base prompt, then restarted the pi, but how can I view the log in the first option?

              In the second option, this is the output:

              pi@raspberrypi:~ $ tail -f /var/log/syslog
              Aug  1 14:58:04 raspberrypi kernel: [  849.334318] w1_master_driver w1_bus_master1: Attaching one wire slave 00.080000000000 crc c2
              Aug  1 14:58:04 raspberrypi kernel: [  849.345802] w1_master_driver w1_bus_master1: Family 0 for 00.080000000000.c2 is not registered.
              Aug  1 14:58:54 raspberrypi kernel: [  899.290476] v3d fec00000.v3d: MMU error from client L2T (0) at 0x3981000, pte invalid
              Aug  1 14:58:58 raspberrypi kernel: [  902.593309] w1_master_driver w1_bus_master1: Attaching one wire slave 00.880000000000 crc 4e
              Aug  1 14:58:58 raspberrypi kernel: [  902.601096] w1_master_driver w1_bus_master1: Family 0 for 00.880000000000.4e is not registered.
              Aug  1 14:58:58 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
              Aug  1 14:58:58 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
              Aug  1 14:58:58 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.
              Aug  1 14:59:35 raspberrypi kernel: [  940.447725] w1_master_driver w1_bus_master1: Attaching one wire slave 00.480000000000 crc 84
              Aug  1 14:59:35 raspberrypi kernel: [  940.455499] w1_master_driver w1_bus_master1: Family 0 for 00.480000000000.84 is not registered.
              Aug  1 15:00:26 raspberrypi kernel: [  991.152408] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c80000000000 crc 08
              Aug  1 15:00:26 raspberrypi kernel: [  991.160465] w1_master_driver w1_bus_master1: Family 0 for 00.c80000000000.08 is not registered.
              
              
              

              And finally, the 3rd method must not have been performed properly, because it returns:

              pi@raspberrypi:~ $ cat /tmp/mysgw.pipe
              cat: /tmp/mysgw.pipe: No such file or directory
              pi@raspberrypi:~ $ 
              
              
              

              Thank you for your patience!! & Willingness to help!

              mfalkviddM 1 Reply Last reply
              0
              • B bsmtdweller

                @mfalkvidd Please forgive my newness, but I'm not sure where to do what with those instructions. I've been playing with arduino for a couple years, but this is my first go round with raspberry pi. So the configuration file is accessible how? I see it is stated that the path is /etc/mysensors.conf but how do I manipulate it? Is it from the base prompt (pi@raspberrypi:~ $ )? Or from pi@raspberrypi:~/MySensors $ .

                I entered all the commands for each type in the base prompt, then restarted the pi, but how can I view the log in the first option?

                In the second option, this is the output:

                pi@raspberrypi:~ $ tail -f /var/log/syslog
                Aug  1 14:58:04 raspberrypi kernel: [  849.334318] w1_master_driver w1_bus_master1: Attaching one wire slave 00.080000000000 crc c2
                Aug  1 14:58:04 raspberrypi kernel: [  849.345802] w1_master_driver w1_bus_master1: Family 0 for 00.080000000000.c2 is not registered.
                Aug  1 14:58:54 raspberrypi kernel: [  899.290476] v3d fec00000.v3d: MMU error from client L2T (0) at 0x3981000, pte invalid
                Aug  1 14:58:58 raspberrypi kernel: [  902.593309] w1_master_driver w1_bus_master1: Attaching one wire slave 00.880000000000 crc 4e
                Aug  1 14:58:58 raspberrypi kernel: [  902.601096] w1_master_driver w1_bus_master1: Family 0 for 00.880000000000.4e is not registered.
                Aug  1 14:58:58 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
                Aug  1 14:58:58 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
                Aug  1 14:58:58 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.
                Aug  1 14:59:35 raspberrypi kernel: [  940.447725] w1_master_driver w1_bus_master1: Attaching one wire slave 00.480000000000 crc 84
                Aug  1 14:59:35 raspberrypi kernel: [  940.455499] w1_master_driver w1_bus_master1: Family 0 for 00.480000000000.84 is not registered.
                Aug  1 15:00:26 raspberrypi kernel: [  991.152408] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c80000000000 crc 08
                Aug  1 15:00:26 raspberrypi kernel: [  991.160465] w1_master_driver w1_bus_master1: Family 0 for 00.c80000000000.08 is not registered.
                
                
                

                And finally, the 3rd method must not have been performed properly, because it returns:

                pi@raspberrypi:~ $ cat /tmp/mysgw.pipe
                cat: /tmp/mysgw.pipe: No such file or directory
                pi@raspberrypi:~ $ 
                
                
                

                Thank you for your patience!! & Willingness to help!

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #13

                Sorry @bsmtdweller, if you're not familiar with linux, editing the file can be a bit cumbersome. Do this instead:

                cd ~/MySensors
                sudo systemctl stop mysgw.service
                sudo ./bin/mysgw
                
                

                This will let you see the gateway's log. When you're done, hold down ctrl and press C. This will stop the gateway. You can then start it again in the background with

                sudo systemctl start mysgw.service
                
                B 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  Sorry @bsmtdweller, if you're not familiar with linux, editing the file can be a bit cumbersome. Do this instead:

                  cd ~/MySensors
                  sudo systemctl stop mysgw.service
                  sudo ./bin/mysgw
                  
                  

                  This will let you see the gateway's log. When you're done, hold down ctrl and press C. This will stop the gateway. You can then start it again in the background with

                  sudo systemctl start mysgw.service
                  
                  B Offline
                  B Offline
                  bsmtdweller
                  wrote on last edited by
                  #14

                  @mfalkvidd Thank you very much! So, this whole thing is a bit wonky! But when I stopped the gw and started it again, the new sensor was picked up! What the hell. They are both being recognized by the controller now, although there are still some strange behaviors happening. But now that I have the gateway log at my disposal, I have the ability to utilize the log parser and get a better understanding of what is going on.

                  Thanks again @mfalkvidd, you the man! I'm sure you will hear more from me soon!

                  mfalkviddM 1 Reply Last reply
                  1
                  • B bsmtdweller

                    @mfalkvidd Thank you very much! So, this whole thing is a bit wonky! But when I stopped the gw and started it again, the new sensor was picked up! What the hell. They are both being recognized by the controller now, although there are still some strange behaviors happening. But now that I have the gateway log at my disposal, I have the ability to utilize the log parser and get a better understanding of what is going on.

                    Thanks again @mfalkvidd, you the man! I'm sure you will hear more from me soon!

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #15

                    Nice work @bsmtdweller
                    Ttyl :)

                    B 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      Nice work @bsmtdweller
                      Ttyl :)

                      B Offline
                      B Offline
                      bsmtdweller
                      wrote on last edited by
                      #16

                      @mfalkvidd Now that I'm getting my feet wet a bit with MySensors, I would like to get your opinion on designing my first "real" project. This might be more appropriate as a new thread, but I will share my objective and follow your advice for either moving it or re-starting it somewhere else (general discussion?)

                      The idea is that I have a box, consider it an incubator, where I will need to maintain 80 degrees or so and 50-60% humidity. There will be 3 computer cooling fans to circulate and bring in cool air when too warm, a 110V mini space heater to add heat when its too cool, 2 servo arms to open ventilation gates based on a schedule and if it is too warm, and a solenoid valve to control a gravity drip system (supplied by a bucket of water outside the box) to maintain the humidity. There will be a 16x2 lcd keypad shield used with a simple menu to adjust setpoints and display temp humidity at the box.

                      If it were a standalone arduino project, I would be fine - or at least muddle through it to functionality, but I would like to be able to monitor and adjust temp/humidity setpoints through domoticz. The important thing is that the box not rely on the domoticz controller, but rather work with it and when the gateway is down, the program runs its course.

                      So from a design perspective, do I plan to code using MySensors and squeeze in the standalone functionality, or vice versa? Also, is it easier/better to have multiple nodes for this project, or can a single node handle what will equate to 2 sensors, and 7 relays.

                      Perhaps you know of some other threads that might be similar?

                      Thanks so much for your input!!

                      mfalkviddM 1 Reply Last reply
                      0
                      • B bsmtdweller

                        @mfalkvidd Now that I'm getting my feet wet a bit with MySensors, I would like to get your opinion on designing my first "real" project. This might be more appropriate as a new thread, but I will share my objective and follow your advice for either moving it or re-starting it somewhere else (general discussion?)

                        The idea is that I have a box, consider it an incubator, where I will need to maintain 80 degrees or so and 50-60% humidity. There will be 3 computer cooling fans to circulate and bring in cool air when too warm, a 110V mini space heater to add heat when its too cool, 2 servo arms to open ventilation gates based on a schedule and if it is too warm, and a solenoid valve to control a gravity drip system (supplied by a bucket of water outside the box) to maintain the humidity. There will be a 16x2 lcd keypad shield used with a simple menu to adjust setpoints and display temp humidity at the box.

                        If it were a standalone arduino project, I would be fine - or at least muddle through it to functionality, but I would like to be able to monitor and adjust temp/humidity setpoints through domoticz. The important thing is that the box not rely on the domoticz controller, but rather work with it and when the gateway is down, the program runs its course.

                        So from a design perspective, do I plan to code using MySensors and squeeze in the standalone functionality, or vice versa? Also, is it easier/better to have multiple nodes for this project, or can a single node handle what will equate to 2 sensors, and 7 relays.

                        Perhaps you know of some other threads that might be similar?

                        Thanks so much for your input!!

                        mfalkviddM Offline
                        mfalkviddM Offline
                        mfalkvidd
                        Mod
                        wrote on last edited by mfalkvidd
                        #17

                        Cool project @bsmtdweller

                        New thread or stay in this doesn't matter much, but for people searching the forum (or their favorite search engine) in the future, I think a new thread with a subject containing "incubator" will be more clear.

                        I would build it with multiple nodes. Smaller chunks of code, easier wiring, easier to isolate individual parts which helps tremendously when troubleshooting, easer to reuse code for one node in case you (or someone else) want to expand the project later, easier to remove a part if you (or someone else) don't need it.

                        The non-mysensors code is more important, so I would start with that, but make sure all parameters that you want to be able to change are stored in variables and not hardcoded. Then add the MySensors code to update the values of the variables.

                        The autonomy will be hard. Normally I would prefer to have all logic in the controller, since a controller has much better ways to program and debug stuff. Not fun to write - and maintain - in C with very rudamentary debugging tools. But as you say, being reliant on having Domoticz working all the time might not be good. Having the system fail gracefully will be a challenge. A start could be to search the forum for MY_TRANSPORT_WAIT_READY_MS to see what others have done. And maybe - to make the system as reliable as possible - you should add everything to a single node instead of splitting it up into multiple nodes.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        23

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular