A web-based dashboard for monitoring and controlling Tuya-powered dehumidifiers. Monitor humidity levels, view historical data, and control your device from any web browser on your local network.
demo.mp4
This dashboard connects directly to your Tuya dehumidifier over your local network and provides:
- Real-time monitoring of humidity, temperature, and device status
- Historical charts showing trends over time (1 hour to 7 days)
- Remote control of all device functions
- Event logging of all state changes
- Statistics and runtime tracking
- Electricity cost calculation
All data is stored locally in a SQLite database, and the dashboard works without internet connectivity.
- Python 3.10 or higher
- Node.js 18 or higher
- Tuya-compatible dehumidifier on the same network
- Linux, macOS, or Windows
git clone https://github.com/gediz/dehumidifier-dashboard.git
cd dehumidifier-dashboardYou need three pieces of information from your Tuya device:
- Device ID
- Device Local Key
- Device IP address (optional, for faster connection)
See docs/TUYA_SETUP.md for step-by-step instructions on getting these credentials.
Copy the example environment file:
cp .env.example .envEdit .env and add your device credentials (Device ID, Local Key, IP).
Backend:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r backend/requirements.txtFrontend:
cd frontend
npm install
cd ..Generate a secure password hash:
source venv/bin/activate # On Windows: venv\Scripts\activate
python generate_password.pyCopy the generated hash to the PASSWORD field in your .env file.
Open two terminal windows:
Terminal 1 - Backend:
./start-backend.shOr manually:
source venv/bin/activate
cd backend
python main.pyBackend will start on: http://localhost:8000
Terminal 2 - Frontend:
./start-frontend.shOr manually:
cd frontend
npm run devFrontend will start on: http://localhost:5173
- Open browser to: http://localhost:5173
- Login with the password you used when generating the hash
Monitor live device status and control all functions:
- Turn device on/off
- Set target humidity (30-80%)
- Adjust fan speed
View historical data with interactive charts:
- Humidity and temperature trends
- Configurable time ranges (1h, 6h, 24h, 7 days)
- Compare current vs target humidity
Track all device activity:
- State changes (power, humidity, fan, etc.)
- User actions highlighted separately
- Full event history with timestamps
- Filter by event type
Analyze device usage:
- Average humidity and temperature
- Total runtime hours
- Energy consumption (kWh)
- Electricity cost
- View by period: today, week, month, all time
Backend:
- Python with FastAPI
- TinyTuya for local device control
- SQLite for data storage
- APScheduler for background polling
- WebSocket for real-time updates
Frontend:
- Svelte for reactive UI
- Chart.js for visualization
- Modern, responsive design
This dashboard uses TinyTuya to control your device directly over your local network:
- No cloud API limits or quotas
- Works without internet
- Faster response times
- Your data stays private
- More reliable connection
- How to Run - Detailed step-by-step instructions
- Getting Tuya Credentials - How to get your device info
- Architecture - Technical details and system design
- API Reference - Backend API documentation
- Olefini OL12-BD023B
This dashboard should work with any Tuya-based dehumidifier. If you test it with another model, please let us know.
MIT License - see LICENSE file for details.
Contributions are welcome. Please feel free to submit issues or pull requests.