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
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.