How to Monitor a NodeMCU (ESP8266) Every 10 Minutes Without Port Forwarding Using Healthchecks.io
Introduction
Many home internet connections today are behind NAT or CGNAT, making it difficult or impossible to monitor devices from the internet using traditional methods such as Ping, UptimeRobot, or HTTP checks.
I wanted a simple solution that could:
- Monitor a NodeMCU (ESP8266)
- Work behind any ISP connection
- Require no public IP
- Require no port forwarding
- Send email alerts if the device goes offline
- Be easy to implement
After testing several options, I found that Healthchecks.io provides the simplest and most reliable solution.
In this guide, I will show you exactly how to set up a NodeMCU to send heartbeat signals every 10 minutes and receive an email alert if the device stops reporting for 15 minutes.
Why Traditional Monitoring Fails
Most home networks look like this:
Internet → ISP Router → Home Router → Devices
In my case:
Internet → Huawei ISP Router → TP-Link Archer A6 → NodeMCU
Because of NAT and CGNAT:
- External ping requests fail
- UptimeRobot ping monitoring fails
- Port monitoring does not work
- Incoming connections are blocked
This means that traditional uptime monitoring cannot reliably determine whether the device is online.
The Better Approach: Heartbeat Monitoring
Instead of allowing external systems to check the NodeMCU, we reverse the process.
The NodeMCU periodically sends a heartbeat signal to Healthchecks.io.
Architecture:
NodeMCU → Healthchecks.io → Email Alerts
If the heartbeat stops arriving, Healthchecks.io sends an alert.
Advantages:
- No port forwarding
- No DDNS required
- No Cloudflare required
- Works behind CGNAT
- Works behind multiple routers
- Free to use
What We Are Building
Monitoring interval: Every 10 minutes
Alert timing:
- Expected heartbeat: Every 10 minutes
- Grace period: 5 minutes
Result:
If the NodeMCU does not report for 15 minutes, Healthchecks.io sends an email alert.
Step 1: Create a Healthchecks.io Account
Visit:
Create a free account.
After signing in:
- Click Add Check
- Enter a name
Example:
NodeMCU Monitor
Step 2: Configure the Check
Select:
Schedule: Simple
Period:
10 Minutes
Grace Time:
5 Minutes
This configuration means:
Expected Ping = Every 10 Minutes
If no ping arrives after:
10 + 5 = 15 minutes
Healthchecks.io will send an alert.
Click Save.
Step 3: Copy Your Ping URL
After saving the check, Healthchecks.io generates a unique URL.
Example:
https://hc-ping.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Copy this URL.
You will use it in the NodeMCU code.
Keep this URL private.
Anyone who knows the URL can mark the check as healthy.
Step 4: Install Arduino IDE Requirements
Install Arduino IDE.
Add ESP8266 Board Support:
File → Preferences
Additional Boards Manager URLs:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
Install:
ESP8266 by ESP8266 Community
Select Board:
NodeMCU 1.0 (ESP-12E Module)
Step 5: Create secrets.h
Create a new tab in Arduino IDE called:
secrets.h
Paste:
#ifndef SECRETS_H
#define SECRETS_H
#define WIFI_SSID “YOUR_WIFI_NAME”
#define WIFI_PASSWORD “YOUR_WIFI_PASSWORD”
#define HEALTHCHECKS_URL “https://hc-ping.com/YOUR_UNIQUE_ID“
#endif
Replace the values with your own information.
Step 6: Upload the NodeMCU Code
Create a new Arduino sketch and paste the following code:
#includeUpload the code to the NodeMCU.
Step 7: Verify Operation
Open:
Tools → Serial Monitor
Baud Rate:
115200
Expected output:
Booting NodeMCU…
Connecting to WiFi…..
WiFi connected
Local IP: 192.168.1.100
Healthchecks response code: 200
Every 10 minutes:
Healthchecks response code: 200
This confirms successful heartbeat transmission.
Step 8: Configure Email Alerts
In Healthchecks.io:
Settings → Integrations
Enable:
- Telegram (optional)
- Slack (optional)
Now, if the NodeMCU stops reporting for 15 minutes, you will receive an alert.
When the NodeMCU comes back online, a recovery notification is sent automatically.
What This Solution Monitors
This setup confirms:
✓ NodeMCU is powered on
✓ Wi-Fi connection is working
✓ Router is working
✓ Internet access is available
✓ Device software is running
✓ Heartbeat transmission is successful
What This Solution Does NOT Monitor
This setup does not:
✗ Check DNS resolution
✗ Monitor website availability
✗ Verify Cloudflare records
✗ Provide remote access
✗ Replace DDNS
It is designed purely for device health monitoring.
Why I Chose Healthchecks.io
After testing DDNS, Ping Monitoring, UptimeRobot, and Cloudflare-based approaches, Healthchecks.io turned out to be the simplest solution.
Benefits:
- Easy setup
- Free tier available
- No networking complexity
- Works behind CGNAT
- Reliable email notifications
- Lightweight enough for ESP8266
Most importantly, it focuses on what really matters:
Knowing whether the device is alive.
Conclusion
If you need a simple way to monitor a NodeMCU, Raspberry Pi, home server, or any IoT device without exposing ports to the internet, Healthchecks.io is an excellent solution.
A single heartbeat every 10 minutes is enough to monitor:
- Device health
- Internet connectivity
- Power availability
And receive an alert within 15 minutes of a failure.
No public IP. No DDNS. No port forwarding. No Cloudflare Tunnel.
Just a simple heartbeat and reliable notifications.