essaidi.me
Bring projects, writing, and tools together in a site that is easy to navigate, while preserving content and links from the previous portfolio.
Loading
An archived home electricity-monitoring project connecting an ESP32 to a dashboard for electrical measurements, consumption statistics, and estimated costs.
From home measurements to the dashboard
IGTechMeasure
ESP32 at home · periodic readings
Ingest
Express on Heroku · API-key check · Firestore
Explore
Next.js · Firebase Auth · charts & estimates
Home ESP32 → Heroku Express API → Firestore
Periodic submissions limited write volume. The API validated incoming readings and checked a shared key.
Firestore → Next.js → date filters, statistics & cost estimates
The interface displayed stored readings; this was periodic monitoring rather than continuous sensor streaming.
Next.js → separate Express report service → PDF
The frontend requested reports; a separate backend service generated the PDF files.
In this case study
We built IGTech in 2021 to make measurements from a home installation easier to explore. Our budget shaped the design: periodic readings, Heroku's free hosting at the time, and Firestore usage kept within the available free allowance. I built the Express services, Next.js dashboard, and Firebase data and authentication integration. Abdessamad Shimad wrote the ESP32 firmware using Arduino and handled the board soldering and wiring. The project is now archived, and I have removed its Firebase project.
Collect electrical readings from an ESP32 at home and turn them into useful charts, date-range statistics, and consumption-based cost estimates without paying for additional infrastructure.
The ESP32 sent periodic readings to an Express API hosted on Heroku. The API checked a shared API key and validated measurements before writing them to Firestore. A Next.js dashboard displayed voltage, current, frequency, power factor, active power, reactive power, apparent power, and energy. Users could filter by date, review statistics, estimate electricity costs, and request PDF reports. Firebase Authentication supported user accounts.
Work within the hosting budget. We considered an MQTT-based workflow with Node-RED, but did not want to operate an additional hosted service within this project's budget. The Express and Firestore approach fit the free hosting and usage allowances available to us at the time. This was a project-specific choice, not a claim that MQTT inherently requires paid hosting.
Trade update frequency for lower usage. Periodic submissions reduced Firestore writes and helped keep the project within its free allowance. The dashboard therefore showed sampled measurements rather than continuous telemetry.
Keep the storage and dashboard manageable. Grafana and InfluxDB were alternatives we knew about, but we chose Firestore and a custom Next.js interface to fit our budget and existing stack. We accepted that this was not a dedicated time-series architecture.
Check requests at ingestion. The Express API checked a shared API key and validated values before writing to Firestore. This restricted submissions but was not a complete security model by itself. Measurement writes were reserved for the Express server using the Firebase Admin SDK. Firestore Security Rules governed access from the frontend and blocked client-side changes to measurement data; those rules were configured in Firestore, not enforced by the interface.
Cache cost calculations after the first request. Calculating costs from the stored readings was expensive, so the first request computed the result and saved it in a separate Firestore collection. Later requests reused that stored result instead of repeating the calculation and reading the same measurements again. Cached results needed to account for additional readings to remain current.
Separate report generation. A dedicated Express service handled PDFs while the frontend requested and displayed the results.
The ESP32 firmware submitted readings to a hosted Express ingestion service using HTTP-based requests. The service used the Firebase Admin SDK to store validated data in Firestore. Measurement writes were reserved for this server-side path; Firestore Security Rules restricted client access and prevented the Next.js client from modifying those readings. Next.js read and processed that data for gauges, historical charts, statistics, and estimated costs, with Firebase Authentication for accounts. A separate Express service generated PDF reports requested by the frontend. Both Express services used Heroku hosting.
During its operation, IGTech brought the home's electrical measurements into one dashboard with date-range views, minimum and maximum statistics, estimated consumption costs, and downloadable PDF reports. The result was a working monitoring workflow within the project's budget; no billing-accuracy or usage-growth claim is made.
The application is archived and no longer operational after removal of its Firebase project. Its periodic sampling did not provide continuous real-time monitoring, and cost figures were estimates based on recorded consumption. Stored monthly summaries needed care as new readings arrived. We have discussed a successor using MQTT and a revised monitoring architecture, but it has no committed schedule and is not part of this implementation.
Bring projects, writing, and tools together in a site that is easy to navigate, while preserving content and links from the previous portfolio.
Make it easy to find Steam games, keep a personal shortlist, and see which titles are on sale. The goal was a small browser-based tool, without an account system or integration with a user's Steam wishlist.
Make the connected-device information shown by my router accessible without repeating the same manual login and navigation. I wanted to retrieve device addresses and make router interactions programmable through the interface that was available.