Skip to content
  • 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
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 422.5k 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #430

    Download myscontroller and connect it to the gateway, you can now see all messages from ethernet controller

    F 1 Reply Last reply
    0
    • gohanG gohan

      Download myscontroller and connect it to the gateway, you can now see all messages from ethernet controller

      F Offline
      F Offline
      ftw64
      wrote on last edited by
      #431

      @gohan said in 💬 Building a Raspberry Pi Gateway:

      myscontroller

      I just did. When I also have a Domoticz controller connected to the gateway:

      2017-04-23 11:18:33	INFO	Connected to 192.168.10.24:5003
      2017-04-23 11:18:33	CHILD	New child discovered, node id=0, child id=internal
      2017-04-23 11:18:33	RX	0;255;3;0;14;Gateway startup complete.
      2017-04-23 11:18:33	DEBUG	Update child id=255, type=ARDUINO_RELAY
      2017-04-23 11:18:33	RX	0;255;0;0;18;2.2.0-beta
      2017-04-23 11:18:33	RX	0;255;3;0;22;208103
      2017-04-23 11:18:33	RX	0;255;3;0;2;2.2.0-beta
      2017-04-23 11:18:43	RX	0;255;3;0;22;218106
      2017-04-23 11:18:53	RX	0;255;3;0;22;228110
      2017-04-23 11:19:03	RX	0;255;3;0;22;238101
      2017-04-23 11:19:13	RX	0;255;3;0;22;248104
      2017-04-23 11:19:23	RX	0;255;3;0;22;258110
      2017-04-23 11:19:33	RX	0;255;3;0;22;268107
      2017-04-23 11:19:43	RX	0;255;3;0;22;278106
      2017-04-23 11:19:53	RX	0;255;3;0;22;288110
      2017-04-23 11:20:03	RX	0;255;3;0;22;298116
      

      However, I found out that the DI00 (=IRQ) on the RFM69 never gives a rising edge...
      I'm suspecting that the RFM69 is not being initialised properly... I added some debugging in the RFM69 code to see what registers are being written and read:

      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-beta
      mysgw: MCO:BGN:INIT GW,CP=RPNG----,VER=2.2.0-beta
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: RFM69:INIT
      mysgw: RFM69:INIT:PIN,CS=24,IQP=22,IQN=22
      mysgw: FtW:RFM69:write register, reg=0x01, value=4
      mysgw: FtW:RFM69:write register, reg=0x02, value=0
      mysgw: FtW:RFM69:write register, reg=0x03, value=2
      mysgw: FtW:RFM69:write register, reg=0x04, value=64
      mysgw: FtW:RFM69:write register, reg=0x05, value=3
      mysgw: FtW:RFM69:write register, reg=0x06, value=51
      mysgw: FtW:RFM69:write register, reg=0x18, value=136
      mysgw: FtW:RFM69:write register, reg=0x19, value=66
      mysgw: FtW:RFM69:write register, reg=0x26, value=7
      mysgw: FtW:RFM69:write register, reg=0x28, value=16
      mysgw: FtW:RFM69:write register, reg=0x29, value=220
      mysgw: FtW:RFM69:write register, reg=0x2c, value=0
      mysgw: FtW:RFM69:write register, reg=0x2d, value=3
      mysgw: FtW:RFM69:write register, reg=0x2e, value=136
      mysgw: FtW:RFM69:write register, reg=0x2f, value=45
      mysgw: FtW:RFM69:write register, reg=0x30, value=101
      mysgw: FtW:RFM69:write register, reg=0x37, value=212
      mysgw: FtW:RFM69:write register, reg=0x38, value=66
      mysgw: FtW:RFM69:write register, reg=0x39, value=255
      mysgw: FtW:RFM69:write register, reg=0x3a, value=255
      mysgw: FtW:RFM69:write register, reg=0x3c, value=5
      mysgw: FtW:RFM69:write register, reg=0x3d, value=16
      mysgw: FtW:RFM69:write register, reg=0x6f, value=48
      mysgw: FtW:RFM69:write register, reg=0x07, value=217
      mysgw: FtW:RFM69:write register, reg=0x08, value=0
      mysgw: FtW:RFM69:write register, reg=0x09, value=0
      mysgw: FtW:RFM69:write register, reg=0x01, value=4
      mysgw: FtW:RFM69:read register, reg=0x27, value=128
      mysgw: FtW:RFM69:read register, reg=0x3d, value=16
      mysgw: FtW:RFM69:write register, reg=0x3d, value=16
      mysgw: FtW:RFM69:write register, reg=0x11, value=87
      mysgw: RFM69:PTX:LEVEL=5 dBm
      mysgw: FtW:RFM69:read register, reg=0x02, value=0
      mysgw: FtW:RFM69:read register, reg=0x03, value=2
      mysgw: FtW:RFM69:read register, reg=0x04, value=64
      mysgw: FtW:RFM69:read register, reg=0x05, value=3
      mysgw: FtW:RFM69:read register, reg=0x06, value=51
      mysgw: FtW:RFM69:read register, reg=0x30, value=101
      mysgw: FTW attachInterrupt: gpioPin=25 mode=3
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: FtW:RFM69:write register, reg=0x39, value=0
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: FtW:RFM69:write register, reg=0x25, value=64
      mysgw: FtW:RFM69:write register, reg=0x13, value=26
      mysgw: FtW:RFM69:write register, reg=0x5a, value=85
      mysgw: FtW:RFM69:write register, reg=0x5c, value=112
      mysgw: FtW:RFM69:read register, reg=0x3d, value=16
      mysgw: FtW:RFM69:write register, reg=0x3d, value=20
      mysgw: FtW:RFM69:write register, reg=0x01, value=16
      mysgw: Listening for connections on 0.0.0.0:5003
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: New connection from 127.0.0.1
      mysgw: Client 0 connected
      mysgw: Client 0: 0;0;3;0;2;
      mysgw: gatewayTransportAvailable
      mysgw: Client 0: 0;0;3;0;2;Get Version
      mysgw: gatewayTransportAvailable
      mysgw: Client 0: 0;0;3;0;18;PING
      mysgw: gatewayTransportAvailable
      mysgw: Client 0: 0;0;3;0;18;PING
      mysgw: gatewayTransportAvailable
      mysgw: Client 0: 0;0;3;0;18;PING
      
      1 Reply Last reply
      0
      • F Offline
        F Offline
        ftw64
        wrote on last edited by
        #432

        Can't get the RFM69HW to work on RPI. I tried the following:

        1. I installed on an old RPI1 (clean Rasbian install). Same results as on my Domoticz RPI-3.
        2. Setup the original RPI3 as a node, using the 2.2.0-beta code. I verified that in this case the RFM69HW actually transmits (I can hear it burst on 868.000 MHz). However, it is unable to connect to an existing Arduino 2.1.1 gateway.
        3. I built an Arduino 2.2.0-beta serial gateway. Even then, the RPI as a node fails to connect to the 2.2.0-beta serial gateway.
        4. I built an Arduino 2.2.0-beta node. This node is able to connect to the above gateway.

        There seems to be something different in the radio network between the RFM69HW on the RPI and the RFM69HW on the Arduino. But I'm unable to find out what the difference is :-(.

        The RPI RFM69HW will not communicate with the Arduino RFM69HW. When the RPI is a gateway, the RFM69HW will not physically interrupt when another node is trying to connect. When the RPI is a node, the RFM69HW on the ARduino does not interrupt either.

        Did anyone get the RFM69HW working on the RPI? I'd really like to get this beautiful piece of code working!

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

          I have to ask a stupid question : did you use a logic converter between rpi and rfm69 radio?

          F 1 Reply Last reply
          0
          • gohanG gohan

            I have to ask a stupid question : did you use a logic converter between rpi and rfm69 radio?

            F Offline
            F Offline
            ftw64
            wrote on last edited by
            #434

            @gohan There are no stupid questions, right :-)? But perhaps a stupid answer: no, I did not use any logic convertors. The RFM69 is 3.3V and as far as I know, so are the GPIO pins on the RPI. But I might be mistaken, of course... Should I use logic convertors?

            At the moment I have no idea where it fails. Perhaps I need to give it a rest for a couple of days to think it over...

            I followed the steps as given on the web site (git branch development). Connected the RFM radio (7 wires: Vcc, GND, MOSI, MISO, SCK, NSS, DI00). Only modified MyConfig.h with regard to the NETWORKID (100 --> 101; my 'production' MySensors runs at 100) and enabling "MY_DEBUG_VERBOSE_RFM69". I configured with:

            % ./configure --my-debug=enable --my-config-file=/usr/local/etc/mysensors.dat --my-gateway=ethernet --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw
            % make -j 4
            % sudo bin/mysgw -d
            
            mfalkviddM 1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #435

              The gpio pins on raspberry pi are 3.3V. https://raspberrypi.stackexchange.com/questions/3209/what-are-the-min-max-voltage-current-values-the-gpio-pins-can-handle

              1 Reply Last reply
              0
              • F ftw64

                @gohan There are no stupid questions, right :-)? But perhaps a stupid answer: no, I did not use any logic convertors. The RFM69 is 3.3V and as far as I know, so are the GPIO pins on the RPI. But I might be mistaken, of course... Should I use logic convertors?

                At the moment I have no idea where it fails. Perhaps I need to give it a rest for a couple of days to think it over...

                I followed the steps as given on the web site (git branch development). Connected the RFM radio (7 wires: Vcc, GND, MOSI, MISO, SCK, NSS, DI00). Only modified MyConfig.h with regard to the NETWORKID (100 --> 101; my 'production' MySensors runs at 100) and enabling "MY_DEBUG_VERBOSE_RFM69". I configured with:

                % ./configure --my-debug=enable --my-config-file=/usr/local/etc/mysensors.dat --my-gateway=ethernet --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw
                % make -j 4
                % sudo bin/mysgw -d
                
                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #436

                @ftw64 that configure command looks like an ethernet gateway. Could you post the configure command for your "RPI as a node" as well?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  marceloaqno
                  Code Contributor
                  wrote on last edited by
                  #437

                  I forgot to mention in the guide:
                  To communicate with the RPi using the RFM69 radio, all of your nodes need to use the new RFM69 driver available in the development branch.
                  To make the change, add the following line to the node sketch:

                  #define MY_RFM69_NEW_DRIVER
                  
                  gohanG 1 Reply Last reply
                  1
                  • M marceloaqno

                    I forgot to mention in the guide:
                    To communicate with the RPi using the RFM69 radio, all of your nodes need to use the new RFM69 driver available in the development branch.
                    To make the change, add the following line to the node sketch:

                    #define MY_RFM69_NEW_DRIVER
                    
                    gohanG Offline
                    gohanG Offline
                    gohan
                    Mod
                    wrote on last edited by
                    #438

                    @marceloaqno you forgot just a little little insignificant detail 😂

                    M 1 Reply Last reply
                    0
                    • gohanG gohan

                      @marceloaqno you forgot just a little little insignificant detail 😂

                      M Offline
                      M Offline
                      marceloaqno
                      Code Contributor
                      wrote on last edited by
                      #439

                      @gohan @ftw64 sorry for all the trouble

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

                        It's OK, don't worry. We need to update the guide with the new instructions 😀

                        M 1 Reply Last reply
                        0
                        • gohanG gohan

                          It's OK, don't worry. We need to update the guide with the new instructions 😀

                          M Offline
                          M Offline
                          marceloaqno
                          Code Contributor
                          wrote on last edited by
                          #441

                          @gohan Done!

                          1 Reply Last reply
                          2
                          • F Offline
                            F Offline
                            ftw64
                            wrote on last edited by
                            #442

                            @marceloaqno Thanks! That indeed does the trick! And no worries, it is my own decision to play with beta(!) code (and it was a fun weekend troubleshooting it - I learned a lot about the structure of the MySensors code)!

                            Only 'bad' thing is that 2.2.0 is not compatible with my existing nodes :-).

                            I appreciate all the work that has been put into MySensors.

                            1 Reply Last reply
                            0
                            • Fat FlyF Offline
                              Fat FlyF Offline
                              Fat Fly
                              wrote on last edited by
                              #443

                              This is really stupid. :D RFM69 radio need powered separately ?

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

                                They shouldn't, but it's always a matter trying 😀

                                1 Reply Last reply
                                0
                                • O Offline
                                  O Offline
                                  Oliver Acevedo
                                  wrote on last edited by
                                  #445
                                  This post is deleted!
                                  1 Reply Last reply
                                  0
                                  • Richard van der PlasR Offline
                                    Richard van der PlasR Offline
                                    Richard van der Plas
                                    wrote on last edited by
                                    #446

                                    How will this work with HASS running on the same pi ?

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

                                      It's the same as it was running on separate hw, you will only set ip address of the gateway in hass

                                      1 Reply Last reply
                                      0
                                      • Richard van der PlasR Offline
                                        Richard van der PlasR Offline
                                        Richard van der Plas
                                        wrote on last edited by
                                        #448

                                        so i can attach the NRF24L01+ to the pi running HA, make it a Ethernet Gateway and point to his own ip adress ?, will this be a long job with converting from a USB connected GW (Arduino with local sensors ? )

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

                                          That's pretty much it. I don't know what is your current setup and what sensors you have, but is should not be a long job. Anyway you can install the ethernet gateway and when you are done you take care of the sensors

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


                                          19

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular