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.0k 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.
  • 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
                  • Mitja BlazinsekM Offline
                    Mitja BlazinsekM Offline
                    Mitja Blazinsek
                    wrote on last edited by
                    #83

                    ok ip of mycontroler is 192.168.0.100

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

                      is it maybe problem because i'm using mega board an i wired 50 51 52 pins but if i wired 11 12 13 like on the diagram here it not working the shield if i try dhcp address printer for test

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

                        You probably have faulty network shield

                        1 Reply Last reply
                        0
                        • jopebeJ Offline
                          jopebeJ Offline
                          jopebe
                          wrote on last edited by gohan
                          #86

                          Sorry, but can't find any information about my problem about the gateaway.
                          For connecting a lot of binary switches etc. i took a mega and loaded a gateaway sketch from Mihai . Normally it runs very good, when i change the status flags from ON/Off to 1/0 (Don't know why?)
                          But now i had the idea, to disable the radio, because I don't need it for this mega.
                          Now the relais-switches do no longer work as before. They only work from time to time and rather randomly.
                          I want to switch and contol the switches with iOBroker, but without the radion connected and activated, it doesn't run.
                          Any idea?

                          mfalkviddM 1 Reply Last reply
                          0
                          • jopebeJ jopebe

                            Sorry, but can't find any information about my problem about the gateaway.
                            For connecting a lot of binary switches etc. i took a mega and loaded a gateaway sketch from Mihai . Normally it runs very good, when i change the status flags from ON/Off to 1/0 (Don't know why?)
                            But now i had the idea, to disable the radio, because I don't need it for this mega.
                            Now the relais-switches do no longer work as before. They only work from time to time and rather randomly.
                            I want to switch and contol the switches with iOBroker, but without the radion connected and activated, it doesn't run.
                            Any idea?

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

                            @jopebe did you remove the define for the radio from your sketch?
                            What does the debug output say?

                            1 Reply Last reply
                            0
                            • jopebeJ Offline
                              jopebeJ Offline
                              jopebe
                              wrote on last edited by
                              #88

                              Thank You for Your quick respons!
                              Yes, i made two slashes before the define-line of the radio .
                              I have no debug-output because I didnt engage myself in debugging until now. I will try it this evening. During the day Im engaged in other things.

                              1 Reply Last reply
                              0
                              • jopebeJ Offline
                                jopebeJ Offline
                                jopebe
                                wrote on last edited by
                                #89

                                Here thr output of the seriel monitor:
                                0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.1.1
                                IP: 192.168.178.134
                                0;255;3;0;9;Eth: connect
                                0;255;3;0;9;MCO:BGN:STP
                                0;255;3;0;9;MCO:REG:NOT NEEDED
                                0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
                                0;255;3;0;9;Eth: 0;101;1;0;2;1
                                0;255;3;0;9;Eth: 0;101;1;0;2;0
                                0;255;3;0;9;Eth: 0;101;1;0;2;1
                                0;255;3;0;9;Eth: 0;101;1;0;2;0
                                0;255;3;0;9;Eth: 0;101;1;0;2;1
                                0;255;3;0;9;Eth: 0;101;1;0;2;0
                                0;255;3;0;9;Eth: 0;101;1;0;2;1
                                0;255;3;0;9;Eth: 0;101;1;0;2;0
                                0;255;3;0;9;Eth: 0;101;1;0;2;0
                                0;255;3;0;9;Eth: 0;101;1;0;2;1
                                When I push the button in IoBroker-Vis, it takes often a lot of time until the LED is on; sometimes I have to push the button twice or more times; sometimes nothing happens at all.
                                When I define and connect the radio with the same sketch, it runs as expected.

                                korttomaK 1 Reply Last reply
                                0
                                • jopebeJ jopebe

                                  Here thr output of the seriel monitor:
                                  0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.1.1
                                  IP: 192.168.178.134
                                  0;255;3;0;9;Eth: connect
                                  0;255;3;0;9;MCO:BGN:STP
                                  0;255;3;0;9;MCO:REG:NOT NEEDED
                                  0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
                                  0;255;3;0;9;Eth: 0;101;1;0;2;1
                                  0;255;3;0;9;Eth: 0;101;1;0;2;0
                                  0;255;3;0;9;Eth: 0;101;1;0;2;1
                                  0;255;3;0;9;Eth: 0;101;1;0;2;0
                                  0;255;3;0;9;Eth: 0;101;1;0;2;1
                                  0;255;3;0;9;Eth: 0;101;1;0;2;0
                                  0;255;3;0;9;Eth: 0;101;1;0;2;1
                                  0;255;3;0;9;Eth: 0;101;1;0;2;0
                                  0;255;3;0;9;Eth: 0;101;1;0;2;0
                                  0;255;3;0;9;Eth: 0;101;1;0;2;1
                                  When I push the button in IoBroker-Vis, it takes often a lot of time until the LED is on; sometimes I have to push the button twice or more times; sometimes nothing happens at all.
                                  When I define and connect the radio with the same sketch, it runs as expected.

                                  korttomaK Offline
                                  korttomaK Offline
                                  korttoma
                                  Hero Member
                                  wrote on last edited by korttoma
                                  #90

                                  @jopebe are the relays and switches locally attached to the GW? Please post your sketch

                                  • Tomas
                                  1 Reply Last reply
                                  0
                                  • scalzS scalz

                                    @gvorster
                                    hello, i'm working on rfm69 (refactorization and adding features), which will support softspi and w5100, and uses a lot less memory. might be available soon.

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

                                    @scalz A very late reply, but someone else might be helped with it.
                                    Hardware SPI is working.
                                    The onnly thing is that on W5100 shield it will work without any problem but with most 5100 modules you need a small modification fixing w5100 problems

                                    1 Reply Last reply
                                    1
                                    • fifoF fifo

                                      My WizNET (W5100) Ethernet module had to be connected to 5v pin on arduino as the 3.3v would only allow ping but not function properly.

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

                                      @fifo Most W5100 modules have a 5-3.3V regulator so if you connect the Vcc to 3V3 the chip just doesnt get enough juice

                                      1 Reply Last reply
                                      0
                                      • jopebeJ Offline
                                        jopebeJ Offline
                                        jopebe
                                        wrote on last edited by
                                        #93

                                        I dont know, how to send my sketch as a file. Copy and past doesnt run.
                                        I use an ethernet-shield and as I mentioned, when I connect and switch on the radio, everything is alrigth.

                                        1 Reply Last reply
                                        0
                                        • jopebeJ Offline
                                          jopebeJ Offline
                                          jopebe
                                          wrote on last edited by
                                          #94

                                          Thank You to all, who tried to help.
                                          I think, I found the solution:
                                          There was this line in the sketch: "const unsigned long tUpdate=60000; //update interval"
                                          When I changed the time to 6000, it runs as when as the radio was connected.
                                          So it was probably missing some kind of "interrupt", which usually comes from the radio , when it listens to the nodes or so?

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


                                          22

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          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