{"id":20254650,"url":"https://github.com/akinduid/smart-medibox","last_synced_at":"2026-05-06T00:39:18.985Z","repository":{"id":229172642,"uuid":"775990385","full_name":"AkinduID/Smart-MediBox","owner":"AkinduID","description":"This Repository contains source files for a IoT based smart medicine container","archived":false,"fork":false,"pushed_at":"2025-08-14T03:36:49.000Z","size":368,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T18:48:40.836Z","etag":null,"topics":["cplusplus","esp32","iot","nodered"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AkinduID.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-22T13:08:11.000Z","updated_at":"2025-08-14T03:36:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"52ac6a4d-6555-456e-882b-ac51eb2845c2","html_url":"https://github.com/AkinduID/Smart-MediBox","commit_stats":null,"previous_names":["akinduid/smart-medibox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AkinduID/Smart-MediBox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FSmart-MediBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FSmart-MediBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FSmart-MediBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FSmart-MediBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AkinduID","download_url":"https://codeload.github.com/AkinduID/Smart-MediBox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FSmart-MediBox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278802800,"owners_count":26048566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"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":["cplusplus","esp32","iot","nodered"],"created_at":"2024-11-14T10:34:16.202Z","updated_at":"2026-05-06T00:39:18.979Z","avatar_url":"https://github.com/AkinduID.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart MediBox\n\n\u003ca href=\"https://isocpp.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/C++-00599C?style=flat\u0026logo=c%2B%2B\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://nodered.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Node--RED-8F2F23?style=flat\u0026logo=node-red\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://www.espressif.com/en/products/socs/esp32\"\u003e\u003cimg src=\"https://img.shields.io/badge/ESP32-000000?style=flat\u0026logo=espressif\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://platformio.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/PlatformIO-FF7F32?style=flat\u0026logo=platformio\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://code.visualstudio.com/\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/badge/Visual%20Studio%20Code-0078d7.svg?logo=visualstudiocode\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\nA smart medicine container built on the ESP32 microcontroller that reminds patients when to take their medicine. The device displays the current time, monitors temperature and humidity, and adjusts a servo-driven shading panel based on ambient light intensity. It can be fully monitored and controlled through a Node-RED dashboard over MQTT.\n\n\u003e Developed as part of the **EN2853 – Embedded Systems and Applications** module.\n\n\u003cimg src=\"https://github.com/AkinduID/Smart-MediBox/blob/main/docs/medibox.png\"/\u003e\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Repository Structure](#repository-structure)\n- [Hardware Overview](#hardware-overview)\n- [Firmware Versions](#firmware-versions)\n- [Node-RED Dashboard](#node-red-dashboard)\n- [Quick Start](#quick-start)\n- [Documentation](#documentation)\n\n---\n\n## Features\n\n- **Real-time clock** – synchronised with NTP over Wi-Fi (UTC offset configurable)\n- **Medicine alarms** – up to 3 configurable alarms with buzzer and LED indication\n- **Temperature \u0026 humidity monitoring** – DHT22 sensor with on-screen warnings and MQTT telemetry\n- **Light-intensity monitoring** – dual LDR sensors reporting to the dashboard\n- **Servo-controlled shading panel** – angle calculated from light direction and a tunable control factor\n- **OLED display** – 128 × 64 pixel SSD1306 display for time, warnings, and menu navigation\n- **4-button menu** – Up / Down / OK / Cancel pushbuttons for local configuration\n- **Node-RED dashboard** – remote monitoring of sensors and remote control of alarms and servo\n\n---\n\n## Repository Structure\n\n```\nSmart-MediBox/\n├── device-firmware/          # Base firmware (no MQTT)\n│   ├── src/\n│   │   └── main.cpp          # Main application code\n│   └── platformio.ini        # PlatformIO build configuration\n├── device-firmware-updates/  # Updated firmware (with MQTT \u0026 servo)\n│   ├── src/\n│   │   └── main.cpp          # Main application code\n│   └── platformio.ini        # PlatformIO build configuration\n├── nodered-dashboard/\n│   └── flows.json            # Node-RED flow export\n└── docs/\n    ├── hardware.md           # Hardware components and pin assignments\n    ├── firmware.md           # Firmware architecture and function reference\n    └── nodered-dashboard.md  # Dashboard setup and MQTT protocol\n```\n\n---\n\n## Hardware Overview\n\n| Component | Description |\n|-----------|-------------|\n| ESP32 DOIT DevKit V1 | Main microcontroller |\n| SSD1306 (128×64 OLED) | Display via I²C |\n| DHT22 | Temperature \u0026 humidity sensor |\n| Servo motor | Shading panel actuator |\n| LDR × 2 | Light-direction detection (left / right) |\n| Buzzer | Alarm tone output |\n| LED | Alarm visual indicator |\n| Pushbuttons × 4 | Up / Down / OK / Cancel navigation |\n\nFor full pin-assignment tables see [`docs/hardware.md`](docs/hardware.md).\n\n---\n\n## Firmware Versions\n\n### `device-firmware` (base)\nThe first iteration of the firmware. Handles time display, alarm management, and basic temperature/humidity warnings without any network connectivity beyond NTP synchronisation.\n\n### `device-firmware-updates` (MQTT-enabled)\nThe production firmware. Extends the base version with:\n- MQTT client (PubSubClient) connected to `test.mosquitto.org`\n- Publishes temperature, humidity, and light-intensity readings\n- Subscribes to alarm enable/disable commands and servo control parameters\n- Servo position calculated from dual-LDR readings and a configurable control factor\n\nSee [`device-firmware/README.md`](device-firmware/README.md) and [`device-firmware-updates/README.md`](device-firmware-updates/README.md) for build and flash instructions.\n\n---\n\n## Node-RED Dashboard\n\nThe dashboard (imported from `nodered-dashboard/flows.json`) provides:\n\n| Panel | Contents |\n|-------|----------|\n| Temperature | Gauge and live line chart |\n| Humidity | Gauge and live line chart |\n| Light Intensity | Gauge and live line chart |\n| Servo Control | Minimum angle slider, control-factor slider, tablet-preset dropdown |\n| Alarm Control | Toggle switches for Alarm 1, 2, and 3 |\n\nSee [`nodered-dashboard/README.md`](nodered-dashboard/README.md) for import instructions.\n\n---\n\n## Quick Start\n\n1. **Flash the firmware** – open `device-firmware-updates/` in VS Code with PlatformIO, build, and upload to the ESP32.\n2. **Import the Node-RED flow** – in Node-RED go to **Menu → Import**, paste the contents of `nodered-dashboard/flows.json`, and deploy.\n3. **Power on the device** – the ESP32 connects to Wi-Fi (`Wokwi-GUEST` by default), syncs the time, and begins publishing sensor data.\n4. **Open the dashboard** – navigate to `http://\u003cnode-red-host\u003e:1880/ui` to monitor and control the MediBox.\n\n---\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [`docs/hardware.md`](docs/hardware.md) | Component list, pin assignments, wiring notes |\n| [`docs/firmware.md`](docs/firmware.md) | Firmware architecture, function reference, configuration |\n| [`docs/nodered-dashboard.md`](docs/nodered-dashboard.md) | Dashboard panels, MQTT topics, import guide |\n| [`device-firmware/README.md`](device-firmware/README.md) | Base firmware build \u0026 flash guide |\n| [`device-firmware-updates/README.md`](device-firmware-updates/README.md) | MQTT firmware build \u0026 flash guide |\n| [`nodered-dashboard/README.md`](nodered-dashboard/README.md) | Node-RED flow import guide |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakinduid%2Fsmart-medibox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakinduid%2Fsmart-medibox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakinduid%2Fsmart-medibox/lists"}