{"id":29526246,"url":"https://github.com/lovnishverma/live-sensor","last_synced_at":"2026-04-19T15:01:44.958Z","repository":{"id":304107631,"uuid":"1017774961","full_name":"lovnishverma/live-sensor","owner":"lovnishverma","description":"This project demonstrates how to read temperature and humidity from a DHT11 sensor using an ESP8266 microcontroller, upload the data to Firebase Realtime Database, and display it in real-time on a web interface hosted via GitHub Pages.","archived":false,"fork":false,"pushed_at":"2025-09-02T13:32:18.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T15:39:52.010Z","etag":null,"topics":["dht11","esp8266","firebase","github-pages","realtimedatabase"],"latest_commit_sha":null,"homepage":"https://lovnishverma.github.io/live-sensor/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovnishverma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-11T04:46:46.000Z","updated_at":"2025-09-02T13:32:21.000Z","dependencies_parsed_at":"2025-07-11T09:11:55.341Z","dependency_job_id":"e3ef12a4-2d66-4bbe-b68c-b04c1231cfeb","html_url":"https://github.com/lovnishverma/live-sensor","commit_stats":null,"previous_names":["lovnishverma/live-sensor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovnishverma/live-sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Flive-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Flive-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Flive-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Flive-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovnishverma","download_url":"https://codeload.github.com/lovnishverma/live-sensor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Flive-sensor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32010957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dht11","esp8266","firebase","github-pages","realtimedatabase"],"created_at":"2025-07-16T20:01:58.106Z","updated_at":"2026-04-19T15:01:44.953Z","avatar_url":"https://github.com/lovnishverma.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌡️ Live DHT11 Sensor Data Dashboard\n\nThis project demonstrates how to read temperature and humidity from a **DHT11 sensor** using an **ESP8266** microcontroller, upload the data to **Firebase Realtime Database**, and display it in real-time on a web interface hosted via **GitHub Pages**.\n\n---\n\n\u003cimg width=\"982\" height=\"572\" alt=\"image\" src=\"https://github.com/user-attachments/assets/741020de-9183-4592-8872-6e7462765073\" /\u003e\n\n---\n\n## 📌 Features\n\n- 🚀 ESP8266 reads live temperature \u0026 humidity data\n- ☁️ Sends sensor readings to Firebase over HTTPS\n- 🌐 GitHub Pages displays data live using JavaScript\n- 🔄 Auto-updating interface every 5 seconds\n- 🧑‍🔧 Lightweight and beginner-friendly IoT stack\n\n---\n\n## 🛠️ Components Used\n\n| Component         | Description                        |\n|------------------|------------------------------------|\n| ESP8266           | NodeMCU / Wemos D1 mini, etc.      |\n| DHT11 Sensor      | Temp + Humidity sensor (3 or 4 pin)|\n| Firebase          | Realtime Database (cloud backend)  |\n| GitHub Pages      | Hosting frontend (HTML/JS)         |\n\n---\n\n## 🔌 Circuit Diagram\n\n| DHT11 Pin | ESP8266 NodeMCU Pin |\n|-----------|---------------------|\n| VCC       | 3.3V                |\n| DATA      | D4 (GPIO2)          |\n| GND       | G                   |\n\n\u003e For raw DHT11 modules: Add a 10KΩ pull-up resistor between `VCC` and `DATA`.\n\n---\n\n## 🔧 Firebase Setup\n\n1. Go to [https://console.firebase.google.com](https://console.firebase.google.com)\n2. Click **\"Add project\"** → Give it a name (e.g., `live-sensor`)\n3. Go to **Build → Realtime Database → Create Database**\n4. Start in **Test Mode** ✅\n5. Note your database URL (e.g., `https://your-project-id.firebaseio.com/`)\n6. Go to **Rules** and replace with:\n\n```json\n{\n  \"rules\": {\n    \".read\": true,\n    \".write\": true\n  }\n}\n````\n\n---\n\n## 📟 ESP8266 Arduino Code\n\nInstall libraries:\n\n* `ESP8266WiFi`\n* `ESP8266HTTPClient`\n* `WiFiClientSecure`\n* `DHT sensor library`\n\nUse this structure:\n\n```cpp\nconst char* ssid = \"your_wifi_name\";\nconst char* password = \"your_wifi_password\";\nconst char* firebaseHost = \"https://your-project-id.firebaseio.com/sensordata.json\";\n```\n\n\u003e For full code, see [`esp8266_dht11_firebase.ino`](esp8266_dht11_firebase.ino)\n\n---\n\n## 🌐 GitHub Pages Frontend\n\nHTML page fetches sensor data from Firebase and displays it live.\n\n📁 `index.html` key features:\n\n* Auto-updates every 5 seconds\n* Fetches JSON from Firebase\n* Displays sensor ID, sample name, temperature, and humidity\n\nHost this HTML on any static web server or [GitHub Pages](https://pages.github.com/).\n\n---\n\n## 🔄 Live Update Logic\n\nUses JavaScript `fetch()` to retrieve Firebase JSON:\n\n```js\nconst url = \"https://your-project-id.firebaseio.com/sensordata.json\";\n\nasync function updateData() {\n  const res = await fetch(url);\n  const data = await res.json();\n  // update DOM\n}\nsetInterval(updateData, 5000);\n```\n\n---\n\n## 📦 Folder Structure\n\n```\nlive-sensor-project/\n├── index.html                # GitHub Pages frontend\n├── esp8266_dht11_firebase.ino # ESP8266 Arduino sketch\n└── README.md                 # You're here!\n```\n\n---\n\n## 🚧 Limitations\n\n* Firebase Realtime DB in test mode is insecure (use rules in production)\n* DHT11 is low-precision (consider DHT22 or BME280)\n* Page refresh not required, JavaScript auto-updates via fetch()\n\n---\n\n## ✅ Future Improvements\n\n* Store historical data and chart using Chart.js\n* Add timestamps to logs\n* Secure Firebase access with authentication\n* Push alerts for abnormal sensor readings\n\n---\n\n## 📸 Demo Preview\n\n![Live Sensor Dashboard](https://user-images.githubusercontent.com/demo/dashboard-preview.gif)\n\n---\n\n## 💬 Contributing\n\nPull requests welcome! Feel free to fork and improve the dashboard or ESP code.\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## 🙌 Acknowledgments\n\n* [Firebase Realtime Database](https://firebase.google.com/)\n* [ESP8266 Arduino Core](https://github.com/esp8266/Arduino)\n* [DHT Sensor Library](https://github.com/adafruit/DHT-sensor-library)\n\n```\n\n---\n\n## 📝 Credits:\n\n- Lovnish Verma (princelv84@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovnishverma%2Flive-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovnishverma%2Flive-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovnishverma%2Flive-sensor/lists"}