LAN/Network Monitor

10,641

135

27

With the ever increasingly use of internet devices, or as it is know, IoT, more household devices are being connected to the network. With all the new IoT devices, our houses become more "smart", Everything can be automated. But there is a downside to all of this.

The first problem is that loosing internet connectivity, renders most of our IoT devices useless. For example, my house is fitted with several Sonoff devices, as well as IoT Smart Timers to control, to name only a few, the following:

  • Pool Pump
  • Pool Water Filler
  • Dog Water Filler
  • Pool Gate Alarm
  • Several lights

The above devices all rely on time to function correct, which is normally available via the internet. This is the first problem I experienced with loss of internet connectivity. To ensure that my IoT devices can still function without internet connectivity, I had to install a NTP Time Server on my local network.

The second problem having a lot of IoT devices, is that most of these devices connects to the local network via WiFi. Although a great option, WiFi has limited range in a normal house, and thus multiple WiFi routers or WiFi Range Extenders are installed to get good coverage. The end result is then multiple IoT devices connected to various WiFi access points throughout the house.

The third problem is that most of the IoT devices are installed out of sight. In the event of a fault on the IoT device, or loss of network connectivity to the device, we will only realize it once the function controlled by the IoT device fails. For instance, with my pool pump running during working hours when I am not at home, I will only notice the failure after several days, when the pool becomes dirty.

The solution is simple, we all monitor our IoT devices once in a while by connecting to them, or by looking at the IoT devices every day or two.

OR, build a new IoT device, that will monitor all the IoT devices . . . . . .

This is exactly what this WiFi connected LAN/Network Monitor does.

Using simple "high-bright" LEDs, and a LCD display, network faults can be easily seen and identified without the need to connect or inspecting each device.

Step 1: The Circuit Diagram

To connect to the local LAN/Network, network connectivity via WiFi is obtained using a Wemos D1 mini. The D1 Mini is then used to ping each of the IoT devices at regular intervals,

The circuit uses the minimum number of components.

  • Wemos D1 mini or equivalent
  • 16 x 2 LCD Display with back light.
  • I2C module for the LCD display
  • Three LEDs
  • Four resistors
  • Button

Building the circuit on strip board is quick and simple.

Apart from the LCD Display, three high-bright LEDs are used to indicate the system status.

  • Red LED to indicate loss of internet connectivity.
  • Red LED to indicate loss of connectivity of one of the IoT devices
  • Green LED to indicate that the LAN/Network Monitor is active (yes, this device must also be monitored).

Step 2: Programming the Wemos D1 Mini

Programming the D1 Mini is straight forward, as it has an on-board USB programming connector.

Simply upload the code into the Arduino IDE, and compile the sketch.

Once the sketch is compiled, upload the sketch to the D1 Mini.

Step 3: Connect the LAN/Network Monitor to Your WiFi

Power up the LAN/Network Monitor

  • The green LED will start to flash, and display will show "Connect to WiFi.
  • Within 10 seconds, press the config button.
  • The display will also show "Setup Network"
  • The LAN/Network Monitor is now set up as a WiFi Access Point.

Next, using a smartphone or PC, go to the WiFi connection option.

  • You should see a new open network called "Network Monitor".
  • Connect to the "Network Monitor" network.

Open up your web browser.

In the address bar, enter 192.168.4.1. This is the default IP address of the LAN/Network Monitor. The WiFiManager screen will appear.

  • Select "Configure WiFi".
  • A list with all the available WiFi access points will appear.
  • Select the access point you want to connect to.
  • Enter the WiFi password for the selected access point.
  • Enter the IP Address for the LAN/Network Monitor.
  • Enter your Gateway IP address.
  • Lastly, enter the Subnet Mask.
  • Press "save".
  • Your browser will indicate that the new settings were save.
  • Your smartphone/PC will automatically disconnect from the "Network Monitor" WiFi access point.
  • The LCD Screen will indicate "Connected", and shortly afterwards give the LAN and Internet status.

The LAN/Network Monitor should now be connected to your local network.device

Step 4: Set Up the Local Devices to Be Monitored

It is now time to set up the local network devices that needs to be monitored. Using your browser, enter the IP address of the LAN/Network Monitor.

  • The LAN/Network Monitor web interface will open,
  • Click on "Local Network".tab.
  • Enter a short name, and the IP address for each device you want to monitor.
  • Device can be individually enabled/disabled with the tick-mark.
  • When done, click "Save".

