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.6k 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
    #601

    I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it

    Djames SuhankoD 1 Reply Last reply
    1
    • Djames SuhankoD Djames Suhanko

      Hi.
      I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
      cu: open (/dev/ttyMySensorsGateway): Permission denied
      cu: /dev/ttyMySensorsGateway: Line in use
      With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
      Could someone explain me what's ne next step for?

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by
      #602

      Welcome to the MySensors community @Djames-Suhanko

      It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry

      That version of the gateway has a debug mode where you can see the messages in the console.

      The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network

      Djames SuhankoD 1 Reply Last reply
      1
      • gohanG gohan

        I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it

        Djames SuhankoD Offline
        Djames SuhankoD Offline
        Djames Suhanko
        wrote on last edited by
        #603

        @gohan Thank you to answer! Good tip, I will do that!

        1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          Welcome to the MySensors community @Djames-Suhanko

          It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry

          That version of the gateway has a debug mode where you can see the messages in the console.

          The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network

          Djames SuhankoD Offline
          Djames SuhankoD Offline
          Djames Suhanko
          wrote on last edited by
          #604

          @mfalkvidd Yes, I'm using 1.5. Thank you for suggest me the newer version. I will update it today!

          1 Reply Last reply
          1
          • Djames SuhankoD Offline
            Djames SuhankoD Offline
            Djames Suhanko
            wrote on last edited by Djames Suhanko
            #605

            Hello, all!
            I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.

            The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
            "MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.

            I used this parameters in configure:
            ./configure --my-transport=nrf24 --my-gateway=ethernet
            --my-port=5003 --my-controlle-ip-address=192.168.1.2
            --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
            --my-mqtt-subscribe-topic-prefix=mysensors-in
            --my-mqtt-client-id=mygateway1

            I couldn't find a solution yet. Can someone help me?

            mfalkviddM 1 Reply Last reply
            0
            • Djames SuhankoD Djames Suhanko

              Hello, all!
              I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.

              The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
              "MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.

              I used this parameters in configure:
              ./configure --my-transport=nrf24 --my-gateway=ethernet
              --my-port=5003 --my-controlle-ip-address=192.168.1.2
              --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
              --my-mqtt-subscribe-topic-prefix=mysensors-in
              --my-mqtt-client-id=mygateway1

              I couldn't find a solution yet. Can someone help me?

              mfalkviddM Online
              mfalkviddM Online
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #606

              @Djames-Suhanko MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1 means that the gateway is starting up. It is not an error.

              "controller" is misspelled in your configure command though.

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

                @Djames-Suhanko I think you have to decide wether you want to make an ethernet or mqtt gateway, you can't specify both

                1 Reply Last reply
                1
                • Djames SuhankoD Offline
                  Djames SuhankoD Offline
                  Djames Suhanko
                  wrote on last edited by Djames Suhanko
                  #608

                  wow, it's was really fast! Thanks to answer. I'm use an ethernet interface. It's up but have no cable on their. I didn't install a controller yet, so, is there no problem yet, right?
                  Sorry that, I'm really a newbie using MySensors.

                  [updating]
                  ysgw: Starting gateway...
                  mysgw: Protocol version - 2.1.1
                  mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
                  mysgw: TSM:INIT
                  mysgw: TSF:WUR:MS=0
                  mysgw: !TSM:INIT:TSP FAIL
                  mysgw: TSM:FAIL:CNT=1
                  mysgw: TSM:FAIL:PDT
                  mysgw: TSM:FAIL:RE-INIT
                  mysgw: TSM:INIT
                  mysgw: !TSM:INIT:TSP FAIL
                  mysgw: TSM:FAIL:CNT=2
                  mysgw: TSM:FAIL:PDT

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

                    @Djames-Suhanko said in 💬 Building a Raspberry Pi Gateway:

                    --my-controlle-ip-address

                    this also is not necessary. Also for now remove all these --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
                    --my-mqtt-subscribe-topic-prefix=mysensors-in
                    --my-mqtt-client-id=mygateway1
                    and use it as ethernet gateway to keep it simple

                    1 Reply Last reply
                    0
                    • Djames SuhankoD Offline
                      Djames SuhankoD Offline
                      Djames Suhanko
                      wrote on last edited by
                      #610

                      Ok, I will try it right now!

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        erobot
                        wrote on last edited by
                        #611

                        Hello folks,
                        my past experience is using nrf24 library at https://github.com/Blavery/lib_nrf24, and i was able to send/receive "text" data (or "string" data) in between Raspi3 (master node) and Arduino (slave). And this is a big issue, because what i need is numerical data (float or integer), not text data, so Raspi 3 can process the numerical data (such as to do the plotting), and based on the processed data to make some decisions. My raspi 3 is controlling a moving robot. Can you advise appropriate nrf24 library for raspberry pi and Arduino, and sample codes for this kind of applicaitons? Thanks

                        mfalkviddM 1 Reply Last reply
                        0
                        • E erobot

                          Hello folks,
                          my past experience is using nrf24 library at https://github.com/Blavery/lib_nrf24, and i was able to send/receive "text" data (or "string" data) in between Raspi3 (master node) and Arduino (slave). And this is a big issue, because what i need is numerical data (float or integer), not text data, so Raspi 3 can process the numerical data (such as to do the plotting), and based on the processed data to make some decisions. My raspi 3 is controlling a moving robot. Can you advise appropriate nrf24 library for raspberry pi and Arduino, and sample codes for this kind of applicaitons? Thanks

                          mfalkviddM Online
                          mfalkviddM Online
                          mfalkvidd
                          Mod
                          wrote on last edited by
                          #612

                          Welcome to the MySensors community @erobot !

                          Not sure how you found us, but the library we use here is...MySensors. It certanly does what you describe. The best way to start is to read how MySensors works at https://www.mysensors.org/about and then go on to the many build examples and build your first node.

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

                            hi there, somehow my gateway seems to stop receiving data after a day or so from my sensors,
                            restarting the service seems to solve it for a time, how can i troubleshoot this issue ?

                            Carl HC gohanG 2 Replies Last reply
                            0
                            • Richard van der PlasR Richard van der Plas

                              hi there, somehow my gateway seems to stop receiving data after a day or so from my sensors,
                              restarting the service seems to solve it for a time, how can i troubleshoot this issue ?

                              Carl HC Offline
                              Carl HC Offline
                              Carl H
                              wrote on last edited by
                              #614

                              @Richard-van-der-Plas

                              Same trouble for me. I use mySensors since 2 years and I have no problem with my Arduino Gateway. But from now 2 weeks, I try to use a pi gateway. It's working well but sometime, don't no why, my nrf24 stop to receive messages. Just restarting mygw service and re-work again. I don't see nothing anormal in my log, stop randomlly after 1 or 2 days.

                              Maybe a power issue to nrf24, I will try to add capacitor just for testing if can resolve this problem.

                              1 Reply Last reply
                              0
                              • skywatchS Offline
                                skywatchS Offline
                                skywatch
                                wrote on last edited by
                                #615

                                Same here too. With Rpi3 gateway. Would stop for hours, maybe start agian for a hour or two and then stop.
                                Have been running debug mode for last day, no idea what happened, but been stable so perhaps something in the update/upgrade made a problem and has now been fixed.
                                Will keep an eye on here and let you know if I find anything.

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

                                  Looks as if it happened after updating Home Assistant, but that should be 2 different things right ?

                                  1 Reply Last reply
                                  0
                                  • Richard van der PlasR Richard van der Plas

                                    hi there, somehow my gateway seems to stop receiving data after a day or so from my sensors,
                                    restarting the service seems to solve it for a time, how can i troubleshoot this issue ?

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

                                    @Richard-van-der-Plas what version are you using?

                                    Carl HC Richard van der PlasR 2 Replies Last reply
                                    0
                                    • gohanG gohan

                                      @Richard-van-der-Plas what version are you using?

                                      Carl HC Offline
                                      Carl HC Offline
                                      Carl H
                                      wrote on last edited by
                                      #618

                                      @gohan for me version dev (2.2)

                                      1 Reply Last reply
                                      0
                                      • skywatchS Offline
                                        skywatchS Offline
                                        skywatch
                                        wrote on last edited by
                                        #619

                                        dev 2.2.0 beta

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

                                          Have you tried both ethernet or mqtt?

                                          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