I'm tinkering with a full BLE-based smart home assistant.
Goal: control and monitor any BLE sensor (DIY with ESP32 or commercial devices like the Parrot Pot / Huawei Flower Power) via a clean web interface.
What I already have:
- Scanning and reading all nearby BLE sensors (temperature, humidity, light, etc.)
- Multi-sensor compatibility (not just flower pots)
- Flask + HTML/JS web interface to display live values and historical data (graphs)
- Automatic watering (via relay/solenoid valve if the sensor supports it)
- Custom REST API to centralize everything
- Working frontend JS login
Current stack:
- Python + Flask (backend)
- Vanilla HTML/CSS/JS (frontend)
- BLE with Python (scanning + parsing)
- SQLite for the database
What I want to add:
- A solid production setup without relying on NGINX/Caddy
- Proper SSL/TLS (no sketchy self-signed certs)
- JWT/OAuth2 auth, secure sessions
- CSRF, XSS protection, secure headers with Flask-Talisman & co
- SSE/WebSocket for true real-time in the future
What I'm looking for:
Best practices for production and security with Flask, without having to go full heavy artillery like Docker or NGINX. A clean and lightweight setup. Got any ideas or experience to share? Drop your solutions if you’ve done something similar.
Thanks in advance !