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 428.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.
  • hekH hek

    This thread contains comments for the article "Building a Raspberry Pi Gateway" posted on MySensors.org.

    marceltrapmanM Offline
    marceltrapmanM Offline
    marceltrapman
    Mod
    wrote on last edited by
    #282

    I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).

    Unfortunately I get the same error on both.

    Any ideas what could be going on here?

    I am running the latest gateway and the latest raspbian.

    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.0
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: connect: Connection refused
    mysgw: failed to connect
    mysgw: Eth: connect
    mysgw: connect: Connection refused
    mysgw: failed to connect
    mysgw: Eth: connect
    

    Fulltime Servoy Developer
    Parttime Moderator MySensors board

    I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
    I have a FABtotum to print cases.

    LaMB95L M 2 Replies Last reply
    0
    • marceltrapmanM marceltrapman

      I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).

      Unfortunately I get the same error on both.

      Any ideas what could be going on here?

      I am running the latest gateway and the latest raspbian.

      mysgw: Starting gateway...
      mysgw: Protocol version - 2.1.0
      mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: connect: Connection refused
      mysgw: failed to connect
      mysgw: Eth: connect
      mysgw: connect: Connection refused
      mysgw: failed to connect
      mysgw: Eth: connect
      
      LaMB95L Offline
      LaMB95L Offline
      LaMB95
      wrote on last edited by
      #283

      @marceltrapman

      I am using a Rasp Pi 3 as well.
      I can't even proceed further in the tutorial cause of this error cause nothing works after it.

      1 Reply Last reply
      0
      • marceltrapmanM marceltrapman

        I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).

        Unfortunately I get the same error on both.

        Any ideas what could be going on here?

        I am running the latest gateway and the latest raspbian.

        mysgw: Starting gateway...
        mysgw: Protocol version - 2.1.0
        mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0
        mysgw: TSF:LRT:OK
        mysgw: TSM:INIT
        mysgw: TSF:WUR:MS=0
        mysgw: TSM:INIT:TSP OK
        mysgw: TSM:INIT:GW MODE
        mysgw: TSM:READY:ID=0,PAR=0,DIS=0
        mysgw: MCO:REG:NOT NEEDED
        mysgw: connect: Connection refused
        mysgw: failed to connect
        mysgw: Eth: connect
        mysgw: connect: Connection refused
        mysgw: failed to connect
        mysgw: Eth: connect
        
        M Offline
        M Offline
        marceloaqno
        Code Contributor
        wrote on last edited by
        #284

        @marceltrapman @LaMB95
        Could you post the complete ./configure command used to configure the gateway?

        marceltrapmanM LaMB95L 2 Replies Last reply
        0
        • M marceloaqno

          @marceltrapman @LaMB95
          Could you post the complete ./configure command used to configure the gateway?

          marceltrapmanM Offline
          marceltrapmanM Offline
          marceltrapman
          Mod
          wrote on last edited by
          #285

          @marceloaqno Sure, forgot it :)

          sudo ./configure \
              --my-gateway=ethernet \
              --my-controller-ip-address=192.168.1.xx \
              --my-port=5003 \
              --my-transport=nrf24
          

          Fulltime Servoy Developer
          Parttime Moderator MySensors board

          I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
          I have a FABtotum to print cases.

          M 1 Reply Last reply
          0
          • marceltrapmanM marceltrapman

            @marceloaqno Sure, forgot it :)

            sudo ./configure \
                --my-gateway=ethernet \
                --my-controller-ip-address=192.168.1.xx \
                --my-port=5003 \
                --my-transport=nrf24
            
            M Offline
            M Offline
            marceloaqno
            Code Contributor
            wrote on last edited by
            #286

            @marceltrapman Are you sure it's not a problem with your controller?
            Have you tried connecting to your controller using telnet?

            telnet 192.168.1.x 5003
            
            marceltrapmanM 2 Replies Last reply
            0
            • M marceloaqno

              @marceltrapman @LaMB95
              Could you post the complete ./configure command used to configure the gateway?

              LaMB95L Offline
              LaMB95L Offline
              LaMB95
              wrote on last edited by LaMB95
              #287

              @marceloaqno !0_1484503346236_Screen Shot 2017-01-15 at 10.01.01 PM.png
              0_1484503640735_Screen Shot 2017-01-15 at 10.06.53 PM.png
              Is this what you meant?

              M 1 Reply Last reply
              0
              • M marceloaqno

                @marceltrapman Are you sure it's not a problem with your controller?
                Have you tried connecting to your controller using telnet?

                telnet 192.168.1.x 5003
                
                marceltrapmanM Offline
                marceltrapmanM Offline
                marceltrapman
                Mod
                wrote on last edited by
                #288

                @marceloaqno not sure no.

                So, I downloaded telnet on the same raspi that I want to use as the gateway and the issue seems to be that port 5003 is not available.

                Funny but how do I solve this.
                It can't be an issue with the firewall because it allows all traffic on the internal network.

                Fulltime Servoy Developer
                Parttime Moderator MySensors board

                I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                I have a FABtotum to print cases.

                1 Reply Last reply
                0
                • M marceloaqno

                  @marceltrapman Are you sure it's not a problem with your controller?
                  Have you tried connecting to your controller using telnet?

                  telnet 192.168.1.x 5003
                  
                  marceltrapmanM Offline
                  marceltrapmanM Offline
                  marceltrapman
                  Mod
                  wrote on last edited by
                  #289

                  @marceloaqno and the same from the controller to the gateway gives the same error on that port :(

                  Fulltime Servoy Developer
                  Parttime Moderator MySensors board

                  I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                  I have a FABtotum to print cases.

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

                    @Reza Yes, you can use rs485 in the RPi.

                    ./configure --my-transport=rs485 --my-rs485-serial-port=<YOUR_SERIAL_PORT>
                    

                    For more options, run:

                    ./configure -h
                    
                    R 1 Reply Last reply
                    0
                    • LaMB95L LaMB95

                      @marceloaqno !0_1484503346236_Screen Shot 2017-01-15 at 10.01.01 PM.png
                      0_1484503640735_Screen Shot 2017-01-15 at 10.06.53 PM.png
                      Is this what you meant?

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

                      @LaMB95 No, I meant the options you used when you ran ./configure

                      LaMB95L 1 Reply Last reply
                      0
                      • tianaT tiana

                        Is it possible to use the second ISP on my raspberypi 3 to connect NRF24L01+ and what will be the wiring diagram, also what have to change in mygsw library

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

                        @tiana
                        "The Broadcom SoC has three independant SPI interfaces, however only one of these is brought out to the GPIO connector, and that one SPI interface has 2 Chip enable lines."
                        More info here: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=22608

                        1 Reply Last reply
                        0
                        • marceltrapmanM marceltrapman

                          @marceloaqno and the same from the controller to the gateway gives the same error on that port :(

                          marceltrapmanM Offline
                          marceltrapmanM Offline
                          marceltrapman
                          Mod
                          wrote on last edited by marceltrapman
                          #293

                          @marceloaqno from the docs I assume it is the gateway that has to open up port 5003 but I guess it does not because it can't connect to the ethernet (for some reason) or am I wrong?

                          Fulltime Servoy Developer
                          Parttime Moderator MySensors board

                          I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                          I have a FABtotum to print cases.

                          marceltrapmanM M 2 Replies Last reply
                          0
                          • M marceloaqno

                            @Reza Yes, you can use rs485 in the RPi.

                            ./configure --my-transport=rs485 --my-rs485-serial-port=<YOUR_SERIAL_PORT>
                            

                            For more options, run:

                            ./configure -h
                            
                            R Offline
                            R Offline
                            Reza
                            wrote on last edited by
                            #294

                            @marceloaqno
                            i means that without arduino and usb port, similar to raspberry gateway ( raspberry +nrf24)
                            i means connect rs485 module to GPIO raspberry pi :) with domoticz

                            M 1 Reply Last reply
                            0
                            • M marceloaqno

                              @LaMB95 No, I meant the options you used when you ran ./configure

                              LaMB95L Offline
                              LaMB95L Offline
                              LaMB95
                              wrote on last edited by LaMB95
                              #295

                              @marceloaqno 0_1484505404805_Screen Shot 2017-01-15 at 10.36.17 PM.png

                              I m sorry I m new to using a raspberry pi and its for a project.
                              But if this is not what you asked for could you be a little more specific :$1_1484506047866_Screen Shot 2017-01-15 at 10.46.49 PM.png 0_1484506047866_Screen Shot 2017-01-15 at 10.46.35 PM.png

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

                                use sudo ;)

                                LaMB95L 1 Reply Last reply
                                0
                                • marceltrapmanM marceltrapman

                                  @marceloaqno from the docs I assume it is the gateway that has to open up port 5003 but I guess it does not because it can't connect to the ethernet (for some reason) or am I wrong?

                                  marceltrapmanM Offline
                                  marceltrapmanM Offline
                                  marceltrapman
                                  Mod
                                  wrote on last edited by
                                  #297

                                  Oh and one other thing, when I set the gateway up for MQTT it works.

                                  Fulltime Servoy Developer
                                  Parttime Moderator MySensors board

                                  I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                                  I have a FABtotum to print cases.

                                  1 Reply Last reply
                                  0
                                  • marceltrapmanM marceltrapman

                                    @marceloaqno from the docs I assume it is the gateway that has to open up port 5003 but I guess it does not because it can't connect to the ethernet (for some reason) or am I wrong?

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

                                    @marceltrapman

                                    If you use the --my-controller-ip-address= option, the gateway will act as a client and attempt to conect to the supplied ip and port. If you want the gateway to open port 5003, omit this option.

                                    marceltrapmanM 1 Reply Last reply
                                    0
                                    • R Reza

                                      @marceloaqno
                                      i means that without arduino and usb port, similar to raspberry gateway ( raspberry +nrf24)
                                      i means connect rs485 module to GPIO raspberry pi :) with domoticz

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

                                      @Reza You could connect the rs485 to the RPi UART and use the option --my-rs485-serial-port=/dev/ttyAMA0, but you need to turning off the UART functioning as a serial console.

                                      Or, to make things easier:
                                      rs485 <==> TTL/USB <==> RPi

                                      R 1 Reply Last reply
                                      1
                                      • M marceloaqno

                                        @Reza You could connect the rs485 to the RPi UART and use the option --my-rs485-serial-port=/dev/ttyAMA0, but you need to turning off the UART functioning as a serial console.

                                        Or, to make things easier:
                                        rs485 <==> TTL/USB <==> RPi

                                        R Offline
                                        R Offline
                                        Reza
                                        wrote on last edited by
                                        #300

                                        @marceloaqno
                                        i am beginner and i can not turning off the UART functioning. . . also on some board usb port after power off/on lost and i should disconnect/connect cable... i test your steps serial gateway with raspberry and GPIO with virtual usb serial . and i see this problem solve and after power off/on gateway is connect .
                                        i suggest that you add this commands to page of rs485 gateway step by step and update this .
                                        (https://www.mysensors.org/build/rs485)

                                        I thank you for hard working and trying

                                        b0rmannB 1 Reply Last reply
                                        0
                                        • R Reza

                                          @marceloaqno
                                          i am beginner and i can not turning off the UART functioning. . . also on some board usb port after power off/on lost and i should disconnect/connect cable... i test your steps serial gateway with raspberry and GPIO with virtual usb serial . and i see this problem solve and after power off/on gateway is connect .
                                          i suggest that you add this commands to page of rs485 gateway step by step and update this .
                                          (https://www.mysensors.org/build/rs485)

                                          I thank you for hard working and trying

                                          b0rmannB Offline
                                          b0rmannB Offline
                                          b0rmann
                                          wrote on last edited by b0rmann
                                          #301

                                          @Reza

                                          if you want use rpi /dev/ttyAMA0 for rs485 gateway -

                                          1. remove string "console=serial0,115200" from /boot/cmdline.txt
                                          2. add strings "enable_uart=1" and "dtoverlay=pi3-disable-bt" to /boot/config.txt (only on rpi3)
                                          3. reboot raspi
                                          R 1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          20

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          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