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 998.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.
  • H Offline
    H Offline
    hek
    Admin
    wrote on last edited by
    #28

    @gvorster said:

    I'm a bit confused about gateway and controller. Can I use a Pi as both gateway and controller?

    Yes!

    1 Reply Last reply
    0
    • jerseyguy1996J Offline
      jerseyguy1996J Offline
      jerseyguy1996
      wrote on last edited by
      #29

      I'm using the virtual serial port option and one of the things that I notice is that the port gets created where the tty group only has write access.

      pi@raspberrypi:/dev/pts $ ls -l
      total 0
      crw--w---- 1 root tty  136, 0 Oct 10 18:49 0
      

      I can change it manually but if I reboot the raspberry pi it goes back to write access only. How do I get it to be created with 'rw' access?

      1 Reply Last reply
      1
      • jerseyguy1996J Offline
        jerseyguy1996J Offline
        jerseyguy1996
        wrote on last edited by
        #30

        Nevermind....When I set "--my-serial-groupname=tty" in ./configure it works.

        1 Reply Last reply
        2
        • N Offline
          N Offline
          NiklasO
          wrote on last edited by
          #31

          Where do I put the security stuff for the signing?

          G 1 Reply Last reply
          0
          • N NiklasO

            Where do I put the security stuff for the signing?

            G Offline
            G Offline
            GertSanders
            Hardware Contributor
            wrote on last edited by GertSanders
            #32

            @NiklasO

            Signing is not yet supported in the current Raspi Gateway.

            N 1 Reply Last reply
            0
            • G GertSanders

              @NiklasO

              Signing is not yet supported in the current Raspi Gateway.

              N Offline
              N Offline
              NiklasO
              wrote on last edited by NiklasO
              #33

              @GertSanders said:

              @NiklasO

              Signing is not yet supported in the current Raspi Gateway.

              Ok, thanks.
              I now see that in this thread. Did not see the earlier discussion in the comments on the main page. Hope to see support soon.

              I have disabled signing for the time being but I want it on ofc. ;)

              1 Reply Last reply
              0
              • B Offline
                B Offline
                b0rmann
                wrote on last edited by
                #34

                what's about RS485 transport on raspberry pi? especially from wired RS485 mysensors network to MQTT

                M 1 Reply Last reply
                0
                • R Offline
                  R Offline
                  raulandresmoch
                  wrote on last edited by
                  #35

                  Can you use the RP as gateway and also as controller?

                  N 1 Reply Last reply
                  0
                  • R raulandresmoch

                    Can you use the RP as gateway and also as controller?

                    N Offline
                    N Offline
                    NiklasO
                    wrote on last edited by NiklasO
                    #36

                    @raulandresmoch
                    Sure. I use this with Domoticz on my Pi.
                    "MySensors Gateway with LAN interface" as hardware pointing to 127.0.0.1:5003
                    Also, I can connect with other controller software like MYSController from my other computers to my Pi-IP at port 5003.

                    1 Reply Last reply
                    0
                    • B b0rmann

                      what's about RS485 transport on raspberry pi? especially from wired RS485 mysensors network to MQTT

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

                      @b0rmann I could add support for RS485, but I'll need your help to test because I don't have the hardware.

                      B 1 Reply Last reply
                      1
                      • DrJeffD Offline
                        DrJeffD Offline
                        DrJeff
                        wrote on last edited by
                        #38

                        The line above
                        ./examples_linux/mysGatewaymsyGateway -h
                        needs to be corrected to
                        ./examples_linux/mysGateway -h
                        Thanks for all the hard work! Awesome!

                        mfalkviddM 1 Reply Last reply
                        1
                        • DrJeffD DrJeff

                          The line above
                          ./examples_linux/mysGatewaymsyGateway -h
                          needs to be corrected to
                          ./examples_linux/mysGateway -h
                          Thanks for all the hard work! Awesome!

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

                          @DrJeff Thanks for noticing. It should be fixed now.

                          1 Reply Last reply
                          1
                          • M marceloaqno

                            @b0rmann I could add support for RS485, but I'll need your help to test because I don't have the hardware.

                            B Offline
                            B Offline
                            b0rmann
                            wrote on last edited by
                            #40

                            @marceloaqno

                            i am ready. after compiled and upload example node sketch i have on rs485 to usb convertor (/dev/ttyUSB0) output nice mysensors data:

                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            01 FF 00 58 07 02 FF FF - FF 02 03 07 FF 03 66 04
                            

                            testing playground photo: 0_1476563966730_playground.jpg

                            1 Reply Last reply
                            2
                            • M Offline
                              M Offline
                              mvader
                              wrote on last edited by mvader
                              #41

                              I noticed the "improve rf24" section was added. and it mentioned high cpu.
                              i set mine up a few weeks ago and am not using an interrupt on my radio.
                              my cpu is only 2-3%
                              I'm curious if the high cpu problem is seen by many?

                              also a 2nd question.
                              if i were to add an interrupt. how can i "re-configure" my setup to include that new -switch
                              or do i have to remove everything and re-clone from git hub and start over?

                              1 Reply Last reply
                              0
                              • shfgS Offline
                                shfgS Offline
                                shfg
                                wrote on last edited by
                                #42

                                Thanks for this excellent port. I'm having an issue running it as an MQTT gateway on the RPi (Model A). It compiles without hassles, but cant make a successful MQTT connection. I get the following:

                                mysGateway: Starting gateway...
                                mysGateway: Protocol version - 2.0.1-beta
                                mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
                                mysGateway: TSF:LRT:OK
                                mysGateway: TSM:INIT
                                mysGateway: TSM:INIT:TSP OK
                                mysGateway: TSM:INIT:GW MODE
                                mysGateway: TSM:READY
                                mysGateway: MCO:REG:NOT NEEDED
                                mysGateway: MCO:BGN:STP
                                mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
                                mysGateway: Attempting MQTT connection...
                                mysGateway: connected to 127.0.0.1
                                mysGateway: Attempting MQTT connection...
                                mysGateway: connected to 127.0.0.1
                                mysGateway: Attempting MQTT connection...
                                mysGateway: connected to 127.0.0.1

                                ... those attempts recurring every 15 seconds or so, and in that time, no other activity is processed.
                                From the code, I would have expected 'MQTT connected' rather than 'connected to 127.0.0.1'?

                                I have mosquitto running on the pi in this case - which is working perfectly in other tests. Both serial and ethernet gateway modes compile and run perfectly, only the mqtt mode not working.
                                Has anyone else had a similar issue?

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

                                  @marceloaqno what about gpio interrupts, is that supported?

                                  I'm thinking to use a RPi as a pulse counter for water, electricity and gas with no radio, just ethernet or mqtt.
                                  In combination with a I2C display, this could be a nice project ;)

                                  Greetz,
                                  Eric

                                  1 Reply Last reply
                                  0
                                  • Christian SimonsenC Offline
                                    Christian SimonsenC Offline
                                    Christian Simonsen
                                    wrote on last edited by
                                    #44

                                    Hi,

                                    I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. And I have followed the steps under "install and build", which seem to have worked fine. I didn't make any changes to the conf file. However now Im stuck. How do I setup the Raspberry Pi with the NRF24L01+ as a gateway in the MyController Gateway setup page in Safari?

                                    M 1 Reply Last reply
                                    0
                                    • shfgS shfg

                                      Thanks for this excellent port. I'm having an issue running it as an MQTT gateway on the RPi (Model A). It compiles without hassles, but cant make a successful MQTT connection. I get the following:

                                      mysGateway: Starting gateway...
                                      mysGateway: Protocol version - 2.0.1-beta
                                      mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
                                      mysGateway: TSF:LRT:OK
                                      mysGateway: TSM:INIT
                                      mysGateway: TSM:INIT:TSP OK
                                      mysGateway: TSM:INIT:GW MODE
                                      mysGateway: TSM:READY
                                      mysGateway: MCO:REG:NOT NEEDED
                                      mysGateway: MCO:BGN:STP
                                      mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
                                      mysGateway: Attempting MQTT connection...
                                      mysGateway: connected to 127.0.0.1
                                      mysGateway: Attempting MQTT connection...
                                      mysGateway: connected to 127.0.0.1
                                      mysGateway: Attempting MQTT connection...
                                      mysGateway: connected to 127.0.0.1

                                      ... those attempts recurring every 15 seconds or so, and in that time, no other activity is processed.
                                      From the code, I would have expected 'MQTT connected' rather than 'connected to 127.0.0.1'?

                                      I have mosquitto running on the pi in this case - which is working perfectly in other tests. Both serial and ethernet gateway modes compile and run perfectly, only the mqtt mode not working.
                                      Has anyone else had a similar issue?

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

                                      @shfg There were some reports about this problem in the past, do you see any error messages in your mosquitto log?

                                      @ericvdb yes, you can attach a function to handle an interruption like this:

                                      uint8_t mode = FALLING;	// Valid options are: CHANGE, FALLING, RISING
                                      uint8_t physPin = 16;	// Choose a pin that fits your needs
                                      
                                      void irqHandler(void)
                                      {
                                      	// Process the interrupt
                                      }
                                      
                                      void setup() {
                                      	attachInterrupt(physPin, irqHandler, mode);
                                      }
                                      

                                      Support for I2C was added in the latest version.

                                      shfgS 2 Replies Last reply
                                      0
                                      • Christian SimonsenC Christian Simonsen

                                        Hi,

                                        I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. And I have followed the steps under "install and build", which seem to have worked fine. I didn't make any changes to the conf file. However now Im stuck. How do I setup the Raspberry Pi with the NRF24L01+ as a gateway in the MyController Gateway setup page in Safari?

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

                                        @Christian-Simonsen If you are using the default build options for the RPi gateway, in MyController (Resources -> Add gateway) choose Ethernet for the type and enter your RPi ip address in the Host name field.

                                        Christian SimonsenC 1 Reply Last reply
                                        0
                                        • T Offline
                                          T Offline
                                          Toyman
                                          wrote on last edited by
                                          #47

                                          Is it compatible with pre-2.0 versions eg 1.5?

                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          17

                                          Online

                                          12.0k

                                          Users

                                          11.2k

                                          Topics

                                          113.4k

                                          Posts


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