How arjenhiemstra/ithowifi works
IthoWiFi is ESP32 firmware that connects Itho ventilation units to Wi-Fi for local control and home-automation integration. The principal workflow is a user or automation client issuing a fan-control command through REST, MQTT, or the web interface; the firmware communicates with the unit over I2C or RF. The README also documents Home Assistant discovery, live WebSocket updates, sensors, and web-triggered OTA updates. Paths come from the tree; most implementation excerpts were not sampled, so links show documented product flows rather than unverified internal call chains.
Main entry points: IthoDevice.cpp Itho device logic · WebServerHandlers.cpp Web handlers · MqttAPI.cpp MQTT API · controls.js Web interface
Components 20
User interfaces
- Web interface
software/NRG_itho_wifi/main/webroot_source/controls.js - Web handlers
software/NRG_itho_wifi/main/handlers/WebServerHandlers.cpp - REST API v2
software/NRG_itho_wifi/main/api/WebAPIv2Rest.cpp - WebSocket
software/NRG_itho_wifi/main/handlers/WebSocketHandlers.cpp
Ventilation control
- Itho device logic
software/NRG_itho_wifi/main/ithodevice/IthoDevice.cpp - I2C interface
software/NRG_itho_wifi/main/ithodevice/i2c_esp32.cpp - RF control
software/NRG_itho_wifi/main/managers/RFManager.cpp - CC1101 radio
software/NRG_itho_wifi/main/cc1101/IthoCC1101.cpp - Itho command queue
software/NRG_itho_wifi/main/IthoQueue.cpp
Network integrations
- MQTT API
software/NRG_itho_wifi/main/api/MqttAPI.cpp - HA discovery
software/NRG_itho_wifi/main/HADiscovery.cpp - Network manager
software/NRG_itho_wifi/main/managers/NetworkManager.cpp - Wi-Fi connection
software/NRG_itho_wifi/main/managers/WiFiConnectionManager.cpp
Device operations
- Configuration
software/NRG_itho_wifi/main/config/Config.cpp - Sensor manager
software/NRG_itho_wifi/main/managers/SensorManager.cpp - OTA updates
software/NRG_itho_wifi/main/managers/SecureWebCommLite.cpp - Firmware tasks
software/NRG_itho_wifi/main/tasks/task_init.cpp
Other components
- User
- Automation client
- Itho unit
Connections 24
- User → Web interface: controls
- User → REST API v2: sends commands
- Automation client → REST API v2: sends commands
- Automation client → MQTT API: publishes commands
- Web interface → Web handlers: requests
- Web handlers → Itho device logic: controls
- REST API v2 → Itho device logic: controls
- MQTT API → Itho device logic: controls
- Itho device logic → Itho command queue: queues commands
- Itho device logic → I2C interface: communicates
- Itho device logic → RF control: communicates
- I2C interface → Itho unit: exchanges data
- RF control → CC1101 radio: dispatches commands
- CC1101 radio → Itho unit: sends RF
- Itho unit → CC1101 radio: sends status
- MQTT API → Automation client: publishes status
- WebSocket → Web interface: streams updates
- HA discovery → Automation client: announces device
- Network manager → Wi-Fi connection: manages connection
- Configuration → Network manager: provides settings
- Sensor manager → Itho device logic: provides readings
- Web handlers → OTA updates: initiates updates
- OTA updates → Automation client: downloads firmware
- Firmware tasks → Itho device logic: initializes device