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.
  • 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
                      • skywatchS Offline
                        skywatchS Offline
                        skywatch
                        wrote on last edited by
                        #149

                        @gtortone

                        sudo ./bin/mysgw -d and sudo ./bin/mysgw -h now both give 'command not found' - which is odd as they were both working eariler ???
                        A reboot makes no difference. Although after reboot I see mysgw running in 'top' but even stopping that service and trying sudo mysgw -d again doesn't seem to work.

                        Any idea whats wrong? Any suggestions to get this going?

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

                          @skywatch

                          if you did

                          make install

                          the mysgw executable is in /usr/local/bin directory then you have to launch it with:

                          /usr/local/bin/mysgw -d

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

                            @gtortone

                            That doesn't appear anywhere on this tutorial, so maybe it needs adding for completion?

                            Anyway the output is now......

                            pi@PiDomePi:~ $ sudo /usr/local/bin/mysgw -d
                            mysgw: Starting gateway...
                            mysgw: Protocol version - 2.0.1-beta
                            mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
                            mysgw: TSF:LRT:OK
                            mysgw: TSM:INIT
                            mysgw: TSM:INIT:TSP OK
                            mysgw: TSM:INIT:GW MODE
                            mysgw: TSM:READY
                            mysgw: MCO:REG:NOT NEEDED
                            mysgw: MCO:BGN:STP
                            mysgw: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1

                            When i did build install I missed out bit for the leds, can I just re-run the ./config and 'make' then 'make install' again? Or will that cause problems??
                            I just think that the lights will be useful in the early stages of getting this running...

                            Thanks for the help, no way would I have got that without you! :)

                            G 1 Reply Last reply
                            0
                            • skywatchS skywatch

                              @gtortone

                              That doesn't appear anywhere on this tutorial, so maybe it needs adding for completion?

                              Anyway the output is now......

                              pi@PiDomePi:~ $ sudo /usr/local/bin/mysgw -d
                              mysgw: Starting gateway...
                              mysgw: Protocol version - 2.0.1-beta
                              mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
                              mysgw: TSF:LRT:OK
                              mysgw: TSM:INIT
                              mysgw: TSM:INIT:TSP OK
                              mysgw: TSM:INIT:GW MODE
                              mysgw: TSM:READY
                              mysgw: MCO:REG:NOT NEEDED
                              mysgw: MCO:BGN:STP
                              mysgw: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1

                              When i did build install I missed out bit for the leds, can I just re-run the ./config and 'make' then 'make install' again? Or will that cause problems??
                              I just think that the lights will be useful in the early stages of getting this running...

                              Thanks for the help, no way would I have got that without you! :)

                              G Offline
                              G Offline
                              gtortone
                              wrote on last edited by
                              #152

                              @skywatch

                              You're welcome !

                              you can (re)run configure, make, make install when you want,
                              but I suggest to stop the mysgw executable before launch "make install"

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

                                Thank you! :)

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

                                  Can I just check that this is OK? .....

                                  ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

                                  Can you see any problems here, it seemed to work but I hope to test fully this week, maybe tomorrow.....

                                  G 1 Reply Last reply
                                  0
                                  • skywatchS skywatch

                                    Can I just check that this is OK? .....

                                    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

                                    Can you see any problems here, it seemed to work but I hope to test fully this week, maybe tomorrow.....

                                    G Offline
                                    G Offline
                                    gtortone
                                    wrote on last edited by
                                    #155

                                    @skywatch
                                    Hi, options for "configure" are ok, I suggest you to double check your cabling !

                                    :)

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

                                      What makes you think that the cabling is wrong? - I checked and can't see any problem....can you be less cryptic please? :)

                                      G 1 Reply Last reply
                                      0
                                      • skywatchS skywatch

                                        What makes you think that the cabling is wrong? - I checked and can't see any problem....can you be less cryptic please? :)

                                        G Offline
                                        G Offline
                                        gtortone
                                        wrote on last edited by
                                        #157

                                        @skywatch
                                        I meaning that often is also useful to check cable two (or three) times !
                                        but if you already did it... ok !

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

                                          Ah, OK then :) - I thought there was something in the console data I posted that meant there was a problem! - Tomorrow to build a sensor and get that going.... Thanks again!

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


                                          7

                                          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