How peterlourens/osventilationidf works
OSVentilation is ESP32-S3 firmware for demand-controlled ventilation, replacing an Itho controller. A user sets fan speed through the HTTP API or MQTT; the controller also reads configured I2C sensors and uses state-machine logic to govern ventilation and valve movement. Other documented capabilities include a web UI with WebSocket updates, LCD/RTC support, Wi-Fi and Ethernet networking, and periodic InfluxDB reporting. The README and source index support these major subsystems, but most implementation files were not excerpted, so uncertain internal call links are omitted.
Main entry points: statemachine.c Ventilation state machine · http_functions.c HTTP API · network_manager.c Network manager · i2c_sensors.c I2C sensor access
Components 23
Ventilation control
- Ventilation state machine
main/statemachine.c - Fan control
main/fancontrol.c - Valve control
main/valvecontrol.c
Sensors and actuators
- Sensor polling task
main/task_i2c_sensors.c - I2C sensor access
main/i2c_sensors.c - BME68x driver
components/bme680/src/bme68x.c - BSEC integration
components/bsec/src/bsec_integration.c - RTC task
main/task_i2c_ds3231.c
User and telemetry interfaces
- HTTP API
main/http_functions.c - MQTT interface
main/mqtt.c - Web UI
web/ui.js - WebSocket updates
main/http_send_ws_data.c - InfluxDB reporting task
main/task_influxdb.c - InfluxDB client
main/influxdb.c - LCD task
main/task_i2c_lcd.c
Runtime and connectivity
- Network manager
main/network_manager.c - Ethernet interface
main/eth_functions.c - Wi-Fi interface
main/wifi_functions.c - Configuration and files
main/config_files.c - System statistics
main/sys_stats.c - Syslog
main/syslog.c - Pushbuttons
main/task_pushbutton.c
Other components
- Operator
Connections 14
- Operator → HTTP API: sets speed
- Operator → MQTT interface: sets speed
- Web UI → HTTP API: uses API
- HTTP API → Ventilation state machine: applies control
- MQTT interface → Ventilation state machine: applies control
- Ventilation state machine → Fan control: sets fan speed
- Ventilation state machine → Valve control: controls valves
- Sensor polling task → I2C sensor access: reads sensors
- I2C sensor access → BME68x driver: supports sensor
- BSEC integration → BME68x driver: integrates driver
- InfluxDB reporting task → InfluxDB client: reports periodically
- HTTP API → WebSocket updates: serves updates
- Network manager → Ethernet interface: manages interface
- Network manager → Wi-Fi interface: manages interface