When any of the devices being monitored, does not reply, the "LAN Fault" LED will come on.

The LCD screen will also scroll through the devices not found, displaying the name of each device for 2 seconds.

The current connection status can also be viewed using the web interface.

Step 5: Set Up Internet Connectivity Check

The LAN/Network Monitor can also be used to monitor your internet connectivity.

  • Click on the "Internet" tab.
  • Enter a description, and the website of up to 5 internet sites you want to use to monitor for connectivity.
  • Internet sites can be individually enabled/disabled with the tick-mark.
  • Once done, click "Save".

! NOTE !

The internet sites are not monitored independently. If any one of the internet sites reply when "pinged", internet connectivity will show healthy. When all of the internet sites fail to reply, the "WWW Fault" LED will come on.

Step 6: Configure the Monitor

Under the "Config" tab, the local network and internet settings can be changed independently.

  • Select the best number of scans (or pings) to give reliable feedback. Remember, some devices will not reply to ping commands each and every time.
  • You can also select the time interval between scans (or pings).
  • For my local IoT devices, I have found that 5 pings, every minute, works the best, and I do not get false warnings.
  • The internet sites works well with 5 sites being pinged once a minute. At least one of the sites always reply.

The LCD backlight can be also be set to indicate the status of your network. Apart from the "WWW Fault" and "LAN Fault" LEDs, the LCD backlight can be used to make connectivity problems more visible without the need to read the screen.

Once configured correctly, the LAN/Network Monitor should be placed in a visible location.

Step 7: 3D Printer to the Rescue.

I started building the project using one of my 60 x 110mm project boxes. After cutting out the holes for the LCD display, I noticed that after I added the I2C module to the display, the depth of the box no longer provide space for the circuit board. I needed about 10 mm more depth.

Using Fusion 360, I created a new cover, with the cut-out for the LCD display, and printed it on my Velleman 8200 3D Printer using 3mm filament.

I have included the STL as well as Fusion 360 files for reference.

