Dashboard data
Remote control: what the dashboard shows
The whole hardware path in software: ESP32, ESP server and backend, with the same messages and endpoints as the real ones. On sample data the dashboard reads this simulated hardware, so it looks just like a connected ESP32. On real-time data it runs while the real ESP32 is connected, and stays idle otherwise. The hardware simulation never talks to the real API; only the ML test data below writes to the real database.
Hardware simulation off. Waiting for the dashboard: open it in another tab. The simulated hardware below runs with it while the ESP32 is connected.
Run npm run dev and open this page and the dashboard from
localhost. Pages opened straight from disk can't talk to each other.
Remote control: what the dashboard shows
The 6-hour history the Prediction page reads (data/prediction.json)
Changes the plant on the dashboard
Each dot is a message on its way
esp32.ino Ā· sends a reading every second
Uptime ā Ā· last line sent on serial
server.py Ā· bridges the ESP32's serial port and the backend
/data
0 sent
ā
/status
every 3 s
ā
Last command written to serial
ā
Recent requests
Backend/app.py, simulated in this tab Ā· same endpoints and rules, never the real API
Like Weisen's script, the simulated ESP server sends no key, so turning this on makes POST /data fail with 401.
ā
ā
"connected" turns false 10 s after the last reading. Watering is capped at 600 s and the valve turns itself off when time is up.
ESP32 ā ESP server at 115200 baud