Skip to content

feat: add IoT Flask logger for ESP32 sensor telemetry#69

Open
smilesz10 wants to merge 1 commit intobos-com:mainfrom
smilesz10:fix/iot-flask-logger
Open

feat: add IoT Flask logger for ESP32 sensor telemetry#69
smilesz10 wants to merge 1 commit intobos-com:mainfrom
smilesz10:fix/iot-flask-logger

Conversation

@smilesz10
Copy link
Copy Markdown

What changed

  • Created iot/logging/app.py — Flask service with 3 endpoints:
    POST /log, GET /logs, GET /health
  • Stores telemetry (temperature, humidity, flood_level) in SQLite
  • Input validation for missing sensor_id and bad JSON
  • Added requirements.txt and README with curl example

Why

ESP32 sensor nodes had no endpoint to send data to.
This bridges the physical IoT layer with the digital platform.

How to test

cd iot/logging
pip install -r requirements.txt
python app.py
curl -X POST http://localhost:5000/log
-H "Content-Type: application/json"
-d '{"sensor_id":"ESP32-001","temperature":24.5}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant