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. Announcements
  3. 💬 Building a Raspberry Pi Gateway

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 423.1k Views 131 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.
  • R Offline
    R Offline
    Robert Król
    wrote on last edited by
    #977

    hi,
    is it possible to conect NRF24 to SPI1 channel on RBpi3?
    (i mean pins 26, 35, 36,38,40)??

    mfalkviddM 1 Reply Last reply
    0
    • R Robert Król

      hi,
      is it possible to conect NRF24 to SPI1 channel on RBpi3?
      (i mean pins 26, 35, 36,38,40)??

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

      Welcome to the forum @robert-król
      I have not tried it myself, but I beleive https://forum.mysensors.org/post/76079 shows how to do it.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        barrydou
        wrote on last edited by barrydou
        #979

        Hello

        Is it possible to redefine pin used for DI00 with rfm69 (with configure option for example) ?
        Indeed, DI00 is on pin 22 on raspberry, and pin 2 on arduino.
        But with NRF, pin 2 on arduino is for IRQ, which is connected to pin 15 on raspberry.

        So if it was possible to force pin 15 for DI00, we could use adaptator card like this one https://www.mysensors.org/hardware/nrf2rfm69.

        gohanG 1 Reply Last reply
        0
        • R Offline
          R Offline
          Rolo6442u
          wrote on last edited by
          #980

          Hi, just build an Ethernet gateway on a raspberry pi B+ following the instructions on this site. And it works! I'm running raspbian stretch lite and used the master branch. No issues. I use the RFM69 radio and this gateway has the HW model. I did have to update al my nodes to use the new RFM69 drivers but that was clearly mentioned in the article.
          I have two questions:

          1. In this section :
          log_pipe=0
          log_pipe_file=/tmp/mysgw.pipe
          

          Is this correct, I think there should be a 1 to enable this type of logging.

          1. When a new version of mysensors is released, how do I update the gateway version on the raspberry pi?

          And here is a picture of my work:
          alt text

          Thanks for the effort you put into this project!

          1 Reply Last reply
          1
          • K Offline
            K Offline
            kted
            wrote on last edited by
            #981

            Has the issue with RFM automatic transmission control been addressed?

            R 1 Reply Last reply
            0
            • K kted

              Has the issue with RFM automatic transmission control been addressed?

              R Offline
              R Offline
              Rolo6442u
              wrote on last edited by Rolo6442u
              #982

              @kted Can you give me a pointer to the details of this issue? I'm willing to do some tests and report back my findings. Some info about my configuration, I have 5 nodes at this moment, all battery feeded, they are sending only nodes. They all work but they have a interval of several minutes between sending. The gateway is connected to Domoticz running on another Raspberry PI.

              K 1 Reply Last reply
              1
              • R Rolo6442u

                @kted Can you give me a pointer to the details of this issue? I'm willing to do some tests and report back my findings. Some info about my configuration, I have 5 nodes at this moment, all battery feeded, they are sending only nodes. They all work but they have a interval of several minutes between sending. The gateway is connected to Domoticz running on another Raspberry PI.

                K Offline
                K Offline
                kted
                wrote on last edited by kted
                #983

                @rolo6442u I built an Raspberry gateway using an RFM69 radio, to replace one built around a NodeMCU.
                All nodes are transmit only, and using the latest stable API.
                I noticed that all sensors were using max TX power after the first couple of transmissions, although they were respecting the ATC setting before, and were using minimum power most of the time.
                Now I am concerned about battery life, so I switched back to the NodeMCU gateway, waiting for a fix.
                I'll put together a temporary net, with a RPi0 gateway and a single node later, to show some real data, if you need any more information.

                R mfalkviddM 2 Replies Last reply
                0
                • K kted

                  @rolo6442u I built an Raspberry gateway using an RFM69 radio, to replace one built around a NodeMCU.
                  All nodes are transmit only, and using the latest stable API.
                  I noticed that all sensors were using max TX power after the first couple of transmissions, although they were respecting the ATC setting before, and were using minimum power most of the time.
                  Now I am concerned about battery life, so I switched back to the NodeMCU gateway, waiting for a fix.
                  I'll put together a temporary net, with a RPi0 gateway and a single node later, to show some real data, if you need any more information.

                  R Offline
                  R Offline
                  Rolo6442u
                  wrote on last edited by Rolo6442u
                  #984

                  @kted I wil do some tests to check if I see this behavior. Just build a simple test node with a pushbutton, on 2 AA batteries. This node has the low power W radio module. How did you discover/measure that the max TX power was used?

                  K 1 Reply Last reply
                  0
                  • K kted

                    @rolo6442u I built an Raspberry gateway using an RFM69 radio, to replace one built around a NodeMCU.
                    All nodes are transmit only, and using the latest stable API.
                    I noticed that all sensors were using max TX power after the first couple of transmissions, although they were respecting the ATC setting before, and were using minimum power most of the time.
                    Now I am concerned about battery life, so I switched back to the NodeMCU gateway, waiting for a fix.
                    I'll put together a temporary net, with a RPi0 gateway and a single node later, to show some real data, if you need any more information.

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

                    @kted could be the same problem as discussed in https://forum.mysensors.org/topic/9796/rfm69-atc-not-working/

                    1 Reply Last reply
                    0
                    • R Rolo6442u

                      @kted I wil do some tests to check if I see this behavior. Just build a simple test node with a pushbutton, on 2 AA batteries. This node has the low power W radio module. How did you discover/measure that the max TX power was used?

                      K Offline
                      K Offline
                      kted
                      wrote on last edited by
                      #986

                      @rolo6442u From what the node itself reports from transportGetSignalReport(SR_TX_POWER_PERCENT). It starts from say 50%, and after a coule of transmissions it goes up to 100%, when the nodes are 1m apart. When using a stand alone ESP8266 gateway, it drops to 0%.
                      I'll have the nodes ready in a couple of hours, after I come home from work...

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Rolo6442u
                        wrote on last edited by
                        #987

                        Did some tests and I do see the TX power climbing to 100% after a few transmits :

                        -42 :transportGetReceivingRSSI()
                        127 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        6 :transportGetTxPowerLevel()
                        77 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        -46 :transportGetReceivingRSSI()
                        -102 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        7 :transportGetTxPowerLevel()
                        80 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        -47 :transportGetReceivingRSSI()
                        -102 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        10 :transportGetTxPowerLevel()
                        90 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        -47 :transportGetReceivingRSSI()
                        -105 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        11 :transportGetTxPowerLevel()
                        93 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        -47 :transportGetReceivingRSSI()
                        -103 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        13 :transportGetTxPowerLevel()
                        100 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        -47 :transportGetReceivingRSSI()
                        -106 :transportGetSendingRSSI()
                        -256 :transportGetReceivingSNR()
                        -256 :transportGetSendingSNR()
                        13 :transportGetTxPowerLevel()
                        100 :transportGetTxPowerPercent()
                        0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
                        
                        

                        Not sure if this has a great impact on battery life, depends on how often the node sends a message. Al my nodes have an interval of about 10 minutes. I leave the gateway running for now. Having it running on this PI is a great advantage for me. Will try to do some current measurement on this node and calculate what the impact is on battery life.

                        1 Reply Last reply
                        0
                        • B barrydou

                          Hello

                          Is it possible to redefine pin used for DI00 with rfm69 (with configure option for example) ?
                          Indeed, DI00 is on pin 22 on raspberry, and pin 2 on arduino.
                          But with NRF, pin 2 on arduino is for IRQ, which is connected to pin 15 on raspberry.

                          So if it was possible to force pin 15 for DI00, we could use adaptator card like this one https://www.mysensors.org/hardware/nrf2rfm69.

                          gohanG Offline
                          gohanG Offline
                          gohan
                          Mod
                          wrote on last edited by
                          #988

                          @barrydou I gave a double gateway running on my raspberry both nrf24 and rfm69, still on v. 2.2

                          K 1 Reply Last reply
                          0
                          • gohanG gohan

                            @barrydou I gave a double gateway running on my raspberry both nrf24 and rfm69, still on v. 2.2

                            K Offline
                            K Offline
                            kted
                            wrote on last edited by
                            #989

                            @gohan Nice. I was thinking to do that same at some time, but I wasn't sure if the Raspberry could handle the load, since I also run domoticz on it, along with pi-hole.
                            How many devices do you have on each gateway?

                            1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #990

                              I got the same, domoticz and pi hole, but the load of the gateway is minimal

                              K 1 Reply Last reply
                              0
                              • gohanG gohan

                                I got the same, domoticz and pi hole, but the load of the gateway is minimal

                                K Offline
                                K Offline
                                kted
                                wrote on last edited by
                                #991

                                @gohan I meant multiple gateways on the same raspberry.
                                Right now, I have an NRF24L01 gateway, Domoticz, pi-hole, and a VPN server running, with 2 more gateways connected, one local and one remote RFM69 on ESP8266.
                                It would be nice if I could combine the two local gateways, the RFM and the NRF on the same Raspberry's GPIO...

                                1 Reply Last reply
                                0
                                • gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #992

                                  Yes, I have both radios on the same raspberry.

                                  1 Reply Last reply
                                  0
                                  • MasMatM Offline
                                    MasMatM Offline
                                    MasMat
                                    wrote on last edited by MasMat
                                    #993

                                    More problems when I try to "make" after configuring. Tried with and without sudo...

                                    dietpi@Domoticz:~/MySensors$ sudo make
                                    gcc -MT build/hal/architecture/Linux/drivers/core/log.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_SIGNING_SIMPLE_PASSWD=\"ZZZZZZZ\" -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_LINUX_CONFIG_FILE=\"/etc/mysensors.conf\" -DMY_DEFAULT_TX_LED_PIN=18 -DMY_DEFAULT_RX_LED_PIN=16 -DMY_DEFAULT_ERR_LED_PIN=12 -DMY_MQTT_CLIENT_ID=\"mygateway1\" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mysensors-in\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mysensors-out\" -DMY_MQTT_PASSWORD=\"YYYYY\" -DMY_MQTT_USER=\"XXXX\" -DMY_CONTROLLER_IP_ADDRESS=127,0,0,1 -DMY_DEBUG_VERBOSE_SIGNING -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/log.c -o build/hal/architecture/Linux/drivers/core/log.o
                                    In file included from hal/architecture/Linux/drivers/core/log.c:20:0:
                                    hal/architecture/Linux/drivers/core/log.h:24:19: fatal error: stdio.h: File not found
                                     #include <stdio.h>
                                                       ^
                                    compilation terminated.
                                    Makefile:102: recipe for target 'build/hal/architecture/Linux/drivers/core/log.o' failed
                                    make: *** [build/hal/architecture/Linux/drivers/core/log.o] Error 1
                                    

                                    EDIT: ...and here's the fix: "sudo apt-get install g++" (I'm using DietPi now to make it lighter for Pi Zero W).

                                    1 Reply Last reply
                                    0
                                    • cozaC Offline
                                      cozaC Offline
                                      coza
                                      wrote on last edited by coza
                                      #994

                                      Running Version 2.3.2-beta just cloned today. On a raspberry pi B rev2.
                                      A little bug/problem I have discovered with the MQTT gateway.

                                      When you run the gateway with command and switch:-

                                      mysgw -c /etc/mysensors.conf
                                      

                                      It segfaults.

                                      When its run with the command and switch :-

                                      mysgw --config-file /etc/mysensors.conf
                                      

                                      It works fine

                                      I was playing with the ethernet gateway compile and the -c worked fine.

                                      1 Reply Last reply
                                      1
                                      • cozaC Offline
                                        cozaC Offline
                                        coza
                                        wrote on last edited by coza
                                        #995

                                        Another thing I have found is I cannot get any logging working with the mqqt gateway compile.

                                        It worked fine (named pipe) with the ethernet gateway compile.

                                        Edit
                                        It seems logging with the mqtt is not instant. It seem to dump the log out of memory periodically, is this expected? Makes it a bit hard to debug real-time.

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #996

                                          Just use mqtt client

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


                                          13

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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