You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 days ago | |
|---|---|---|
| .. | ||
| certs | 3 days ago | |
| templates | 3 days ago | |
| .dockerignore | 3 days ago | |
| Dockerfile | 3 days ago | |
| FLY_README.md | 3 days ago | |
| README.md | 3 days ago | |
| README_ZH.md | 3 days ago | |
| __init__.py | 3 days ago | |
| app.py | 3 days ago | |
| fly.toml | 3 days ago | |
| requirements.txt | 3 days ago | |
README.md
ESP32 Temperature Chart Web Application
This Flask-based web application displays temperature data sent from an ESP32 device using MQTT. It includes a web interface for visualizing the temperature chart and an API to fetch temperature data.
Requirements
- Python 3.8 or later
- Virtual environment tool (like
virtualenvorconda) - MQTT Broker credentials
Local Setup
-
Clone the Repository:
git clone [Repository URL] cd [Repository Name] -
Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install Dependencies:
pip install -r requirements.txt -
Configure MQTT Settings in
app.py: Modify the MQTT configuration settings inapp.py:MQTT_BROKER_URLMQTT_BROKER_PORTMQTT_USERNAMEMQTT_PASSWORDMQTT_CLIENT_ID
-
Run the Application:
python app.pyAccess the web interface at
http://localhost:8080.
Deploying to Fly.io
-
Install Fly.io CLI: Follow the instructions on Fly.io documentation.
-
Login to Fly.io:
flyctl auth login -
Initialize Fly.io App:
flyctl launch -
Deploy the App:
flyctl deploy -
Verify Deployment:
flyctl statusVisit the URL provided by Fly.io to access your application.