Kenji Kozai: Hauslane UC-PS18 range hood ESPHome external component

Hauslane UC-PS18 range hood ESPHome external component

This external component for ESPHome allows for control of a Hauslane UC-PS18 range hood using an ESP device such as ESP32-C3. It uses optocouplers to discharge the capacitive spring sensors to simulate button presses, and it uses the UART decoder built-in to ESPHome to read the state of the fan and light. (YouTube video)

The UC-PS18 model only has one-way communication from the front panel control board to the main control board. It constantly streams data to the main control board with the requested fan speed and light state. The main control board does not send any information back to the front panel, and indeed there is only a single data transmission line from the front panel to the main board with no line for data flowing in the other direction. If the main control board does not receive any messages for a set amount of time (about 2 seconds), then it assumes the front panel is off and turns off all fans and lights.

Technically, this communication from the front panel to the main control board is almost certainly not using UART protocol but some other, possibly proprietary, protocol. When set to 3600 bauds, there are enough bits that follow the patterns of the UART protocol that the decoder is able to process them as UART messages. However, because many bits that do not follow the patterns for UART signaling are lost, the messages do not fit any sensible patterns for sending the state of the fan and light. Thus, each state is hard-coded into the external component to the UART fragments that the ESP is able to capture.

Proper reverse-engineering requires more advanced tools such as a logic analyzer or oscilloscope. For interfacing with the ESP32, this is not entirely necessary with this approach of simulating the pressing of individual buttons. If someone is able to decode the protocol, then it would be possible to replace the front panel entirely with an ESP32, using the ESP32 microcontroller to fully control the main board by sending it messages instead of the current hack of wiring up each of the front panel’s buttons with an optocoupler. In the case of reverse-engineering, if one also wanted to keep using the front panel, it would also be necessary to find a connection point for sending commands to the front panel so that it receive commands directly or update the current state.

This project serves as an example for simple automation of circuits using capacitive touch buttons. A transistor does not work to discharge the touch sensor reliably because of leakage, so an optocoupler becomes necessary to switch connections from the capacitive coil to ground. This is also a simple example of integrating two different component types (fan and light) into an ESPHome component.

Code Repository

Tags: