WhisperBridge
WiFi/MQTT-to-BLE bridge that lets Home Assistant control a Vent-Axia Svara fan via a one-shot boost command — no cloud subscription required.
// Overview
WhisperBridge is an ESP32 firmware that acts as a protocol bridge between a home automation network and a Vent-Axia Svara bathroom fan. The fan exposes a proprietary BLE GATT interface — it has no WiFi or MQTT support. WhisperBridge fills that gap: it connects to the home network, subscribes to an MQTT topic, and translates each ON command into the correct BLE authentication and boost command sequence targeted at the fan by MAC address.
On first boot with no stored WiFi credentials, the device starts a WPA2 captive-portal access point (WhisperBridge-Setup) at 10.0.0.1. The user connects, scans nearby networks, picks one, and saves credentials — the device then restarts in station mode. In station mode it registers as whisperbridge.local via mDNS, starts ArduinoOTA, and publishes Home Assistant MQTT auto-discovery so the fan appears automatically as a switch entity with the mdi:fan icon.
The BLE authentication and boost sequence blocks for hundreds of milliseconds. Rather than stalling the main loop, this work runs in a dedicated FreeRTOS task (ble_boost, 8 KB stack). The main loop posts a task notification to trigger a run; the BLE task atomically updates _running and _lastSuccess flags that the loop reads safely without locks. Once the task completes, the loop detects the falling edge on _running and publishes OFF to the state topic to keep Home Assistant in sync.