How caffeineonice/restproject works
This repository contains alternative implementations of a gas and temperature/humidity monitoring system: polling with Supabase, tunneling with Zrok, and a local HTTP variant. The shared domain workflow is to request or schedule sensor readings, collect samples, and expose or store results. The excerpts substantiate the Poll and Tunnel worker/fetch/collection paths and the local HTTP routes; UI behavior and unsampled service wiring are not inferred.
Main entry points: Poll/script.py Poll worker · esp.ino ESP32 sensor · Misc_local HTTP/script.py Local HTTP API · Tunnel/script.py Tunnel API
Components 24
User interfaces
- Polling UI
Poll/UI.py - Tunnel UI
Tunnel/UI.py - Local UI
Misc_local HTTP/UI.py
Runtime services
- Poll worker
Poll/script.py - Tunnel API
Tunnel/script.py - Local HTTP API
Misc_local HTTP/script.py - Poll configuration
Poll/config.py
Sensor acquisition
- Temperature fetch
Poll/fetch_temphum.py - Gas fetch
Poll/fetch_gas.py - Temperature collection
Poll/collect_temphum.py - Gas collection
Poll/collect_gas.py - Temperature fetch
Tunnel/fetch_temphum.py - Gas fetch
Tunnel/fetch_gas.py - Temperature collection
Tunnel/collect_temphum.py - Gas collection
Tunnel/collect_gas.py - Temperature fetch
Misc_local HTTP/fetch_temphum.py - Gas fetch
Misc_local HTTP/fetch_gas.py - Temperature collection
Misc_local HTTP/collect_temphum.py - Gas collection
Misc_local HTTP/collect_gas.py
Data and infrastructure
- ESP32 sensor
Poll/esp/esp.ino - Supabase
- Local CSV files
- Zrok tunnel
Other components
- User
Connections 35
- User → Local HTTP API: requests readings
Misc_local HTTP/script.py - Local HTTP API → Temperature fetch: calls handler
Misc_local HTTP/script.py - Local HTTP API → Gas fetch: calls handler
Misc_local HTTP/script.py - Local HTTP API → Temperature collection: starts collection
Misc_local HTTP/script.py - Local HTTP API → Gas collection: starts collection
Misc_local HTTP/script.py - Temperature fetch → ESP32 sensor: requests reading
Misc_local HTTP/fetch_temphum.py - Gas fetch → ESP32 sensor: requests reading
Misc_local HTTP/fetch_gas.py - Temperature fetch → Local CSV files: writes readings
Misc_local HTTP/fetch_temphum.py - Gas fetch → Local CSV files: writes readings
Misc_local HTTP/fetch_gas.py - Poll worker → Temperature fetch: calls handler
Poll/script.py - Poll worker → Gas fetch: calls handler
Poll/script.py - Poll worker → Temperature collection: processes jobs
Poll/script.py - Poll worker → Gas collection: processes jobs
Poll/script.py - Temperature collection → Temperature fetch: calls handler
Poll/collect_temphum.py - Gas collection → Gas fetch: calls handler
Poll/collect_gas.py - Temperature fetch → ESP32 sensor: requests reading
Poll/fetch_temphum.py - Gas fetch → ESP32 sensor: requests reading
Poll/fetch_gas.py - Temperature fetch → Supabase: inserts readings
Poll/fetch_temphum.py - Gas fetch → Supabase: inserts readings
Poll/fetch_gas.py - Poll worker → Supabase: polls and updates jobs
Poll/script.py - Tunnel API → Temperature fetch: calls handler
Tunnel/script.py - Tunnel API → Gas fetch: calls handler
Tunnel/script.py - Tunnel API → Temperature collection: starts collection
Tunnel/script.py - Tunnel API → Gas collection: starts collection
Tunnel/script.py - Temperature collection → Temperature fetch: calls handler
- Gas collection → Gas fetch: calls handler
- Temperature fetch → ESP32 sensor: requests reading
Tunnel/fetch_temphum.py - Gas fetch → ESP32 sensor: requests reading
Tunnel/fetch_gas.py - Temperature fetch → Supabase: inserts readings
Tunnel/fetch_temphum.py - Gas fetch → Supabase: inserts readings
Tunnel/fetch_gas.py - Poll worker → Poll configuration: uses settings
Poll/script.py - Poll configuration → Supabase: configures client
Poll/config.py - Polling UI → Supabase: uses polling backend
- Tunnel UI → Zrok tunnel: uses tunnel backend
- Zrok tunnel → Tunnel API: routes requests