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 423.1k 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.
  • J Offline
    J Offline
    jacikaas
    wrote on last edited by jacikaas
    #234

    Hello,

    Could someone answer: if i have RPi NRF24 GW, how I could connect MYSController from other computer (for example from Windows computer)?

    1. Is it possible to make that type connection with RPi NRF24 GW?
    2. May I use some integrated web server for this type of connection in RPi to make it work? Is there are easier solutions?

    EDIT: no matter, already answered it by myself :)
    Its easy becose it's like Ethernet GW.

    luizrrochaL 1 Reply Last reply
    0
    • OliO Oli

      OK, I did it, I f....g did it, and guess what...
      s...t happened again.
      Everything went as it should, no errors at all, but no ttyUSBMySensorsGateway...
      0_1483469802904_Nowy dokument tekstowy.jpg

      log error message:
      2017-01-03 19:56:38.784 MySensors: Using serial port: /dev/ttyUSBMySensorsGateway
      2017-01-03 19:56:38.785 Error: MySensors: Error opening serial port!
      2017-01-03 19:56:39.785 MySensors: retrying in 30 seconds...

      and again...
      and again...
      ...

      any help would be appreciated.

      luizrrochaL Offline
      luizrrochaL Offline
      luizrrocha
      wrote on last edited by
      #235

      @Oli: when you do a "ls /dev" is ttyUSBMySensorsGateway shown ?

      luizrrochaL 1 Reply Last reply
      0
      • luizrrochaL luizrrocha

        @Oli: when you do a "ls /dev" is ttyUSBMySensorsGateway shown ?

        luizrrochaL Offline
        luizrrochaL Offline
        luizrrocha
        wrote on last edited by
        #236

        @Oli: by the way, the name of the port you used is ttyMySensorsGateway, not ttyUSBMySensorsGateway:

        @mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway

        Is the gateway running, ie, "ps -ef "grep my" shows a process there ?

        Cheers,

        Luiz

        luizrrochaL 1 Reply Last reply
        0
        • luizrrochaL luizrrocha

          @Oli: by the way, the name of the port you used is ttyMySensorsGateway, not ttyUSBMySensorsGateway:

          @mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway

          Is the gateway running, ie, "ps -ef "grep my" shows a process there ?

          Cheers,

          Luiz

          luizrrochaL Offline
          luizrrochaL Offline
          luizrrocha
          wrote on last edited by
          #237

          @Oli: sorry, correct syntax is ps -ef | grep my

          OliO 1 Reply Last reply
          0
          • luizrrochaL luizrrocha

            @Oli: sorry, correct syntax is ps -ef | grep my

            OliO Offline
            OliO Offline
            Oli
            wrote on last edited by
            #238

            @luizrrocha
            pi@raspberrypi ~ $ ls /dev

            autofs mmcblk0p1 stderr tty36 ttyAMA0
            block mmcblk0p2 stdin tty37 ttyMySensorsGateway
            btrfs-control net stdout tty38 ttyprintk
            bus network_latency tty tty39 ttyUSB0
            cachefiles network_throughput tty0 tty4 ttyUSB20
            char null tty1 tty40 uhid
            console ppp tty10 tty41 uinput
            cpu_dma_latency ptmx tty11 tty42 urandom
            cuse pts tty12 tty43 vc-cma
            disk ram0 tty13 tty44 vchiq
            fb0 ram1 tty14 tty45 vcio
            fd ram10 tty15 tty46 vc-mem
            full ram11 tty16 tty47 vcs
            fuse ram12 tty17 tty48 vcs1
            gpiomem ram13 tty18 tty49 vcs2
            hwrng ram14 tty19 tty5 vcs3
            i2c-1 ram15 tty2 tty50 vcs4
            input ram2 tty20 tty51 vcs5
            kmsg ram3 tty21 tty52 vcs6
            log ram4 tty22 tty53 vcsa
            loop0 ram5 tty23 tty54 vcsa1
            loop1 ram6 tty24 tty55 vcsa2
            loop2 ram7 tty25 tty56 vcsa3
            loop3 ram8 tty26 tty57 vcsa4
            loop4 ram9 tty27 tty58 vcsa5
            loop5 random tty28 tty59 vcsa6
            loop6 raw tty29 tty6 vhci
            loop7 root tty3 tty60 watchdog
            loop-control serial tty30 tty61 watchdog0
            MAKEDEV shm tty31 tty62 xconsole
            mapper snd tty32 tty63 zero
            mem sndstat tty33 tty7
            memory_bandwidth spidev0.0 tty34 tty8
            mmcblk0 spidev0.1 tty35 tty9

            pi@raspberrypi ~ $ ps -ef | grep my

            root 2079 1 1 18:40 ? 00:02:49 /usr/local/bin/mysgw -b
            pi 4214 4181 0 21:25 pts/2 00:00:00 grep --color=auto my

            luizrrochaL 1 Reply Last reply
            1
            • OliO Oli

              @luizrrocha
              pi@raspberrypi ~ $ ls /dev

              autofs mmcblk0p1 stderr tty36 ttyAMA0
              block mmcblk0p2 stdin tty37 ttyMySensorsGateway
              btrfs-control net stdout tty38 ttyprintk
              bus network_latency tty tty39 ttyUSB0
              cachefiles network_throughput tty0 tty4 ttyUSB20
              char null tty1 tty40 uhid
              console ppp tty10 tty41 uinput
              cpu_dma_latency ptmx tty11 tty42 urandom
              cuse pts tty12 tty43 vc-cma
              disk ram0 tty13 tty44 vchiq
              fb0 ram1 tty14 tty45 vcio
              fd ram10 tty15 tty46 vc-mem
              full ram11 tty16 tty47 vcs
              fuse ram12 tty17 tty48 vcs1
              gpiomem ram13 tty18 tty49 vcs2
              hwrng ram14 tty19 tty5 vcs3
              i2c-1 ram15 tty2 tty50 vcs4
              input ram2 tty20 tty51 vcs5
              kmsg ram3 tty21 tty52 vcs6
              log ram4 tty22 tty53 vcsa
              loop0 ram5 tty23 tty54 vcsa1
              loop1 ram6 tty24 tty55 vcsa2
              loop2 ram7 tty25 tty56 vcsa3
              loop3 ram8 tty26 tty57 vcsa4
              loop4 ram9 tty27 tty58 vcsa5
              loop5 random tty28 tty59 vcsa6
              loop6 raw tty29 tty6 vhci
              loop7 root tty3 tty60 watchdog
              loop-control serial tty30 tty61 watchdog0
              MAKEDEV shm tty31 tty62 xconsole
              mapper snd tty32 tty63 zero
              mem sndstat tty33 tty7
              memory_bandwidth spidev0.0 tty34 tty8
              mmcblk0 spidev0.1 tty35 tty9

              pi@raspberrypi ~ $ ps -ef | grep my

              root 2079 1 1 18:40 ? 00:02:49 /usr/local/bin/mysgw -b
              pi 4214 4181 0 21:25 pts/2 00:00:00 grep --color=auto my

              luizrrochaL Offline
              luizrrochaL Offline
              luizrrocha
              wrote on last edited by
              #239

              @Oli : the port name is actually ttyMySensorsGateway, you have to correct the definition of the gateway on Domoticz to use it....

              Luiz

              OliO 1 Reply Last reply
              0
              • J jacikaas

                Hello,

                Could someone answer: if i have RPi NRF24 GW, how I could connect MYSController from other computer (for example from Windows computer)?

                1. Is it possible to make that type connection with RPi NRF24 GW?
                2. May I use some integrated web server for this type of connection in RPi to make it work? Is there are easier solutions?

                EDIT: no matter, already answered it by myself :)
                Its easy becose it's like Ethernet GW.

                luizrrochaL Offline
                luizrrochaL Offline
                luizrrocha
                wrote on last edited by
                #240

                @jacikaas : on MYSController go to Settings -> Gateway -> TCP/IP and add the IP address of the Gateway and use port 5003. It works even if the gateway is feeding data to Domoticz, so you can monitor your sensors in "raw" mode.

                Cheers,

                Luiz

                1 Reply Last reply
                0
                • luizrrochaL luizrrocha

                  @Oli : the port name is actually ttyMySensorsGateway, you have to correct the definition of the gateway on Domoticz to use it....

                  Luiz

                  OliO Offline
                  OliO Offline
                  Oli
                  wrote on last edited by Oli
                  #241

                  @luizrrocha as You can see, on the picture above, I've wrote that ttyUSBMySensors.... is from my previous backup copy. On the same pictures You can also see that I can choose only from three serial ports: USB0, USB20 and AMA0. Thera are no ttyMySensorsGateway despite that it is present after ls /dev.
                  And that's the problem, I dont know how to make it present in the serial ports popup menu.

                  luizrrochaL 1 Reply Last reply
                  0
                  • OliO Oli

                    @luizrrocha as You can see, on the picture above, I've wrote that ttyUSBMySensors.... is from my previous backup copy. On the same pictures You can also see that I can choose only from three serial ports: USB0, USB20 and AMA0. Thera are no ttyMySensorsGateway despite that it is present after ls /dev.
                    And that's the problem, I dont know how to make it present in the serial ports popup menu.

                    luizrrochaL Offline
                    luizrrochaL Offline
                    luizrrocha
                    wrote on last edited by
                    #242

                    @Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?

                    And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.

                    OliO 1 Reply Last reply
                    0
                    • luizrrochaL luizrrocha

                      @Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?

                      And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.

                      OliO Offline
                      OliO Offline
                      Oli
                      wrote on last edited by
                      #243

                      @luizrrocha

                      @luizrrocha said:

                      @Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?

                      Of course I did that, I started from the scratch... but when it did not work I try to restore my backup... but it did not work also...

                      @luizrrocha said:

                      And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.

                      simple... I have no free LAN on my rotuer... there is more, I also have raZberry daughter board (Z-Wave) connected to same Raspberry Pi GPIO port. And till today everything works perfect until... "Better is the enemy of the good" ;-)

                      1 Reply Last reply
                      0
                      • OliO Offline
                        OliO Offline
                        Oli
                        wrote on last edited by Oli
                        #244

                        OK I found the solution (thanks to @luizrrocha). I change

                        ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
                        to
                        ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway and now its working.

                        Question is, It's only workaround (in my case) or there is bug in the installation guide?

                        luizrrochaL 1 Reply Last reply
                        0
                        • OliO Oli

                          OK I found the solution (thanks to @luizrrocha). I change

                          ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
                          to
                          ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway and now its working.

                          Question is, It's only workaround (in my case) or there is bug in the installation guide?

                          luizrrochaL Offline
                          luizrrochaL Offline
                          luizrrocha
                          wrote on last edited by
                          #245

                          @Oli : if both the gateway and Domoticz run on the same Raspi, there is no physical network involved, hence the 127.0.0.1 dummy local address is used by Domoticz to talk to the gateway on the same machine, just using port 5003... and since you use localhost (127.0.0.1, a virtual network) there is no need to create a virtual USB port which is what you did...

                          OliO 1 Reply Last reply
                          0
                          • luizrrochaL luizrrocha

                            @Oli : if both the gateway and Domoticz run on the same Raspi, there is no physical network involved, hence the 127.0.0.1 dummy local address is used by Domoticz to talk to the gateway on the same machine, just using port 5003... and since you use localhost (127.0.0.1, a virtual network) there is no need to create a virtual USB port which is what you did...

                            OliO Offline
                            OliO Offline
                            Oli
                            wrote on last edited by
                            #246

                            @luizrrocha interesting... step by step instruction?

                            luizrrochaL 1 Reply Last reply
                            0
                            • OliO Oli

                              @luizrrocha interesting... step by step instruction?

                              luizrrochaL Offline
                              luizrrochaL Offline
                              luizrrocha
                              wrote on last edited by
                              #247

                              @Oli: delete the Makefile.inc file on mysensors folder
                              ./configure --my-gateway=ethernet
                              make
                              sudo ./bin/mysgw -b
                              go to domoticz and create a new MySensors Gateway with LAN, inform 127.0.0.1 as the address and 5003 as the port...

                              that should do the trick.

                              1 Reply Last reply
                              1
                              • ysinhY ysinh

                                A tiny hint for the users of domoticz :
                                ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB20
                                make
                                sudo ./examples_linux/mysGateway -d

                                :) i hope this helps
                                then in the hardware setup
                                MySensors Gateway USB
                                serial port: /dev/ttyUSB20

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

                                @Oli luizrocha's configuration seems interesting, but just in case your still wanting the serial, from above, has worked for me in the past, but I have since switched to OH2:

                                @ysinh said:

                                A tiny hint for the users of domoticz :
                                ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB20
                                make
                                sudo ./examples_linux/mysGateway -d

                                :) i hope this helps
                                then in the hardware setup
                                MySensors Gateway USB
                                serial port: /dev/ttyUSB20

                                1 Reply Last reply
                                0
                                • W Offline
                                  W Offline
                                  Wackid
                                  wrote on last edited by
                                  #249

                                  I am also not get it to work in Domoticz tried the USB serial and ethernet way.

                                  It's a testing pi. Where i didn't connected the radio. Because it's still in the Nano. Could that be the issue? I guess not.

                                  1 Reply Last reply
                                  0
                                  • M marceloaqno

                                    @aand @Tag @jirm MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future.

                                    T Offline
                                    T Offline
                                    Tag
                                    wrote on last edited by Tag
                                    #250

                                    @marceloaqno, @jirm, @aand

                                    Hi!,

                                    I started a new topic for Mysensors Gateway on OrangePI (OPI), Here

                                    Hope this is okay,

                                    Kind regards,

                                    Tag

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      Mihai
                                      wrote on last edited by Mihai
                                      #251

                                      The Pi MQTT Gateway with IRQ connected may handle better the messages into a loaded network than Ethernet MQTT Gateway where IRQ is not used? (with NRF24)
                                      Also I would like to know if I can use the other pins of RPi to connect some digital sensors directly there.

                                      1 Reply Last reply
                                      0
                                      • W Offline
                                        W Offline
                                        Wackid
                                        wrote on last edited by
                                        #252

                                        @Oli
                                        Stupid question... Did you mount the radio? Because I thought I would like to test if it works. (without radio) but that doesn't work.

                                        Mounted a radio and ethernet gateway is working.

                                        1 Reply Last reply
                                        0
                                        • eyesoftE Offline
                                          eyesoftE Offline
                                          eyesoft
                                          wrote on last edited by
                                          #253

                                          @Mihai

                                          Maybe i'm wrong but IRQ is used on all gateways if you read above :
                                          """
                                          Improving throughput for nrf24
                                          There is another method were the interrupt pin from the nrf24 modules is used to inform when a new message arrives and it's immediately added to a queue for further processing
                                          """
                                          for the second part yes you can use other pins on RPi ... i have RF module NRF24L01 for gateway and DHT11 on RPi.

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


                                          10

                                          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