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.
  • M marceloaqno

    @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
    It should be:

    ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
    
    H Offline
    H Offline
    hausinger
    wrote on last edited by
    #129

    @marceloaqno said:

    @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
    It should be:

    ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
    

    Hi @marceloaqno
    Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

    Did this configuration work on your System?
    Are you sure, that my configuration is ok? (with the "--")
    Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

    I'm now not at home (Business trip), if I get home, i will try your "Screen" command

    H 1 Reply Last reply
    0
    • jmmorgan83J Offline
      jmmorgan83J Offline
      jmmorgan83
      wrote on last edited by
      #130

      I followed the instruction above to make a mysgw file, but no file was generated.

      mfalkviddM 1 Reply Last reply
      0
      • jmmorgan83J jmmorgan83

        I followed the instruction above to make a mysgw file, but no file was generated.

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

        @jmmorgan83 do you think there is any information you can share might help us help you?

        1 Reply Last reply
        0
        • jmmorgan83J Offline
          jmmorgan83J Offline
          jmmorgan83
          wrote on last edited by
          #132

          I reset everything and ran it again. It did generate the file this time. Thanks, - Now to test it.

          1 Reply Last reply
          0
          • jmmorgan83J Offline
            jmmorgan83J Offline
            jmmorgan83
            wrote on last edited by
            #133

            Has anyone gotten the raspberry pi gateway to work with Openhab on the same raspberry pi? I have both the virtual and mqtt gateways working, but I can get either one to communicate with Openhab.

            1 Reply Last reply
            0
            • H hausinger

              @marceloaqno said:

              @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
              It should be:

              ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
              

              Hi @marceloaqno
              Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

              Did this configuration work on your System?
              Are you sure, that my configuration is ok? (with the "--")
              Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

              I'm now not at home (Business trip), if I get home, i will try your "Screen" command

              H Offline
              H Offline
              hausinger
              wrote on last edited by
              #134

              @hausinger said:

              @marceloaqno said:

              @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
              It should be:

              ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
              

              Hi @marceloaqno
              Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

              Did this configuration work on your System?
              Are you sure, that my configuration is ok? (with the "--")
              Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

              I'm now not at home (Business trip), if I get home, i will try your "Screen" command

              So I'm at home today and make some Test.
              The screen comand gives me some strange characters, thats ok I think.

              But if i start the Gateway, I only get the same messages as shown in my other post.

              Here are 2 Pics that show you, how it look like.

              I also tried to make the gw with a baudrate of 9600, but still the same issues.!0_1480068509863_mysGateway.JPG 0_1480068518084_screen.JPG

              M 1 Reply Last reply
              0
              • PureGrainP Offline
                PureGrainP Offline
                PureGrain
                wrote on last edited by
                #135

                Has anyone been able to get this to successfully work with a Vera?

                1 Reply Last reply
                0
                • RogerB68R Offline
                  RogerB68R Offline
                  RogerB68
                  wrote on last edited by
                  #136

                  Have been running MySensors for some time now with a EthernetGW running on Arduino. To clean-up the installation, I'm trying to get the Gateway running on my Raspberry instead but something stops the make process.

                  pi@raspberrypi ~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24                       [SECTION] Detecting target machine.
                  [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041.
                  [OK] init system detected: sysvinit
                  [SECTION] Saving configuration.
                  [SECTION] Cleaning previous builds.
                  [OK] Finished.
                  pi@raspberrypi ~/MySensors $ make
                  gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_ARCH_RASPBERRYPI -DMY_PORT=5003  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/RPi -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                  cc1: error: bad value (cortex-a7) for -mtune switch
                  Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
                  make: *** [build/drivers/Linux/log.o] Error 1
                  

                  Any hints what I have done wrong ?

                  TigroenotT 1 Reply Last reply
                  0
                  • RogerB68R Offline
                    RogerB68R Offline
                    RogerB68
                    wrote on last edited by
                    #137

                    Issue solved, manual update of compiler from 4.6,3 -> 4.7.2 enables the make process. Similar problem also reported in post.

                    Using

                    • sudo apt-get update
                    • sudo apt-get upgrade

                    does not upgrade compiler. I used instruction according to How to upgrade GCC to 4.7+.

                    1 Reply Last reply
                    0
                    • RogerB68R RogerB68

                      Have been running MySensors for some time now with a EthernetGW running on Arduino. To clean-up the installation, I'm trying to get the Gateway running on my Raspberry instead but something stops the make process.

                      pi@raspberrypi ~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24                       [SECTION] Detecting target machine.
                      [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041.
                      [OK] init system detected: sysvinit
                      [SECTION] Saving configuration.
                      [SECTION] Cleaning previous builds.
                      [OK] Finished.
                      pi@raspberrypi ~/MySensors $ make
                      gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_ARCH_RASPBERRYPI -DMY_PORT=5003  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/RPi -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                      cc1: error: bad value (cortex-a7) for -mtune switch
                      Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
                      make: *** [build/drivers/Linux/log.o] Error 1
                      

                      Any hints what I have done wrong ?

                      TigroenotT Offline
                      TigroenotT Offline
                      Tigroenot
                      wrote on last edited by
                      #138

                      @RogerB68 I had the same situation. I have removed the mtune parameter from the config file and compilation went fine. I don't know what it affects though. :)

                      1 Reply Last reply
                      0
                      • jmmorgan83J Offline
                        jmmorgan83J Offline
                        jmmorgan83
                        wrote on last edited by
                        #139

                        I created a virtual serial port using this ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway. I can see the port in the dev folder, but when I run dmesg I do not see it listed and therefore my openhab can not find it. How can I fix this?

                        M 1 Reply Last reply
                        0
                        • H hausinger

                          @hausinger said:

                          @marceloaqno said:

                          @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
                          It should be:

                          ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
                          

                          Hi @marceloaqno
                          Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

                          Did this configuration work on your System?
                          Are you sure, that my configuration is ok? (with the "--")
                          Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

                          I'm now not at home (Business trip), if I get home, i will try your "Screen" command

                          So I'm at home today and make some Test.
                          The screen comand gives me some strange characters, thats ok I think.

                          But if i start the Gateway, I only get the same messages as shown in my other post.

                          Here are 2 Pics that show you, how it look like.

                          I also tried to make the gw with a baudrate of 9600, but still the same issues.!0_1480068509863_mysGateway.JPG 0_1480068518084_screen.JPG

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

                          @hausinger After the command:

                          sudo ./bin/mysgw -d
                          

                          It wasn't supposed to go back to bash, the gateway would wait for new messages.
                          I'm not sure what's going on with your setup because I tested your configuration options here and it worked.

                          H 1 Reply Last reply
                          0
                          • jmmorgan83J jmmorgan83

                            I created a virtual serial port using this ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway. I can see the port in the dev folder, but when I run dmesg I do not see it listed and therefore my openhab can not find it. How can I fix this?

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

                            @jmmorgan83 You may need another name for the port, such as

                            ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020
                            
                            jmmorgan83J 1 Reply Last reply
                            0
                            • M marceloaqno

                              @jmmorgan83 You may need another name for the port, such as

                              ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020
                              
                              jmmorgan83J Offline
                              jmmorgan83J Offline
                              jmmorgan83
                              wrote on last edited by
                              #142

                              @marceloaqno
                              Unfortunately, no luck:(.

                              1 Reply Last reply
                              0
                              • M marceloaqno

                                @hausinger After the command:

                                sudo ./bin/mysgw -d
                                

                                It wasn't supposed to go back to bash, the gateway would wait for new messages.
                                I'm not sure what's going on with your setup because I tested your configuration options here and it worked.

                                H Offline
                                H Offline
                                hausinger
                                wrote on last edited by
                                #143

                                @marceloaqno said:

                                @hausinger After the command:

                                sudo ./bin/mysgw -d
                                

                                It wasn't supposed to go back to bash, the gateway would wait for new messages.
                                I'm not sure what's going on with your setup because I tested your configuration options here and it worked.

                                Thank you for your answer. What can I do now? Can I check, that this port is unused? And how can I check this?
                                Or is there another problem?

                                1 Reply Last reply
                                0
                                • jmmorgan83J Offline
                                  jmmorgan83J Offline
                                  jmmorgan83
                                  wrote on last edited by
                                  #144

                                  FYI: I do not think the Rpi gateway works with Openhab on the same unit. I have tried both the virtual serial port and mqtt, and neither will work with Openhab 1.83.

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    gtortone
                                    wrote on last edited by
                                    #145
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      gtortone
                                      wrote on last edited by
                                      #146
                                      This post is deleted!
                                      1 Reply Last reply
                                      0
                                      • skywatchS Offline
                                        skywatchS Offline
                                        skywatch
                                        wrote on last edited by
                                        #147

                                        Hi all,

                                        So I built this and all seems to be well. But.....how do I test it properly?

                                        I also installed pidome and have that able to 'see' the MSYGW, but it advises to only add it if it is working.

                                        So how to know if mysgw is working OK? Is there somewhere a step-by-step way to do this?

                                        1 Reply Last reply
                                        0
                                        • G Offline
                                          G Offline
                                          gtortone
                                          wrote on last edited by
                                          #148

                                          @skywatch try to run it with "mysgw -d" .

                                          Enabling debug mode you can see on console every message and diagnostics...

                                          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