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 422.7k 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.
  • b0rmannB b0rmann

    very interesting data...

    journalctl -u mysgateway --since 13:15 | grep MSG:READ

    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=2,l=2,sg=0:97
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-3-0,s=4,c=1,t=23,pt=2,l=2,sg=0:6
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=3,c=1,t=23,pt=2,l=2,sg=0:97
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=0,c=1,t=0,pt=7,l=5,sg=0:24.6
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=4,c=1,t=23,pt=2,l=2,sg=0:6
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=3,c=1,t=23,pt=2,l=2,sg=0:97
    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-3-0,s=0,c=1,t=0,pt=7,l=5,sg=0:12.7
    Oct 21 13:16:31 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=0,c=1,t=0,pt=7,l=5,sg=0:12.7
    Oct 21 13:16:31 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=4,c=1,t=23,pt=2,l=2,sg=0:6
    Oct 21 13:17:17 pi mysGateway[30406]: TSF:MSG:READ,2-2-0,s=251,c=1,t=0,pt=7,l=5,sg=0:24.5
    Oct 21 13:17:17 pi mysGateway[30406]: TSF:MSG:READ,2-2-0,s=167,c=1,t=0,pt=7,l=5,sg=0:24.6
    Oct 21 13:17:18 pi mysGateway[30406]: TSF:MSG:READ,2-10-0,s=251,c=1,t=0,pt=7,l=5,sg=0:24.5
    Oct 21 13:17:18 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=0,c=1,t=0,pt=7,l=5,sg=0:12.7
    Oct 21 13:17:18 pi mysGateway[30406]: TSF:MSG:READ,2-10-0,s=167,c=1,t=0,pt=7,l=5,sg=0:24.6
    Oct 21 13:17:18 pi mysGateway[30406]: TSF:MSG:READ,2-10-0,s=251,c=1,t=0,pt=7,l=5,sg=0:24.5
    Oct 21 13:17:19 pi mysGateway[30406]: TSF:MSG:READ,10-10-0,s=12,c=1,t=0,pt=7,l=5,sg=0:34
    Oct 21 13:17:19 pi mysGateway[30406]: TSF:MSG:READ,10-10-0,s=14,c=1,t=0,pt=7,l=5,sg=0:24
    

    node 2
    sensor 167 - dht18b20 indoor
    sensor 251 - dht18b20 indoor

    node 3
    sensor 0 - dht18b20 outdoor
    sensor 3 - light (0..100)
    sensor 4 - light (0..100)

    questions:
    why node 2 and node 3 send messages directly and via node 10?

    24.6 - is actual value from 2/251, but gateway receive this value from 3/0 How is it possible?

    Oct 21 13:16:30 pi mysGateway[30406]: TSF:MSG:READ,3-10-0,s=0,c=1,t=0,pt=7,l=5,sg=0:24.6
    
    M Offline
    M Offline
    marceloaqno
    Code Contributor
    wrote on last edited by
    #81

    @b0rmann Can you provide a full debug log of all involved nodes?

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

      Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?

      mfalkviddM 1 Reply Last reply
      0
      • M marceloaqno

        @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.

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

        @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.

        alexsh1A dopeeyeD 2 Replies Last reply
        0
        • Patrik SöderströmP Patrik Söderström

          Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?

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

          @Patrik-Söderström said:

          Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?

          I haven't seen anyone doing anything similar so it might require some work. But almost anything is possible given enough work :)

          Patrik SöderströmP 1 Reply Last reply
          0
          • jerseyguy1996J Offline
            jerseyguy1996J Offline
            jerseyguy1996
            wrote on last edited by
            #85

            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 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.

              alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by
              #86

              @Christian-Simonsen multimeter will not detect issues with the power feed (noise or unstable). It just says that you voltage under zero load is 3.3V.

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

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

                M 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  @Patrik-Söderström said:

                  Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?

                  I haven't seen anyone doing anything similar so it might require some work. But almost anything is possible given enough work :)

                  Patrik SöderströmP Offline
                  Patrik SöderströmP Offline
                  Patrik Söderström
                  wrote on last edited by
                  #88

                  @mfalkvidd Alright :) The thing is that I have my Raspberry Pi as a Gateway today near my server rack and would like to measure the temperatur. Maybe I just get a Nano to do the work for me. Just would have been great to use the Raspberry.

                  mfalkviddM 1 Reply Last reply
                  0
                  • Patrik SöderströmP Patrik Söderström

                    @mfalkvidd Alright :) The thing is that I have my Raspberry Pi as a Gateway today near my server rack and would like to measure the temperatur. Maybe I just get a Nano to do the work for me. Just would have been great to use the Raspberry.

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

                    @Patrik-Söderström You can probably connect a temperature sensor to the gpio pins and have your controller read the sensor (without using MySensors)

                    1 Reply Last reply
                    0
                    • 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
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          9

                                          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