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.0k 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.
  • R Offline
    R Offline
    Reza
    wrote on last edited by Reza
    #267
    This post is deleted!
    1 Reply Last reply
    0
    • eyesoftE eyesoft

      @Mihai
      you can attach analogue sensor to ESP2866 with espeasy firmware ... more info here : http://www.letscontrolit.com/wiki/index.php/ESPEasy ... i'm using one ESP8266-12E and i have good results and Uptime: 74209 minutes (usb powered).
      i'm using IRQ on NRF24L01 connected to my Rpi, but i don't have many sensor with nrf+arduino (only 2) and i had no problems ... i don't if IRQ improve the reliability and i never play with irq fron nrf on arduino.
      regarding retain=true have a look here : http://www.hivemq.com/blog/mqtt-essentials-part-8-retained-messages
      for more reliability on mqtt i think you can use qos=1 ( The broker/client will deliver the message at least once, with confirmation required.), but all depends on your set-up .. not all messages need special attention.

      M Offline
      M Offline
      Mihai
      wrote on last edited by
      #268

      @eyesoft
      As far as I understand, MySensors relay on PubSubClient for MQTT and it does not allow to publish messages with QOS=1 or 2, only 0.
      Retain is different that QOS, it offers the possibility to recover the state for a device that loose connection for a while (e.g. after a restart). I find it very usefull. For example I have to restart the controller. When come back I got all states to their real values if retain=true. Otherwise they goes to the default, usually 0.
      I have now 6 nodes, each with several sensors and relays.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Reza
        wrote on last edited by
        #269

        please help :(
        every time after reboot i have to run this code

        sudo ./bin/mysgw -d
        

        so built a virtual usb but after reboot ....
        0_1484136446585_kkddk.jpg

        how put this code in startup ? :( please help thank you

        M 1 Reply Last reply
        0
        • R Reza

          please help :(
          every time after reboot i have to run this code

          sudo ./bin/mysgw -d
          

          so built a virtual usb but after reboot ....
          0_1484136446585_kkddk.jpg

          how put this code in startup ? :( please help thank you

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

          @Reza

          From the Building a Raspberry Pi Gateway article:

          If you wish to install:

          sudo make install
          

          The last command will provide instructions for your system on how to start the gateway on every boot.

          R 2 Replies Last reply
          0
          • M marceloaqno

            @Reza

            From the Building a Raspberry Pi Gateway article:

            If you wish to install:

            sudo make install
            

            The last command will provide instructions for your system on how to start the gateway on every boot.

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

            @marceloaqno
            i do it but after reboot serial lost again :(
            just with command work again

            sudo ./bin/mysgw -d
            
            1 Reply Last reply
            0
            • M marceloaqno

              @Reza

              From the Building a Raspberry Pi Gateway article:

              If you wish to install:

              sudo make install
              

              The last command will provide instructions for your system on how to start the gateway on every boot.

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

              @marceloaqno
              i'm sorry
              after sudo make install i must run this lines:

               sudo systemctl enable mysgw.service
               sudo systemctl start mysgw.service
              
              

              sorry thank you

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Reza
                wrote on last edited by
                #273

                @marceloaqno can you build a rs485 gateway on raspberry pi ?

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

                  @Mihai yes you are right

                  1 Reply Last reply
                  0
                  • Shantanu MhapankarS Offline
                    Shantanu MhapankarS Offline
                    Shantanu Mhapankar
                    wrote on last edited by
                    #275

                    This data that I get when I run ./mysgw --d , where is it stored and how can I get it to push it on cloud? Please help.

                    T 1 Reply Last reply
                    0
                    • Shantanu MhapankarS Shantanu Mhapankar

                      This data that I get when I run ./mysgw --d , where is it stored and how can I get it to push it on cloud? Please help.

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

                      @Shantanu-Mhapankar

                      Data is not stored... to store the data and do something usefull with it (or not) you need a controller. I use mycontroller, and from this software you can "push" data to an external server.
                      I use my controller, but i am sure that other controller software also has this feature.

                      1 Reply Last reply
                      0
                      • Shantanu MhapankarS Offline
                        Shantanu MhapankarS Offline
                        Shantanu Mhapankar
                        wrote on last edited by
                        #277

                        @Tag , The controller must be using something to get the data right? How can we do it directly without using the controller?

                        T 1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          pete1450
                          wrote on last edited by
                          #278

                          @hek It looks like development is the default branch in the repository. I was following the build instructions and couldn't figure out why I kept getting "connection refused". Just typing up a troubleshooting post when I saw my log said 2.2.0-beta. Sure enough when I grabbed master(2.1.0) instead it ran fine. Should probably add a checkout in the instructions.

                          mfalkviddM 1 Reply Last reply
                          0
                          • P pete1450

                            @hek It looks like development is the default branch in the repository. I was following the build instructions and couldn't figure out why I kept getting "connection refused". Just typing up a troubleshooting post when I saw my log said 2.2.0-beta. Sure enough when I grabbed master(2.1.0) instead it ran fine. Should probably add a checkout in the instructions.

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

                            @pete1450 could you clarify which instructions should be updated?

                            The instructions at https://www.mysensors.org/about/arduino recommend using the Arduino IDE Board manager, which will get the latest stable version.

                            Edit: Now I see. The link in the first post in this thread. It doesn't mention the master branch because up until Dec 25th the development branch was required. But now that 2.1 has been released the instructions should indeed use the stable version. I've updated the instructions. Thanks for noticing!

                            1 Reply Last reply
                            1
                            • Shantanu MhapankarS Shantanu Mhapankar

                              @Tag , The controller must be using something to get the data right? How can we do it directly without using the controller?

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

                              @Shantanu-Mhapankar

                              This is also new for me since i do not send data into any cloud... but i can imagine that you can use MQTT. (see https://www.mysensors.org/build/mqtt_gateway for more details) is important that the receiving side supports MQTT. in this case google is your friend ;)

                              if you do a ./configure --help you will find you can build the mysensors gateway with MQTT support

                              ./configure --help 
                              ...
                                  --my-gateway=[ethernet|serial|mqtt]
                                                              Gateway type, set to none to disable gateway feature. [ethernet]
                                  --my-node-id=<ID>           Disable gateway feature and run as a node with given id.
                                  --my-controller-url-address=<URL>
                                                              Controller or MQTT broker url.
                                  --my-controller-ip-address=<IP>
                                                              Controller or MQTT broker ip.
                                  --my-port=<PORT>            The port to keep open on gateway mode.
                                                              If gateway is set to mqtt, it sets the broker port.
                              ...
                              
                              1 Reply Last reply
                              0
                              • LaMB95L Offline
                                LaMB95L Offline
                                LaMB95
                                wrote on last edited by
                                #281

                                ran sudo ./bin/mysgw -d
                                I keep getting mysgw: accept: Bad File Descriptor.
                                Any possible cause ?

                                1 Reply Last reply
                                0
                                • 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
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          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