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 an Ethernet Gateway

💬 Building an Ethernet Gateway

Scheduled Pinned Locked Moved Announcements
133 Posts 42 Posters 36.1k Views 35 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #63

    Are you running domoticz on a raspberry? If so, you could skip the arduino and connect the radio on the rpi directly.

    1 Reply Last reply
    0
    • H hiddenuser

      @Ed1500 Thanks for you feedback. I have switched over to using W5100. However I have noticed that for some reason I am missing a data which is sent over nrf24. The gaps in the data are random and I can't seem to figure out why this is happening. BTW I am using domoticz on a pi to get the data. Initially I was using mysensor over usb to get the data and used to work fine. In order to get the update OTA I am trying to switch to ethernet Gateway and does not seem to work :(

      //#define MY_DEBUG
      
      #define MY_RADIO_NRF24
      #define MY_GATEWAY_W5100
      
      #define MY_SOFTSPI
      #define MY_SOFT_SPI_SCK_PIN 14
      #define MY_SOFT_SPI_MISO_PIN 16
      #define MY_SOFT_SPI_MOSI_PIN 15
      
      #define MY_RF24_CE_PIN 5
      #define MY_RF24_CS_PIN 6
      
      
      #define MY_IP_ADDRESS 192,168,0,66   // If this is disabled, DHCP is used to retrieve address
      #define MY_PORT 5003
      
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
      
      
      #define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  7  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  7  // Transmit led pin
      
      
      #include <Ethernet.h>
      #include <MySensors.h>
      
      
      void setup(){
        delay(10000);
      }
      
      void loop(){
      }
      ``
      E Offline
      E Offline
      Ed1500
      wrote on last edited by
      #64

      @hiddenuser Your code seems OK apart from the fact it doesnt seem to do anything. Randomly missing data when using an nrf24 could be due to data just not arriving over the link although with shot distance that is rare. Nevertheless you could disconnect the w5100 and check a serial.print for a while to see if data is still missing.
      I dont have much experience using the soft spi, only using hardware SPI. You may want to consider Gohan' s suggestion

      H 1 Reply Last reply
      0
      • E Ed1500

        @hiddenuser Your code seems OK apart from the fact it doesnt seem to do anything. Randomly missing data when using an nrf24 could be due to data just not arriving over the link although with shot distance that is rare. Nevertheless you could disconnect the w5100 and check a serial.print for a while to see if data is still missing.
        I dont have much experience using the soft spi, only using hardware SPI. You may want to consider Gohan' s suggestion

        H Offline
        H Offline
        hiddenuser
        wrote on last edited by hiddenuser
        #65

        @Ed1500 @gohan Thanks. I am trying to create an ehternet gateway so I can do OTAs.

        E 1 Reply Last reply
        0
        • H hiddenuser

          @Ed1500 @gohan Thanks. I am trying to create an ehternet gateway so I can do OTAs.

          E Offline
          E Offline
          Ed1500
          wrote on last edited by
          #66

          @hiddenuser I understand. Not sure if that is possible through a W5100/arduino, I guess it is but might not be easy :-)

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #67

            Ethernet gateway works either way, it is only a matter of personal taste. Personally I did go for the raspberry gw because I have less stuff around and I save an arduino board.

            1 Reply Last reply
            0
            • Jonathan CaesJ Offline
              Jonathan CaesJ Offline
              Jonathan Caes
              wrote on last edited by
              #68

              Hi everyone,
              Is it possible to build an ethernet gateway with a RFM69 radio module?
              Because I tried this a while ago and that didn't work because of a software problem in the library's. Is that already solved or not?
              Thanks!

              E 1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #69

                With development branch it should be solved, but I still have to try

                1 Reply Last reply
                0
                • Jonathan CaesJ Jonathan Caes

                  Hi everyone,
                  Is it possible to build an ethernet gateway with a RFM69 radio module?
                  Because I tried this a while ago and that didn't work because of a software problem in the library's. Is that already solved or not?
                  Thanks!

                  E Offline
                  E Offline
                  Ed1500
                  wrote on last edited by
                  #70

                  @Jonathan-Caes I did, with an RFM69HW an arduino pro mini and a funduino Ethernetmodule. Used the setup from computourist in github https://github.com/computourist/RFM69-MQTT-client

                  1 Reply Last reply
                  0
                  • Toni RamosT Offline
                    Toni RamosT Offline
                    Toni Ramos
                    wrote on last edited by
                    #71

                    hello @Ed1500, i have the same problem as @Mitja-Blazinsek. i have a w5100 module (funduino), arduino pro mini and nrf24 radio. i try to use your tip, including a delay in setup() but it doen't work yet, the gateway isn't reached using ping. is necesary another change? did you move the setup() function in the program? thanks!!

                    E 1 Reply Last reply
                    0
                    • Toni RamosT Toni Ramos

                      hello @Ed1500, i have the same problem as @Mitja-Blazinsek. i have a w5100 module (funduino), arduino pro mini and nrf24 radio. i try to use your tip, including a delay in setup() but it doen't work yet, the gateway isn't reached using ping. is necesary another change? did you move the setup() function in the program? thanks!!

                      E Offline
                      E Offline
                      Ed1500
                      wrote on last edited by Ed1500
                      #72

                      @Toni-Ramos Sorry to hear that. Are you using Soft SPI or hardware SPI for both?
                      Can you get any connection if you just use it as webserver without the NRF24?

                      1 Reply Last reply
                      0
                      • Toni RamosT Offline
                        Toni RamosT Offline
                        Toni Ramos
                        wrote on last edited by
                        #73

                        @Ed1500 i'm using softSPI as the example. I can see ping works correctly if i comment "#define MY_RADIO_NRF24". If not, the gateway shows the following messages continuosly:

                        0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
                        0;255;3;0;9;TSM:INIT
                        0;255;3;0;9;TSF:WUR:MS=0
                        0;255;3;0;9;!TSM:INIT:TSP FAIL
                        0;255;3;0;9;TSM:FAIL:CNT=1
                        0;255;3;0;9;TSM:FAIL:PDT
                        0;255;3;0;9;TSM:FAIL:RE-INIT

                        1 Reply Last reply
                        0
                        • Toni RamosT Offline
                          Toni RamosT Offline
                          Toni Ramos
                          wrote on last edited by
                          #74

                          @Ed1500 after tests with different versions of the library i discovered a bad welded pin in the nrf24. It seens to work fine now,i'll conect a node to the gateway and check all

                          E 1 Reply Last reply
                          1
                          • Toni RamosT Toni Ramos

                            @Ed1500 after tests with different versions of the library i discovered a bad welded pin in the nrf24. It seens to work fine now,i'll conect a node to the gateway and check all

                            E Offline
                            E Offline
                            Ed1500
                            wrote on last edited by
                            #75

                            @Toni-Ramos Glad you got it solved. apologies I had not seen yr earlier reply yet, but thats no longer relevant.
                            Always good to check the joints :-)

                            1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #76

                              What is the best way to make the gateway wait for ip address (it's set to use dhcp) when power goes down? I noticed that the gateway starts faster than the router and doesn't get the ip address so I had to push the reset button to get it to work.

                              mfalkviddM 1 Reply Last reply
                              0
                              • gohanG gohan

                                What is the best way to make the gateway wait for ip address (it's set to use dhcp) when power goes down? I noticed that the gateway starts faster than the router and doesn't get the ip address so I had to push the reset button to get it to work.

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

                                @gohan maybe add a wait call in before()? Not sure if before() is run early enough, but it might be worth a try.

                                Maybe the library can be modified to try for a longer time before giving up.

                                1 Reply Last reply
                                0
                                • gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #78

                                  Maybe I could make a check if there is no client connected I could reset the board, but I was wondering if there is any was to know if the system has a valid ip

                                  1 Reply Last reply
                                  0
                                  • Mitja BlazinsekM Offline
                                    Mitja BlazinsekM Offline
                                    Mitja Blazinsek
                                    wrote on last edited by
                                    #79

                                    hi after long time i finaly get new w5100 module now the test sketch from arduino ide for ethernet like web server are working fine bur still don't work as a gateway in domoticz or mycontroler. i just open example gatewayw5100 from my sensor libary and upload to mega bard bit status in my controler is always down af course i set the gateway in my controler :Enabled
                                    Enabled
                                    Type
                                    Ethernet
                                    Network type
                                    MySensors
                                    Connection details
                                    Host:192.168.178.66, Port:5003
                                    Status
                                    Down
                                    Status since
                                    7 minutes ago
                                    Status message
                                    ERROR: connect timed out

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • gohanG Offline
                                      gohanG Offline
                                      gohan
                                      Mod
                                      wrote on last edited by
                                      #80

                                      Can you ping that ip? There are some faulty w5100 modules around and I did repair one by adding a couple of 100 ohms resistors on the ethernet pins.

                                      1 Reply Last reply
                                      0
                                      • Mitja BlazinsekM Mitja Blazinsek

                                        hi after long time i finaly get new w5100 module now the test sketch from arduino ide for ethernet like web server are working fine bur still don't work as a gateway in domoticz or mycontroler. i just open example gatewayw5100 from my sensor libary and upload to mega bard bit status in my controler is always down af course i set the gateway in my controler :Enabled
                                        Enabled
                                        Type
                                        Ethernet
                                        Network type
                                        MySensors
                                        Connection details
                                        Host:192.168.178.66, Port:5003
                                        Status
                                        Down
                                        Status since
                                        7 minutes ago
                                        Status message
                                        ERROR: connect timed out

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

                                        @Mitja-Blazinsek is your local network using the same subnet (192.168.178)? What is the ip and netmask of your controller?

                                        1 Reply Last reply
                                        0
                                        • Mitja BlazinsekM Offline
                                          Mitja BlazinsekM Offline
                                          Mitja Blazinsek
                                          wrote on last edited by
                                          #82

                                          my network is using 192.168.0 but i try to change the MY_IP_ADDRESS to 192.168.0.66 but still no responese. i dont know what is the ip of mycontroler it works only when ia write localhost:8443 i of domoticz was 127.0.0.1

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


                                          18

                                          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