Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

B5u2423/Realtime-Data

Repository files navigation

Display Realtime Data With Python, Flask and MySQL

About

A simple system with 2 servers: a HTTP server for handling the data from the IoT devices, and a WebSocket server for sending real-time data to the client, which then will render the chart accordingly.

System Overview An overview of the system.

Example Chart The rendered real-time data page.

Built With

This project is built with all the following frameworks/libraries/plugins:

Getting Started

Prerequisites

You MUST have Python, Flask and MySQL installed, if not, Google how to. Most of the required Python libraries are noted the requirement.txt file, so run the following command to automatically install them:

pip install -r requirement.txt

Installing

Just clone the repo and run. All the JavaScript libraries have been included in the vendors folder so the WebSocket server can be deployed locally without Internet connection.

git clone https://github.com/B5u2423/Realtime-Data

(back to top)

Deployment

Run http-server.py if you want to receive data from the sensors and save it to the database. I use an ESP32 with a DHT11 sensor to gather data on temperature and humidity. The HTTP server is running on port 8090, configure the URL according to your IP and the port in the device sketch. Example source code of the ESP32 is included the sketch folder.

Run websock-server.py, the WebSocket server is running on port 8091, connect to it at localhost:8091.

(back to top)

License

Distributed under the MIT License - see LICENSE the for more details.

(back to top)

About

A simple real-time display system using Python, Flask and MySQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published