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.
  • carlylerC carlyler

    Appears things are changing, please update wiki:
    Warning: --my-radio is deprecated, please use --my-transport

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

    @carlyler Thanks for pointing that out.

    1 Reply Last reply
    0
    • jerseyguy1996J jerseyguy1996

      Has anyone else had an issue with getting a sensor node to reconnect after a lost connection? I can see it attempting to reconnect but even though it is back within range of the gateway it won't reestablish the connection. If I reset the node it re-establishes the connection without any problem. This is the cycle that it gets stuck in:

      TSM:FPAR
      TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSP:MSG:READ 0-0-3 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSP:MSG:FPAR RES (ID=0, dist=0)
      TSP:MSG:PAR OK (ID=0, dist=1)
      TSM:FPAR:OK
      TSM:ID
      TSM:CHKID:OK (ID=3)
      TSM:UPL
      TSP:PING:SEND (dest=0)
      !TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=fail:1
      TSP:CHKUPL:FAIL (hops=255)
      !TSM:UPL:FAIL
      TSM:FPAR
      TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      TSM:FPAR
      TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSP:MSG:READ 0-0-3 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSP:MSG:FPAR RES (ID=0, dist=0)
      TSP:MSG:PAR OK (ID=0, dist=1)
      TSM:FPAR:OK
      TSM:ID
      TSM:CHKID:OK (ID=3)
      TSM:UPL
      TSP:PING:SEND (dest=0)
      !TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=fail:1
      TSP:CHKUPL:FAIL (hops=255)
      !TSM:UPL:FAIL
      TSM:FPAR
      TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR
      !TSP:SEND:TNR```
      M Offline
      M Offline
      marceloaqno
      Code Contributor
      wrote on last edited by
      #91

      @jerseyguy1996 Are you using a decoupling capacitor?

      jerseyguy1996J R 2 Replies Last reply
      0
      • M marceloaqno

        @jerseyguy1996 Are you using a decoupling capacitor?

        jerseyguy1996J Offline
        jerseyguy1996J Offline
        jerseyguy1996
        wrote on last edited by jerseyguy1996
        #92

        @marceloaqno Yes its 220 uF. It was all I had handy. I read somewhere that this may be a problem specific to the arduino nano. I may give it a try with the pro mini. Although I'm not sure what that may have to do with it.

        Edit: I tried the same sketch on an arduino pro mini and it worked fine. When I simulated a loss of connection by walking out of range of the gateway it immediately reestablished the connection when I got back within range. The only difference is that the pro mini is running at 8 mhz whereas the nano runs at 16 mhz. Not sure how that affects things.

        1 Reply Last reply
        0
        • Velo17V Offline
          Velo17V Offline
          Velo17
          wrote on last edited by
          #93

          Hello everyone. Is there a way to reduce the number of Heartbeat messages the gateway produces by itself? Using MYSController to analyze the data traffic, I see every 10 seconds a Heartbeat - would like to reduce this once everything is working as expected to maybe every 5 or 10 minutes...

          1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #94

            @Velo17

            Just sleep longer. It sends one heartbeat every time the node wakes up.

            1 Reply Last reply
            0
            • Christian SimonsenC Christian Simonsen

              @marceloaqno said:

              @Christian-Simonsen

              mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
              mysGateway: !TSF:MSG:LEN,0!=7
              

              looks like a power issue with the nrf24 module.

              Ok,

              I've tested with the Voltmeter and the NRF24L01 module do get a steady 3.26 V. Both the gateway module and the Arduino sensor node...

              Im now building a few extra sensor nodes, so I can test without the Raspberry pi. Hopefully I can atleast get them talking based on Arduinos first. Before testing the Raspberry Pi.

              dopeeyeD Offline
              dopeeyeD Offline
              dopeeye
              wrote on last edited by
              #95

              @Christian-Simonsen

              I have exactly the same error

              mysGateway: !TSF:MSG:LEN,0!=7

              Have you been able to resolve that problem yet? I have tried multiple radios with different capacitors and powersources grounded to the Raspberry Pi.

              thanks

              Christian SimonsenC 1 Reply Last reply
              0
              • dopeeyeD dopeeye

                @Christian-Simonsen

                I have exactly the same error

                mysGateway: !TSF:MSG:LEN,0!=7

                Have you been able to resolve that problem yet? I have tried multiple radios with different capacitors and powersources grounded to the Raspberry Pi.

                thanks

                Christian SimonsenC Offline
                Christian SimonsenC Offline
                Christian Simonsen
                wrote on last edited by
                #96

                @dopeeye

                Sadly not. I ended up creating an serial gateway (arduino with NRF24L01 and a USB connector) and connected this to the Raspberry Pi, rather than connecting the NRF24L01 directly to the GPIO pins. This worked perfectly straight away.

                dopeeyeD 1 Reply Last reply
                0
                • Christian SimonsenC Christian Simonsen

                  @dopeeye

                  Sadly not. I ended up creating an serial gateway (arduino with NRF24L01 and a USB connector) and connected this to the Raspberry Pi, rather than connecting the NRF24L01 directly to the GPIO pins. This worked perfectly straight away.

                  dopeeyeD Offline
                  dopeeyeD Offline
                  dopeeye
                  wrote on last edited by
                  #97

                  @Christian-Simonsen

                  Too stubborn to give up, yet.
                  If i find a resolution I will let you know

                  carlylerC 1 Reply Last reply
                  0
                  • GrahamG Offline
                    GrahamG Offline
                    Graham
                    wrote on last edited by
                    #98

                    I would like to try this, but my pins19-23 are already used by other hardware. Has anyone tried using the SPI1 Pins?

                    1 Reply Last reply
                    0
                    • dopeeyeD dopeeye

                      @Christian-Simonsen

                      Too stubborn to give up, yet.
                      If i find a resolution I will let you know

                      carlylerC Offline
                      carlylerC Offline
                      carlyler
                      wrote on last edited by
                      #99

                      @dopeeye I had this issue and unfortunately changed several things at once and got rid of it. However, one thing I noticed was I had different versions of mySensors in my library directory since I downloaded the examples package. Therefore the sensor was likely compiling on a different version than the Gateway. You might want to check that.

                      If you could post more of your logs (sensor and gateway) it might help.

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        ericvdb
                        wrote on last edited by
                        #100

                        @marceloaqno

                        When running as a service, is there a way to watch the debug log?

                        1 Reply Last reply
                        0
                        • Patrik SöderströmP Offline
                          Patrik SöderströmP Offline
                          Patrik Söderström
                          wrote on last edited by
                          #101

                          Any ETA on support for RFM69 ? Need to extend my coverage :)

                          1 Reply Last reply
                          0
                          • alescA Offline
                            alescA Offline
                            alesc
                            wrote on last edited by
                            #102

                            Done:

                            1. git clone https://github.com/mysensors/MySensors.git
                            2. ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
                            3. make.
                              Got error:
                              In file included from ./MySensors.h:287:0,
                              from examples_linux/mysGateway.cpp:70:
                              ./drivers/RF24/RF24.cpp: In function âuint8_t RF24_spiMultiByteTransfer(uint8_t, uint8_t*, uint8_t, bool)â:
                              ./drivers/RF24/RF24.cpp:65:22: error: âNOPâ was not declared in this scope
                              *ptx++ = NOP ;
                              ^
                              Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
                              make: *** [examples_linux/mysGateway.o] Error 1
                              Any idea?
                            mfalkviddM tekkaT 2 Replies Last reply
                            0
                            • alescA alesc

                              Done:

                              1. git clone https://github.com/mysensors/MySensors.git
                              2. ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
                              3. make.
                                Got error:
                                In file included from ./MySensors.h:287:0,
                                from examples_linux/mysGateway.cpp:70:
                                ./drivers/RF24/RF24.cpp: In function âuint8_t RF24_spiMultiByteTransfer(uint8_t, uint8_t*, uint8_t, bool)â:
                                ./drivers/RF24/RF24.cpp:65:22: error: âNOPâ was not declared in this scope
                                *ptx++ = NOP ;
                                ^
                                Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
                                make: *** [examples_linux/mysGateway.o] Error 1
                                Any idea?
                              mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by mfalkvidd
                              #103

                              @alesc looks like this commit in the development branch broke the code.

                              Do

                              git checkout master
                              

                              before running configure should get the code to the latest stable release.

                              EDIT: Sorry, that won't work because the Raspberry Pi stuff didn't exist when MySensors 2.0 was released. You'll have to do git pull instead, to get tekka's fix.

                              1 Reply Last reply
                              0
                              • alescA alesc

                                Done:

                                1. git clone https://github.com/mysensors/MySensors.git
                                2. ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
                                3. make.
                                  Got error:
                                  In file included from ./MySensors.h:287:0,
                                  from examples_linux/mysGateway.cpp:70:
                                  ./drivers/RF24/RF24.cpp: In function âuint8_t RF24_spiMultiByteTransfer(uint8_t, uint8_t*, uint8_t, bool)â:
                                  ./drivers/RF24/RF24.cpp:65:22: error: âNOPâ was not declared in this scope
                                  *ptx++ = NOP ;
                                  ^
                                  Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
                                  make: *** [examples_linux/mysGateway.o] Error 1
                                  Any idea?
                                tekkaT Offline
                                tekkaT Offline
                                tekka
                                Admin
                                wrote on last edited by tekka
                                #104

                                @alesc @mfalkvidd Thanks for reporting, fixed: https://github.com/mysensors/MySensors/pull/635

                                1 Reply Last reply
                                1
                                • ben999B Offline
                                  ben999B Offline
                                  ben999
                                  wrote on last edited by ben999
                                  #105

                                  Hi Everyone !
                                  Big thumb up for the amount of work supplied !!!
                                  After being more or less successful with openHAB1 I had a go with openHAB2 today, via a online install....
                                  But no success with the "mysGateway" install : should i go back to serial gateway with an arduino ?
                                  Thanks a lot for your help

                                  1 Reply Last reply
                                  0
                                  • carlylerC Offline
                                    carlylerC Offline
                                    carlyler
                                    wrote on last edited by
                                    #106

                                    @ben999 try again, because it works great. I assume by online install you mean apt-get; I too had trouble when trying this. However, I tried again following @TimO instructions here:
                                    wiki, then everything came up nicely. I feel it is some permission issue that I have not tried to figure out yet.

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

                                      @ericvdb when running as a service, debug messages are masked and aren't shown in the system logs, but it would be a good idea to have a way to connect to gateway perhaps using telnet and watch the logs. I'll work on something.

                                      1 Reply Last reply
                                      0
                                      • carlylerC carlyler

                                        @ben999 try again, because it works great. I assume by online install you mean apt-get; I too had trouble when trying this. However, I tried again following @TimO instructions here:
                                        wiki, then everything came up nicely. I feel it is some permission issue that I have not tried to figure out yet.

                                        ben999B Offline
                                        ben999B Offline
                                        ben999
                                        wrote on last edited by
                                        #108

                                        @carlyler
                                        Thanks a lot for your message, hope is back on my side :)
                                        Actually I had a go with openHABian (i didn't make it clear in my previous message, sorry)
                                        The install itself couldn't be easier : OS+openHAB installed in one go, just by formatting SD Card with a tiny img file. One hour later and voilà !
                                        So that could be the source of my trouble?
                                        I will go with the link you supplied tonight and let you know (lookslike it is a manual install... scary!!)
                                        Thank you again for your support

                                        1 Reply Last reply
                                        0
                                        • carlylerC Offline
                                          carlylerC Offline
                                          carlyler
                                          wrote on last edited by
                                          #109

                                          @ben999 if you have not already, read through the MySensors OH2 thread. I noticed a recent post by @TimO that talks about setting some permissions and that might be the issue. Otherwise, the manual install is not bad as he gives you step-by-step; I am a new to all this and managed to get it to work...

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


                                          17

                                          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