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. General Discussion
  3. Gateway question

Gateway question

Scheduled Pinned Locked Moved General Discussion
23 Posts 6 Posters 4.6k Views 5 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.
  • raptorjrR Offline
    raptorjrR Offline
    raptorjr
    wrote on last edited by
    #1

    I'm totally new to mySensors and is trying to understand how it works and what I need to get started.
    Are all kind of gateways dependent on the NRF24L01? There is no way to make a gateway without this?
    Or is it possible to have a arduino and ESP8266 connected acting as a sensor and then a Raspberry Pi3 as controller/gateway, since the Pi3 has builtin wifi?

    If I understand things right I must use a NRF24L01, but asking if I got it all wrong?

    Boots33B 1 Reply Last reply
    0
    • raptorjrR raptorjr

      I'm totally new to mySensors and is trying to understand how it works and what I need to get started.
      Are all kind of gateways dependent on the NRF24L01? There is no way to make a gateway without this?
      Or is it possible to have a arduino and ESP8266 connected acting as a sensor and then a Raspberry Pi3 as controller/gateway, since the Pi3 has builtin wifi?

      If I understand things right I must use a NRF24L01, but asking if I got it all wrong?

      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by Boots33
      #2

      @raptorjr The basic setup looks like this

      Controller <--------------------->Gateway<--------------------->Sensor Nodes

      The controller is a Hardware/Software device that allows you to interact with your MySensor nodes. For example if you had a set of outdoor lights controlled by a MySensors Node and you wanted to turn them on at sunset you would use the controller to set that up. A list of compatible controllers is here

      The Gateway is the bridge between your sensor nodes and the controller. So the gateway needs a NRF24L01+ to communicate with the sensors and also needs a way to attach to the controller. This can be via USB, Ehternet or WiFI depending on what your controller supports and which gateway you build. You can see the Gateways here

      Once you have the controller and Gateway in place that is when the fun starts! Your Nodes all need a NRF24L01+ so they can communicate with the gateway, they can also talk to each other. Some Nodes can also be set as repeaters, this makes it possible to spread the network out beyond the range of the original gateway.

      1 Reply Last reply
      0
      • tbowmoT Offline
        tbowmoT Offline
        tbowmo
        Admin
        wrote on last edited by
        #3

        @raptorjr

        We do support radioless gateways, with sensors connected directly. But it's not nearly as fun :)

        We basically have 3 sensor "networks" that we support:

        1. Nrf24l01+, 2g4 radio link
        2. Rfm69, 433, 868 or 915 MHz radio link
        3. Rs485 wired multidrop link

        (please note that we do not support mixing two different network types on a single gateway)

        raptorjrR 1 Reply Last reply
        0
        • mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          As @tbowmo said, you can connect sensors directly to the gateway (esp8266 in your case). No need for nrf radio.

          More information: https://forum.mysensors.org/topic/4066/ethernet-gateway-working-as-sensor-node-it-s-possible/

          raptorjrR 1 Reply Last reply
          0
          • tbowmoT tbowmo

            @raptorjr

            We do support radioless gateways, with sensors connected directly. But it's not nearly as fun :)

            We basically have 3 sensor "networks" that we support:

            1. Nrf24l01+, 2g4 radio link
            2. Rfm69, 433, 868 or 915 MHz radio link
            3. Rs485 wired multidrop link

            (please note that we do not support mixing two different network types on a single gateway)

            raptorjrR Offline
            raptorjrR Offline
            raptorjr
            wrote on last edited by
            #5

            @tbowmo
            I want and will be part of the fun =) But before I found MySensors, and the existence of controllers I ordered a bunch of things thinking I had to do everything by myself. Therefore I don't have any RF modules. And since it takes a week or two to order and get the cheep ones I would like to get something going while waiting.

            And in my first order I got some temp sensors and other things I could control, a arduino and two esp8266. I also ordered a RaspPi3.

            So my intention now is to make a node with my arduino/esp8266 and some sensors attached, and get it to talk with my Domoticz controller on the Pi3. Just wanted to make sure that it was possible to go all Wifi.

            But I do see the fun with RF and will be doing that in a few weeks. But I have been waiting all summer for the vacation to end so I could start to experiment and can't wait two more weeks =)

            Thank you for your help.

            1 Reply Last reply
            1
            • raptorjrR Offline
              raptorjrR Offline
              raptorjr
              wrote on last edited by
              #6

              So I realize that I need to do some more shopping. But to avoid to end up short of things again I thought I'd ask what to buy.

              I need NRF for gateway. Is there any benefit of buying one with an antenna for better reception? Or should I just buy a pack of 10 ordinary and that would be enough for the gateway too?

              What kind of Arduinos to use for their nodes? Arduino Pro Mini? Or is Sensebender a better solution? I'm just looking for a decent starting ground to be able to create a few nodes. Don't really have any plans for more nodes right now, just for future ideas.

              Anything else that is good to have?

              1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                As @tbowmo said, you can connect sensors directly to the gateway (esp8266 in your case). No need for nrf radio.

                More information: https://forum.mysensors.org/topic/4066/ethernet-gateway-working-as-sensor-node-it-s-possible/

                raptorjrR Offline
                raptorjrR Offline
                raptorjr
                wrote on last edited by
                #7

                @mfalkvidd

                So I am really trying to understand how this works, and unfortunately the links don't help that much. Feeling really stupid.

                Either it is possible but no one has done it or I don't understand how it has been done. But after reading everything I can find I still don't understand how it works.

                All the examples about gateways include a NRF module, with exception of having the gateway directly on a ESP8266. But then you get very limited with I/O ports.

                I would like to have a Arduino as a gateway, and instead of using NRF for communication it should use a ESP8266. No sketch or anything on the ESP, only used for communication. All sensors and things should be connected to the Arduino.

                What am I missing?

                mfalkviddM 1 Reply Last reply
                0
                • raptorjrR raptorjr

                  @mfalkvidd

                  So I am really trying to understand how this works, and unfortunately the links don't help that much. Feeling really stupid.

                  Either it is possible but no one has done it or I don't understand how it has been done. But after reading everything I can find I still don't understand how it works.

                  All the examples about gateways include a NRF module, with exception of having the gateway directly on a ESP8266. But then you get very limited with I/O ports.

                  I would like to have a Arduino as a gateway, and instead of using NRF for communication it should use a ESP8266. No sketch or anything on the ESP, only used for communication. All sensors and things should be connected to the Arduino.

                  What am I missing?

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

                  @raptorjr I don't know if anyone has done it before but it might be possible to use rs485 between the esp and the Arduino. See the example at https://github.com/mysensors/MySensors/blob/development/examples/GatewaySerialRS485/GatewaySerialRS485.ino

                  Or ditch the esp and connect the arduino to a computer directly

                  1 Reply Last reply
                  0
                  • raptorjrR Offline
                    raptorjrR Offline
                    raptorjr
                    wrote on last edited by
                    #9

                    This will be far more complicated than I have knowledge for right now.

                    I just think it is kind of strange that the combination of a Wifi enabled controller and Wifi enabled node is not supported. For me as a beginner it is just another media for communication.

                    mfalkviddM 1 Reply Last reply
                    0
                    • raptorjrR raptorjr

                      This will be far more complicated than I have knowledge for right now.

                      I just think it is kind of strange that the combination of a Wifi enabled controller and Wifi enabled node is not supported. For me as a beginner it is just another media for communication.

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

                      @raptorjr wifi-enabled nodes are supported, in the ways described earlier.

                      If you want to connect an Arduino to a gateway by wire, that is also supported by using rs485 serial communication.

                      Is there another wired protocol between nodes and gateway that you would like to use instead of serial communication?

                      raptorjrR 1 Reply Last reply
                      0
                      • mfalkviddM mfalkvidd

                        @raptorjr wifi-enabled nodes are supported, in the ways described earlier.

                        If you want to connect an Arduino to a gateway by wire, that is also supported by using rs485 serial communication.

                        Is there another wired protocol between nodes and gateway that you would like to use instead of serial communication?

                        raptorjrR Offline
                        raptorjrR Offline
                        raptorjr
                        wrote on last edited by
                        #11

                        @mfalkvidd
                        Since I have ordered a bunch of NRF cards this will not be a problem in a few weeks. Just trying to understand and learn things while waiting.

                        I would like to make a node that consist of a arduino nano with sensors attached, and a ESP connected to the arduino for communication. I would then like to add that node to Domoticz running on a Pi3 with Wifi.

                        mfalkviddM 1 Reply Last reply
                        0
                        • raptorjrR raptorjr

                          @mfalkvidd
                          Since I have ordered a bunch of NRF cards this will not be a problem in a few weeks. Just trying to understand and learn things while waiting.

                          I would like to make a node that consist of a arduino nano with sensors attached, and a ESP connected to the arduino for communication. I would then like to add that node to Domoticz running on a Pi3 with Wifi.

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

                          @raptorjr that should be possibe by using rs485 serial communication between the esp and the Arduino. Rs485 supports up to 32 connected Arduinos from what I have understood (I have not had any use for rs485 though so I have not tried it)

                          raptorjrR 1 Reply Last reply
                          0
                          • mfalkviddM mfalkvidd

                            @raptorjr that should be possibe by using rs485 serial communication between the esp and the Arduino. Rs485 supports up to 32 connected Arduinos from what I have understood (I have not had any use for rs485 though so I have not tried it)

                            raptorjrR Offline
                            raptorjrR Offline
                            raptorjr
                            wrote on last edited by
                            #13

                            @mfalkvidd
                            Maybe I'm starting to understand now =) The RS485 gateway sketch on the Arduino, and then I need a sketch on the ESP that transfer the serial commands from the Arduino through Wifi?

                            1 Reply Last reply
                            0
                            • mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by
                              #14

                              Not quite.

                              The device that converts between one protocol (rs485, nrf, rfm) and another protocol (serial, wifi, wired ethernet) is called a gateway in MySensors vocabulary.

                              So the esp would be a gateway. The esp talks wifi to the controller and rs485 to the Arduinos.

                              raptorjrR 1 Reply Last reply
                              0
                              • mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by mfalkvidd
                                #15

                                The naming in the MySensors examples can be a bit confusing though.

                                GatewaySerialRS485 uses rs485 to talk to sensors and (rs232) serial to talk to the controller
                                GatewayESP8266 Uses nrf or rfm to talk to sensors and wireless ethernet to talk to the controller
                                GatewayW5100 Uses nrf or rfm to talk to sensors and wired ethernet to talk to the controller

                                YveauxY 1 Reply Last reply
                                0
                                • mfalkviddM mfalkvidd

                                  The naming in the MySensors examples can be a bit confusing though.

                                  GatewaySerialRS485 uses rs485 to talk to sensors and (rs232) serial to talk to the controller
                                  GatewayESP8266 Uses nrf or rfm to talk to sensors and wireless ethernet to talk to the controller
                                  GatewayW5100 Uses nrf or rfm to talk to sensors and wired ethernet to talk to the controller

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #16

                                  @mfalkvidd said:

                                  GatewayESP8266 Uses nrf or rfm

                                  Side note: I'm not sure about the combination rfm & esp, as I've never seen a working setup...

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • mfalkviddM mfalkvidd

                                    Not quite.

                                    The device that converts between one protocol (rs485, nrf, rfm) and another protocol (serial, wifi, wired ethernet) is called a gateway in MySensors vocabulary.

                                    So the esp would be a gateway. The esp talks wifi to the controller and rs485 to the Arduinos.

                                    raptorjrR Offline
                                    raptorjrR Offline
                                    raptorjr
                                    wrote on last edited by
                                    #17

                                    @mfalkvidd
                                    So there isn't really any combination that would work for me?

                                    I would need a ESP8266Gateway that would talk RS485 to my Arduino with all the sensors?

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • raptorjrR raptorjr

                                      @mfalkvidd
                                      So there isn't really any combination that would work for me?

                                      I would need a ESP8266Gateway that would talk RS485 to my Arduino with all the sensors?

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

                                      @raptorjr no here is no example. It might be really easy to make one though. There is very little difference between the sketches. This might be all that's needed to create a rs485 to wifi:

                                      Enable RS485 transport layer
                                      #define MY_RS485
                                      
                                      // Define this to enables DE-pin management on defined pin 
                                      #define MY_RS485_DE_PIN 2
                                      
                                      // Set RS485 baud rate to use
                                      #define MY_RS485_BAUD_RATE 9600
                                      
                                      #define MY_GATEWAY_ESP8266
                                      
                                      #define MY_ESP8266_SSID "MySSID"
                                      #define MY_ESP8266_PASSWORD "MyVerySecretPassword"
                                      
                                      1 Reply Last reply
                                      0
                                      • mfalkviddM Offline
                                        mfalkviddM Offline
                                        mfalkvidd
                                        Mod
                                        wrote on last edited by mfalkvidd
                                        #19

                                        You might want to join forces with @hausinger who wanted to build the same thing just a few days ago at the end of this thread: https://forum.mysensors.org/topic/1947/rs485-rs232-serial-transport-class-for-mysensors-org/94

                                        https://forum.mysensors.org/topic/3451/serial-gateway-with-several-sensors-connected-to-it/10 explains the main difference between rs232 and rs485

                                        1 Reply Last reply
                                        0
                                        • raptorjrR Offline
                                          raptorjrR Offline
                                          raptorjr
                                          wrote on last edited by
                                          #20

                                          Thank you, I could look at it, but I think it is way beyond my knowledge level.

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


                                          27

                                          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