Share

    Recommendations

    • First Time Author

      First Time Author
    • Big and Small Contest

      Big and Small Contest
    • Toys Contest

      Toys Contest

    27 Discussions

    0
    None
    Jens1968

    23 hours ago

    I solved the problem. It lag at the IP address 192.168.4.1. You can change these with

    WiFi server server (80);
    IPAddress apIP (192, 168, 1, 1);
    and
    WiFi.mode (WIFI_AP);
    WiFi.softAPConfig (apIP, apIP, IPAddress (255, 255, 255, 0));
    1 reply
    0
    None
    Eric BrouwerJens1968

    Reply 10 hours ago

    Glad you got it right.
    Hope you enjoy the project.

    Regards, Eric

    0
    None
    Jens1968

    1 day ago

    "ip": "192.168.1.20",
    "gateway": "192.168.1.1",
    "subnet": "255.255.255.0"
    }Should now be connected to the network
    *WM: freeing allocated params!
    ⸮P⸮4@H⸮l⸮@zIx⸮⸮
    Connect to WiFi
    Waiting for Setup Button to be pressed
    Trying to connect
    {"ip":"192.168.1.20","gateway":"192.168.1.1","subnet":"255.255.255.0"}*WM:
    *WM: AutoConnect
    *WM: Connecting as wifi client...
    *WM: Custom STA IP/GW/Subnet
    *WM: 192.168.1.20
    *WM: Using last saved values, should be faster
    *WM: Connection result:
    *WM: 0
    *WM:
    *WM: Configuring access point...
    *WM: Network Monitor
    *WM: AP IP address:
    *WM: 192.168.4.1
    *WM: HTTP server started
    *WM: Request redirected to captive portal
    *WM: Handle root
    *WM: Request redirected to captive portal
    *WM: Request redirected to captive portal
    *WM: Handle root
    *WM: Request redirected to captive portal
    *WM: Request redirected to captive portal
    *WM: Request redirected to captive portal

    0
    None
    Jens1968

    1 day ago

    I got the monitor up and running. I only come to the Wifi Configurations page. There I give the IP from
    Network Monitor 192.168.1.20, IP from the router 192.168.1.1,
    Sub 255.255.255.0 on. After input of the password, I then save. Then the display shows Connected and jumps to LAN: Healthy. The Wifi connection is disconnected and the network monitor is no longer visible in the wifi list. Unfortunately not accessible via the IP address. Only after a restart, I can reach the network monitor again via Wifi, but then come back only on the Config page. unfortunately I do not come to Step 4. Help, what am I doing wrong?

    *WM: Already connected. Bailing out.
    {
    "ip": "192.168.1.20",
    "gateway": "192.168.1.1",
    "subnet": "255.255.255.0"
    }Should now be connected to the network
    *WM: freeing allocated params!


    0
    None
    mridgley

    5 days ago

    Having issues finding/installing the "include" files. Specifically FS.h (have retrieved Arduino-master from GITHUB but it does not contain. Others I am unable to find: ESP8266WebServer.h and WiFiUdp.h) ???

    3 replies
    0
    None
    Eric Brouwermridgley

    Reply 5 days ago

    Hi
    I have added some libraries under Step 2. Hope this will assist.
    Regards, Eric

    0
    None
    mridgleyEric Brouwer

    Reply 2 days ago

    Got 'em… added to my ARDUINO Libraries folder but I still get errors trying to compile NewMonitor2.. The compiler reports it can't find the file "FS.h" even though it is IN the Libraries folder.

    0
    None
    Eric Brouwermridgley

    Reply 1 day ago

    I removed ALL of my libraries, and determined that only the following libraries are required to compile:
    #include <FS.h> //(might be part of the esp8266 board manager)
    #include <ArduinoJson.h>
    #include <ESP8266Ping.h>
    #include <LiquidCrystal_I2C.h>
    #include <WiFiManager.h>
    #include <EEPROM.h> //(included as part of IDE)
    #include <Wire.h> //(included as part of IDE)

    I have uploaded them under Step 2 again.

    I use Arduino IDE Version 1.8.5

    Under Additional Boards Manager URL (File/Preferences), I have the following entries:
    http://digistump.com/package_digistump_index.json
    https://raw.githubusercontent.com/damellis/attiny/...
    http://arduino.esp8266.com/stable/package_esp8266c...

    Under Tools/Boards/Boards Manager, I have the following:
    esp8266 by ESP8266 Community Version 2.1.0

    Hope this info will assist you.

    Regards, Eric

    0
    None
    iflyj3

    1 day ago

    The text says there are three LEDs. The schematic only shows one LED. What have I missed?

    Thanks.

    1 reply
    0
    None
    Eric Brouweriflyj3

    Reply 1 day ago

    Just click on the schematic to open the full image.
    Regards, Eric

    0
    None
    iflyj3

    4 days ago

    What is the part number and/or source for the I2C module for the LCD display?

    1 reply
    0
    None
    Eric Brouweriflyj3

    Reply 3 days ago

    Just Google for "i2c lcd module". You should find suppliers close to you.

    Regards, Eric

    0
    None
    Eric BrouwerRazanur

    Reply 7 days ago

    Thanks, I will have a look at this library.
    Always more than one way to to solve a problem.

    0
    None
    RazanurEric Brouwer

    Reply 7 days ago

    I don't expect it to be worth switching for you at this point, but I wanted to add it, for future reference and for others who might want to do something similar. But in case you should decide to use it, I would be very happy if you could add it as an example to the library.

    0
    None
    dtbarnett

    7 days ago

    I have a network monitor that only checks for an active WiFi and an internet connection. Its main use is to let my wife know the network status when she is having problems making a connection. I think I'll be expanding my version to be more like yours. Thanks.

    1 reply
    0
    None
    Eric Brouwerdtbarnett

    Reply 7 days ago

    This is exactly why I made this project. And, if there is a problem, it will even let her know which of the routers are not working.

    1
    None
    TexomaEV

    8 days ago on Step 1

    Very cool, hardware monitor. I just use tge "WhatsUp" app on a pc to ping every critical device on my network. Monitor stays on 24/7 and if something goes down it sets off a siren.

    2 replies
    1
    None
    Eric BrouwerTexomaEV

    Reply 8 days ago

    HI
    The design was more for the "not so clued up persons", to be able to see at a distance if the Internet is down.

    It also helps my household to immediately see which WiFi Router is off line, due to plugs being switched off accidentally.

    The two RED LEDs are so visible, that without even going to the device, they already know what the problem is.

    I know there are many a option . . .But one of the options were NOT to have a PC and Screen on all the time.

    Regards, Eric

    0
    None
    herojigEric Brouwer

    Reply 8 days ago

    Cool project Eric. I just am surprised that there are still households without one computer running 24x7. Here in Kathmandu, ever since we got 24x7 power a few years back, everyone is running something all day (now that we can) :)