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. Troubleshooting
  3. Ethernet Gateway - unreliable (sort-of)

Ethernet Gateway - unreliable (sort-of)

Scheduled Pinned Locked Moved Troubleshooting
26 Posts 6 Posters 12.0k Views 4 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.
  • stevebusS stevebus

    HI,

    I built an Ethernet gateway and got it 'running' yesterday. I connected it to my Vera via the plug-in. The problem I'm having is, after the first interaction or two, it quits responding. It won't respond to commands from Vera, nor can I telnet into it. After a reset, it responds and works for a short while, but then will no longer respond to Vera or telnet to 5003. A persistent ping, however, works fine and loses no packets.

    The interesting thing is, even when the device won't let me telnet in, if I do a luup reset on the Vera, I can see the "Get Version" command run on the gateway (via the serial monitor) successfully. But I still can't telnet in, and none of the buttons (start/stop, metric/imperial) on the Vera plug-in works.

    the other interesting thing is, even when the device is 'unresponsive' in terms of telnet and initiating commands from the Vera, if I press the 'inclusion' button on the GW, the Vera UI immediately updates to show it's in inclusion mode. Ditto on 'exiting' inclusion mode after the 1 minute timeout

    so the GW is still functioning on some level, but just seems to stop listening for commands/connections on 5003.

    I don't have any sensors yet, as I wanted to get the basic communication and integration with Vera working first. So I don't know if the radio stack and other GW functionality works when it's in this state.

    Nothing shows up in the serial monitor when I try to telnet and/or send Vera commands in it's unresponsive state.

    What is the best way to troubleshoot the reliability issues? Have you guys seen this behavior before? I would normally just blame the flakiness of Vera UI7 (don't get me started), but not being able to telnet points to a gw problem.

    Details of my installation are below:

    Vera
    Vera Edge
    UI 7
    Firmware version: 1.7.1320

    Platform -> Arduino Uno R3
    Ethernet Shield -> full sized Ethernet shield based on ENC28J60 chip
    hardcoded IP address: 192.168.0.215 (my home network is 192.168.0.0/24)
    Radio -> NRF24L01+PA+LNA (but have also tried just the plain NRF24L01+ smaller version with same results)

    • CSN to pin 6
    • CE to pin 5
    • MOSI to pin A1
    • SCK to pin A0
    • MISO to pin A2
    • using SoftSPI

    Operating System - Windows 10 (fresh install last Thursday)
    Arduino IDE: 1.6.5 (freshly installed today)
    MySensors libraries -> 1.5 (freshly pulled today from master branch)
    Radio powered from 3.3V output on Arduino
    100uF "can" capacitor across VCC and GND on radio (because it's the only size I had... same results with or without it)
    everything powered by USB cable from my computer (so I can troubleshoot via serial monitor)
    I have TX, RX, and ERROR LEDs connected between 5V rail from Arduino and 220Ohm resistor to ground

    Dan S.D Offline
    Dan S.D Offline
    Dan S.
    Hero Member
    wrote on last edited by
    #2

    @stevebus I have basically the same setup as you connected to Vera and it's rock solid. The only difference is that my radio is powered separately with it's own power supply. I think asking the Uno to power both the Ethernet module and the radio is asking too much.

    B 1 Reply Last reply
    0
    • stevebusS Offline
      stevebusS Offline
      stevebus
      wrote on last edited by
      #3

      so you just have a separate power supply, with a 3.3v regulator, powering the radio?

      Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

      Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

      1 Reply Last reply
      0
      • Dan S.D Dan S.

        @stevebus I have basically the same setup as you connected to Vera and it's rock solid. The only difference is that my radio is powered separately with it's own power supply. I think asking the Uno to power both the Ethernet module and the radio is asking too much.

        B Offline
        B Offline
        boozz
        wrote on last edited by
        #4

        @Dan-S.

        Are you using the Wiznet5100 or ENC28J60 chip? I ran into problems with a similar setup as @stevebus. Only difference is (as far as I can see) that I used the Wiznet5100 module. I only had it working for some days :-( then it died.
        I went back to the serial gateway, although I would rather use the ethernet gateway.

        The Wiznet5100 module is directly plugged into the Uno. Could you tell me how to get it powered separately? (of course, it's possible to get the 3.3V line cut away...

        Ronald

        1 Reply Last reply
        0
        • stevebusS Offline
          stevebusS Offline
          stevebus
          wrote on last edited by
          #5

          I think he was saying to leave the Ethernet shield powered by the Uno, but to power the Radio separately...

          Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

          Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

          B 1 Reply Last reply
          0
          • Dan S.D Offline
            Dan S.D Offline
            Dan S.
            Hero Member
            wrote on last edited by
            #6

            Using standard Arduino internet shield (wiznet) plugged directly into (and powered by) UNO. Radio powered by separate power supply with 3.3v regulator. See picture below. All is in enclosure. The black plug in near the top of the case is the separate radio power.
            IMG_20150218_201755.jpg

            1 Reply Last reply
            0
            • stevebusS Offline
              stevebusS Offline
              stevebus
              wrote on last edited by
              #7

              Nice setup... I'll see if powering my radio separately helps. Right now, the symptoms are interesting. After a reset, I can telnet into the gw until I push a button in the Vera plug-in UI (i.e. either try to "start" inclusion mode or switch between Metric and Imperial). Neither button works, and after that, I can no longer telnet into the gw. The plug-in buttons never work. However, interestingly, if I push the physical 'inclusion' button on the gateway, the plug-in updates immediately to show I'm in inclusion mode. It also updates immediately when inclusion mode expires. So GW to Vera communication is working fine. I can also go into Advanced Settings -> Variables for the plug-in and manually change a variable (say, change the config settings for Metric from "M" to "I") and that setting is reflected in the plug-in (but I can't tell if it makes it back to the GW - I see nothing in the serial monitor, although Vera said it sent the command successfully)...

              Really weird stuff....

              I'm in the process now of creating a sensor to see if the radio is working and further troubleshoot the GW <-> Vera interaction.

              Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

              Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

              DwaltD 1 Reply Last reply
              0
              • stevebusS stevebus

                I think he was saying to leave the Ethernet shield powered by the Uno, but to power the Radio separately...

                B Offline
                B Offline
                boozz
                wrote on last edited by
                #8

                @stevebus

                You're right, I think my brains weren't fast enough at the time of reading to process the information :-)

                powering the radion via a separate 3.3V is easier. Thanks for the info!

                1 Reply Last reply
                0
                • stevebusS stevebus

                  Nice setup... I'll see if powering my radio separately helps. Right now, the symptoms are interesting. After a reset, I can telnet into the gw until I push a button in the Vera plug-in UI (i.e. either try to "start" inclusion mode or switch between Metric and Imperial). Neither button works, and after that, I can no longer telnet into the gw. The plug-in buttons never work. However, interestingly, if I push the physical 'inclusion' button on the gateway, the plug-in updates immediately to show I'm in inclusion mode. It also updates immediately when inclusion mode expires. So GW to Vera communication is working fine. I can also go into Advanced Settings -> Variables for the plug-in and manually change a variable (say, change the config settings for Metric from "M" to "I") and that setting is reflected in the plug-in (but I can't tell if it makes it back to the GW - I see nothing in the serial monitor, although Vera said it sent the command successfully)...

                  Really weird stuff....

                  I'm in the process now of creating a sensor to see if the radio is working and further troubleshoot the GW <-> Vera interaction.

                  DwaltD Offline
                  DwaltD Offline
                  Dwalt
                  wrote on last edited by
                  #9

                  @stevebus said:

                  I can also go into Advanced Settings -> Variables for the plug-in and manually change a variable (say, change the config settings for Metric from "M" to "I")...

                  Sorry to threadjack, but this comment solved a long running problem I have been fighting. My sensors had been reporting imperial (as set in Vera->Setup->Unit Settings) until about two months ago when any new sensor connected would start reporting data back as metric. I checked my Vera settings, reset my nodes, deleted and re-introduced the nodes and even toggled back in forth between metric/imperial in Vera but nothing corrected this problem except hardcoding imperial into my sketches. I never thought to check the plugin variables. Sure enough, the unit setting was set to metric (M). I switched it to imperial (I) and all my confused sensors started reporting correctly after a simple reset.

                  I am using a serial gw (1.4) on Vera UI5. Does anyone have any clue why the gw would start ignoring the unit settings from the controller?

                  Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

                  1 Reply Last reply
                  0
                  • stevebusS Offline
                    stevebusS Offline
                    stevebus
                    wrote on last edited by
                    #10

                    I'm rebuilding my gateway (going to go with a serial gw instead of Ethernet).. but during my limited testing with my Ethernet gateway, pretty much nothing with the Metric/Imperial setting worked as I expected :-). But I think that and my connectivity issues may be related.

                    Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                    Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                    1 Reply Last reply
                    0
                    • stevebusS Offline
                      stevebusS Offline
                      stevebus
                      wrote on last edited by
                      #11

                      Separate power supply for the radio didn't help the stability of the Ethernet Gateway. Telneting into it is spotty. It seems pretty reliable when it updates Vera (i.e. pushing the inclusion mode button, and letting it time out, immediately reflects in the Vera UI). My temperature sensor (the only sensor I've built so far, as a test) very reliably gets updated in the Vera UI as well. However, Vera -> controller communication is spotty. Sometimes hitting inclusion button from Vera works, sometimes not. Metric vs. Imperial button never works. Setting the variable for 'config' in advanced settings may or may not work (gw.getConfig().isMetric always returns 0, regardless of setting). Still troubleshooting that....

                      Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                      Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                      Dan S.D 1 Reply Last reply
                      0
                      • stevebusS stevebus

                        Separate power supply for the radio didn't help the stability of the Ethernet Gateway. Telneting into it is spotty. It seems pretty reliable when it updates Vera (i.e. pushing the inclusion mode button, and letting it time out, immediately reflects in the Vera UI). My temperature sensor (the only sensor I've built so far, as a test) very reliably gets updated in the Vera UI as well. However, Vera -> controller communication is spotty. Sometimes hitting inclusion button from Vera works, sometimes not. Metric vs. Imperial button never works. Setting the variable for 'config' in advanced settings may or may not work (gw.getConfig().isMetric always returns 0, regardless of setting). Still troubleshooting that....

                        Dan S.D Offline
                        Dan S.D Offline
                        Dan S.
                        Hero Member
                        wrote on last edited by
                        #12

                        @stevebus I typically have to hit the inclusion button several times while rebooting the sensor before it is completely included in Vera. I consider that normal operation. Sometimes when the inclusion doesn't work right I delete it and start over. When you change the metric setting did you hit the vera reload button after doing that? You may also need to restart the sensor after that. It's been a while since I changed that setting to what I wanted.

                        1 Reply Last reply
                        0
                        • stevebusS Offline
                          stevebusS Offline
                          stevebus
                          wrote on last edited by
                          #13

                          Thanks for the response @dan-s. My issue isn't getting the sensor to show up in Vera, that actually worked perfectly. The issue is that communication from the GW to Vera works great, but communication from Vera to the GW doesn't appear to work at all, or at least it is very unreliable.

                          For example, just to use the inclusion example. If I push the hardware inclusion button on my gateway, Vera immediately reflects the fact that I changed to inclusion mode. If I 'include' any sensors by restarting them, Vera (via the GW) recognizes them immediately. If/when the GW times out of inclusion mode, Vera recognizes it immediately.

                          The issue comes when I try to communicate the other way. None of the buttons on the Vera plug-in appear to do anything on the GW. For example, I can't start or stop inclusion mode by hitting the Start and Stop buttons on the plug-in UI inside of Vera. The Metric and Imperial buttons appear to not do anything either. Even if I manually change the 'config' variable on the advanced settings page of the plug-in from M to I, it sticks in the GUI, but doesn't appear to get pushed to the GW (the GW still reports M to the sensors). So it appears that nothing is being communicated from Vera to the GW.

                          So far, I haven't had a chance to see if Vera will send any commands to a sensor/switch/whatever via the GW because the only 'sensor' I've had time to build is a temperature sensor that only sends temps (via the GW) to Vera. It works great. I'm going to try to build a sensor that receives commands from Vera as well as sends inputs, but haven't had time yet (and running out of HW).

                          so, so summarize (too late, I know).. based on the evidence so far, it appears that communication from Vera to my GW dies soon after reset. I cannot telnet into the GW on port 5003 after more than a couple of minutes after reset either (and the little troubleshooting Windows app, I can't remember the name, can't connect either).

                          Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                          Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                          Dan S.D 1 Reply Last reply
                          0
                          • rvendrameR Offline
                            rvendrameR Offline
                            rvendrame
                            Hero Member
                            wrote on last edited by
                            #14

                            How are you powering arduino + ethernet + radio module? The ethernet module drains a lot of mA in high speed. Cheap phone chargers will not delivery proper energy to it.
                            And from another perspective, do you have any firewall / router in between Vera and the GW ?

                            Home Assistant / Vera Plus UI7
                            ESP8266 GW + mySensors 2.3.2
                            Alexa / Google Home

                            1 Reply Last reply
                            0
                            • stevebusS Offline
                              stevebusS Offline
                              stevebus
                              wrote on last edited by
                              #15

                              Thanks @rvendrame.... For the Arduino + Ethernet shield, at the moment (temporary while debugging), I'm powering both from a USB 3.0 port on my computer. I have also, in an earlier iteration of troubleshooting, also had a switching power supply rated at 9V and 1A plugged into the barrel connector of the Uno in addition to USB (for serial monitor). Behavior didn't change.

                              Per recommendation by @dan-s, The radio is separately powered by it's own power supply. It's a Enercell supply rated at 4.5V and 700mA. The supply for the radio goes through a LD1117 3.3V voltage regulator and has a 100uF can capacitor across the input leads. I've verified the input of the regulaor at 4.52V and output of the regulator at exactly 3.3V.

                              Of course, I don't yet have any confirmation that any of the voltages going into either of the components doesn't drop due to inability to provide enough current for the components under load. It's certainly possible I'm under-supplying either component. I have moved my sensor over 100ft away and it still picks up fine for the radio.

                              The behavior of the gateway is that after a reset, you can telnet into it, connect via the MYSController software, and/or use the Vera software to send commands to it for about 30 seconds, then it starts ignoring all Ethernet-sided input... i.e. it seems to quit listening for network client connections. (although radio traffic and GW initiated network input works fine). A persistent ping to the device during all of this traffic never drops a single packet.

                              What would be the recommended rating for power supplies for the two different parts of the solution? (Arduino Uno + shield and Radio)

                              Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                              Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                              1 Reply Last reply
                              0
                              • stevebusS stevebus

                                Thanks for the response @dan-s. My issue isn't getting the sensor to show up in Vera, that actually worked perfectly. The issue is that communication from the GW to Vera works great, but communication from Vera to the GW doesn't appear to work at all, or at least it is very unreliable.

                                For example, just to use the inclusion example. If I push the hardware inclusion button on my gateway, Vera immediately reflects the fact that I changed to inclusion mode. If I 'include' any sensors by restarting them, Vera (via the GW) recognizes them immediately. If/when the GW times out of inclusion mode, Vera recognizes it immediately.

                                The issue comes when I try to communicate the other way. None of the buttons on the Vera plug-in appear to do anything on the GW. For example, I can't start or stop inclusion mode by hitting the Start and Stop buttons on the plug-in UI inside of Vera. The Metric and Imperial buttons appear to not do anything either. Even if I manually change the 'config' variable on the advanced settings page of the plug-in from M to I, it sticks in the GUI, but doesn't appear to get pushed to the GW (the GW still reports M to the sensors). So it appears that nothing is being communicated from Vera to the GW.

                                So far, I haven't had a chance to see if Vera will send any commands to a sensor/switch/whatever via the GW because the only 'sensor' I've had time to build is a temperature sensor that only sends temps (via the GW) to Vera. It works great. I'm going to try to build a sensor that receives commands from Vera as well as sends inputs, but haven't had time yet (and running out of HW).

                                so, so summarize (too late, I know).. based on the evidence so far, it appears that communication from Vera to my GW dies soon after reset. I cannot telnet into the GW on port 5003 after more than a couple of minutes after reset either (and the little troubleshooting Windows app, I can't remember the name, can't connect either).

                                Dan S.D Offline
                                Dan S.D Offline
                                Dan S.
                                Hero Member
                                wrote on last edited by
                                #16

                                @stevebus I don't have an inclusion button on my gateway so I can't speak from experience there, but l do know that it sometimes takes several presses of the vera inclusion button and multiple sensor resets to get the sensor included. Have you tried to include a sensor this way via the vera button and not pushing the gateway button?

                                1 Reply Last reply
                                0
                                • stevebusS Offline
                                  stevebusS Offline
                                  stevebus
                                  wrote on last edited by
                                  #17

                                  I have tried inclusion via Vera, but I will admit not with the 'persistence" you mentioned :-) I might have tried the button a couple of times in a row, but that's it. And it works fine from the Vera button for the first half-minute or so after a restart.

                                  Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                                  Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                                  Dan S.D 1 Reply Last reply
                                  0
                                  • stevebusS stevebus

                                    I have tried inclusion via Vera, but I will admit not with the 'persistence" you mentioned :-) I might have tried the button a couple of times in a row, but that's it. And it works fine from the Vera button for the first half-minute or so after a restart.

                                    Dan S.D Offline
                                    Dan S.D Offline
                                    Dan S.
                                    Hero Member
                                    wrote on last edited by
                                    #18

                                    @stevebus One other thought. If you hit the reload button on Vera it will give and error message when it executes the lua code associated with the gateway it can't communicate with the gateway. Do you get an error message when you do that?

                                    1 Reply Last reply
                                    0
                                    • stevebusS Offline
                                      stevebusS Offline
                                      stevebus
                                      wrote on last edited by
                                      #19

                                      I do not get any errors after hitting the reload button on the Vera. And it has no effect on the Vera buttons working or not (only a GW reset temporarily fixes that).

                                      One note: I used the Vera device files from https://github.com/mysensors/Vera

                                      Someone from another forum pointed me to the UI7 branch https://github.com/mysensors/Vera/tree/UI7

                                      But when I tried to use those files, I couldn't get the gateway to create.

                                      Not sure if it makes a difference. If so, I can try again

                                      Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                                      Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                                      Dan S.D 1 Reply Last reply
                                      0
                                      • stevebusS stevebus

                                        I do not get any errors after hitting the reload button on the Vera. And it has no effect on the Vera buttons working or not (only a GW reset temporarily fixes that).

                                        One note: I used the Vera device files from https://github.com/mysensors/Vera

                                        Someone from another forum pointed me to the UI7 branch https://github.com/mysensors/Vera/tree/UI7

                                        But when I tried to use those files, I couldn't get the gateway to create.

                                        Not sure if it makes a difference. If so, I can try again

                                        Dan S.D Offline
                                        Dan S.D Offline
                                        Dan S.
                                        Hero Member
                                        wrote on last edited by
                                        #20

                                        @stevebus My Vera is on UI5. If you are on UI7 that may make a difference.

                                        1 Reply Last reply
                                        0
                                        • stevebusS Offline
                                          stevebusS Offline
                                          stevebus
                                          wrote on last edited by
                                          #21

                                          yeah, since I'm relatively new to home automation, I made the (apparent) mistake of building an Edge. No choice but UI7. When troubleshooting other stuff with long time Vera users, this is the point I usually get to, where they say "oh, I'm running UI5, <insert thing I'm trying to do> works fine for me" and shrug :-)

                                          Apparently UI7 is a big pile of monkey :shit:

                                          Thanks a ton for trying to help! I'll keep plugging at it.

                                          Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                                          Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                                          Dan S.D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          23

                                          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