I wanted to create a way to monitor my PC's performance remotely without needing to be physically at my computer. Whether I'm running intensive tasks, gaming, or just want to keep an eye on system health, this device gives me real-time insights into CPU, GPU, RAM, and SSD metrics from anywhere with internet access.
What Does It Do?This home automation project transforms a Particle device into a hardware monitoring hub that:
- Receives real-time PC performance data via serial connection
- Processes CPU, GPU, RAM, and SSD statistics (temperature, usage, speed, power)
- Uploads encoded data to GitHub for cloud storage
- Provides visual feedback through LED indicators
- Enables remote monitoring through web interface
- Particle Photon/Argon (or compatible Particle IoT device)
- USB to Serial Cable (for PC connection)
- 3x LEDs (Optional) - Status indicators for visual feedback
- 3x Resistors (Optional) - 220Ω for LEDs if using them
- Breadboard and jumper wires
- PC with monitoring software (to collect hardware stats)
- Pin 4: Toggle LED (data transmission indicator)
- Pin 5: On/Off LED (system status)
- Pin 7: Receiving indicator (blink during data receive)
Note: The LEDs are purely for visual feedback and debugging. The system works perfectly without them - they just help you see when data is being transmitted and received.
Software & Services- Particle Cloud Platform - IoT device management
- GitHub API - Cloud data storage via webhooks
- C++ Application - Local data formatter (texteditor.cpp)
- JavaScript/HTML - Web dashboard (index.html, up.js)
- Particle Webhooks - Connect device to GitHub
- Data Collection: PC monitoring software collects hardware statistics
- Formatting: C++ application formats data as CSV and sends via serial
- Processing: Particle firmware parses incoming data (format:
C u 18= CPU usage 18%) - Encoding: Data is Base64 encoded for safe transmission
- Upload: Encoded data published to Particle Cloud via webhook
- Storage: GitHub API stores data with SHA-based version control
- Display: Web interface fetches and displays real-time updates
The firmware implements a sophisticated data handling pipeline:
Input Parser: Uses a clever character-based protocol
- First character (uppercase): Component type (C=CPU, G=GPU, R=RAM, S=SSD)
- Second character (lowercase): Metric type (u=usage, t=temp, s=speed, p=power)
- Remaining characters: Numerical value
Smart SHA Management:
// Automatically tracks GitHub file version// Requests SHA on startup and after each upload// Prevents upload conflicts
Base64 Encoding: I'm particularly proud of implementing Base64 encoding directly on the microcontroller - this ensures data integrity during cloud transmission without requiring external libraries.
The ChallengesWhere I Really Struggled1. GitHub API IntegrationThe biggest challenge was implementing reliable cloud storage. GitHub's API requires SHA hashes for file updates, which meant tracking version history and handling conflicts. I had to implement:
- Automatic SHA retrieval on startup
- SHA update after each successful upload
- Fallback logic when SHA is unavailable
2. Serial Communication ReliabilityGetting stable serial communication between the PC and Particle device was tricky:
- Had to implement proper handshaking (
OKconfirmations) - Added
ENDmarkers to signal data completion - Implemented input validation to prevent bad data
3. Data EncodingImplementing Base64 encoding on a microcontroller with limited memory required careful optimization. I had to write a custom encoder that works with Arduino String objects.
How I Overcame It- Extensive Testing: Added serial debugging throughout the code
- Response Handlers: Implemented webhook response subscriptions to auto-update SHA
- Visual Feedback: LEDs provide immediate confirmation of each step
- Validation Functions: Created
numcheck(),capcheck(),lowercheck()to ensure data integrity
// Compact protocol: "C u 18" = CPU usage 18%// First char = component, third char = metric type
char M = ep.charAt(0); // Component (C/G/R/S)
char S = ep.charAt(2); // Metric (t/u/s/p)
String V = ep.substring(4); // Value
This protocol minimizes data transmission while remaining human-readable for debugging.
Automatic SHA Managementvoid uploadResponseHandler(const char *event, const char *data) {
String newSha = String(data).trim();
if (newSha.length() > 10) {
currentSha = newSha; // Auto-update for next upload
}
}
The device automatically updates its SHA after each upload, eliminating manual intervention.
Security Note⚠️ Important: This project previously had a hardcoded access token in the JavaScript file. For production use:
- Store tokens in environment variables
- Use server-side proxy for API calls
- Never commit secrets to repositories
- Consider using Particle's authentication features
If I could start over or continue development:
- Add Temperature Alerts: Trigger notifications when temps exceed thresholds
- Historical Graphing: Store and visualize trends over time
- Mobile App: Create native app for better mobile experience
- Multiple PC Support: Scale to monitor multiple computers
- OLED Display: Add local display for at-a-glance stats
This project successfully combines embedded systems, cloud APIs, and web technologies to create a practical home automation solution. Despite challenges with API integration and serial communication, the final result provides reliable, real-time PC monitoring from anywhere.
Skills Demonstrated- Embedded C/C++ programming
- Serial communication protocols
- RESTful API integration
- Data encoding/parsing
- Cloud IoT architecture
- Web development (HTML/JS)
Want to recreate this PC monitoring system? Here's a quick guide to get you started:
Step 1: Set Up GitHub Storage- Create a GitHub repository (public or private)
- Create a text file in the repo for data storage (e.g.,
creation.txt)
Generate a GitHub Personal Access Token with repo permissions
- GitHub Settings → Developer Settings → Personal Access Tokens
- Generate a GitHub Personal Access Token with
repopermissionsGitHub Settings → Developer Settings → Personal Access Tokens - Note the file's SHA hash (you'll need this later)
Create two webhooks in the Particle Console:
Webhook 1: Get File SHA
- Event name:
request_sha(or your choice) - URL:
https://api.github.com/repos/[USERNAME]/[REPO]/contents/[FILE].txt - Method: GET
- Add headers: Authorization token, User-Agent, Accept
- Response template:
{{sha}}
Webhook 2: Update File
- Event name:
ifttt_upload(or your choice) - URL: Same as above
- Method: PUT
- JSON body with content and SHA fields
- Response template:
{{content.sha}}
- Copy the Particle firmware code (see Code section)
Replace placeholders:
- Initial SHA hash
- Webhook names
- Pin numbers (if different)
- Replace placeholders:Initial SHA hashWebhook namesPin numbers (if different)
- Flash to your Particle device
- Compile the C++ formatter program
- Install PC monitoring software (HWiNFO, Open Hardware Monitor, etc.)
- Configure monitoring software to output data in the format:
C u 18(Component, metric, value)
- Set up the HTML/JS files
- Add your Particle access token
- Host locally or deploy to a web server
If you want visual feedback LEDs:
- Connect LEDs with 220Ω resistors to pins 4, 5, and 7
- Connect to ground
- LEDs will blink during data transmission
- Call the
blinkfunction in Particle Console to activate system - Run your PC monitoring software
- Execute the C++ formatter to send data
- Watch GitHub file update with new data
- Check web dashboard for live display
Tips:
- Start without LEDs to simplify initial testing
- Use Serial Monitor to debug data flow
- Manually call
setShafunction if SHA gets out of sync - Test webhooks individually before running full syste













Comments