UPtime is a Node.js-based monitoring system designed to track the operational status of a device and notify stakeholders in real-time via email. It provides automated detection of offline devices, boot attempts, and boot failures, ensuring quick awareness and response to any interruptions.
-
Real-time device monitoring: Continuously checks the device's heartbeat to determine if it is online or offline.
-
Automatic email notifications: Sends professional HTML email alerts for:
- Device offline
- Boot attempts
- Boot failures
- Successful boot
-
Philippine timezone support: All timestamps are automatically converted to
Asia/Manilafor accurate local tracking. -
Retry mechanism for emails: Ensures email notifications are delivered reliably even if temporary network or API issues occur.
-
Visual notification design: Emails include a centered, clean container with GitHub profile integration for professional presentation.
-
Secure endpoint: Health check API is protected by a password to prevent unauthorized access.
-
Flexible configuration: Easily configurable using environment variables for Gmail OAuth credentials, target email, and device password.
-
Uses Gmail OAuth 2.0: Email sending is handled through Gmail API using secure OAuth access instead of less-secure app passwords.
- Monitoring critical IoT devices in real-time.
- Ensuring servers or embedded devices remain operational.
- Receiving instant alerts for system failures or downtime.
- Simplifying remote device management for administrators or support teams.
This server is designed to work with the UPtime for NodeMCU ESP8266 device:
A lightweight ESP8266 project that automatically sends periodic POST requests to a server for health monitoring. Useful for uptime checks, remote power automation, and simple IoT status reporting.
The ESP8266 device regularly sends heartbeat requests to this API, enabling real-time monitoring and automated email notifications.
- Device status (online/offline)
- Boot attempt progress
- Boot failures after predefined timeouts
- Successful device boot
- Localized timestamp in Philippine time for precise logging
- Proactive alerts: Prevent prolonged downtime by immediately notifying the responsible personnel.
- Professional communication: Emails are visually appealing and informative, with clear status indicators.
- Reliability: Email retries improve notification success even under temporary failures.
- Simplicity: Easy to deploy and integrate into existing Node.js environments.
Email notifications include a link to the developer’s GitHub profile for credibility and contact reference: FireFlyDeveloper.
-
Clone the repository
git clone https://github.com/FireFlyDeveloper/UPtime.git cd UPtime -
Install dependencies
npm install
-
Create a
.envfile with the following configuration:PORT=3000 PASSWORD=password_here EMAIL_USER=email_address_here EMAIL_TARGET=target_email_address_here GMAIL_CLIENT_ID=xxxx GMAIL_CLIENT_SECRET=xxxx GMAIL_REFRESH_TOKEN=xxxx GMAIL_REDIRECT_URI=xxxx
-
Start the server
npm run dev
The server will start on the port defined in the
.envfile and begin monitoring device heartbeat. -
Health Check Endpoint
Send a POST request to
/healthwith your password and device status to update heartbeat:{ "password": "your_password", "isOnline": true }