A custom ESPHome component for controlling Chinese Webasto heaters using ESP32. This project adds on/off control via soldering, as the serial communication is currently read-only. It is based on the work of timmchugh11 and builds on the reverse engineering efforts of Ray Jones.
- Introduction
- Features
- Roadmap - nice to have in future
- Hardware Requirements
- Software Installation on ESP32
- Configuration
- Usage
- Hardware modification - On/Off Switch control
- Documentation
- Credits
- License
This project enables control of Chinese Webasto heaters using ESP32 and ESPHome. It extends the functionality of the original work by timmchugh11 and incorporates insights from Ray Jones' reverse engineering of the serial communication protocol.
The current implementation focuses on read-only serial communication and adds on/off control via GPIO pins, requiring soldering to the heater's control board.
- Read-only serial communication: Monitor heater status, temperature, fan speed, and error codes.
- On/Off control: Turn the heater on/off (currently hardware modification required, see below)
- Smart On/Off: Automatically handles 1-second or 3-second button presses based on the heater's current state.
- MQTT integration: Publish heater data to an MQTT broker.
- OTA updates: Update the firmware over-the-air (ESPHome feature)
- Web interface: Access a local web interface for monitoring and control (ESPHome feature):
-
Getting control with on/off switch without soldering.
This project seems to have it worked out!
-
refactoring code to proper ESPHome component
- ESP32 development board (e.g., ESP32 DevKit).
- Chinese Webasto heater with a compatible control board: "3-wire": the 3 wires: red,blue and black connect to webasto controller via "triangle" connector
- Soldering tools: To connect GPIO pins for on/off control.
- 1k resistors: For connecting GPIO pins to the heater's control board.
- Wiring: Connect the ESP32 to the heater's serial interface and GPIO pins.
This project is compatible and proven to work with "six blade universal controller" types - using designation from Van Life UK blog author.
Check excellent writeup of controllers and ECUs at Van Life UK: Chinese Diesel Controller, Motherboard & Remote Control Guide | Web Archive Snapshot from 14th Sep 2024
Note: I have bought heater with black controller. I had replaced it with blue controller which has a much better remote with tiny OLED display.
For the mod I have played with soldering the black one. Success!
-
Clone the repository:
git clone https://github.com/pavelw/esphome-chinbasto.git cd esphome-chinbasto
-
Install ESPHome:
- Follow the ESPHome installation guide to set up ESPHome on your system.
-
Set up
secrets.yaml
:- Copy
secrets.yaml.template
tosecrets.yaml
and fill in your Wi-Fi credentials, MQTT broker details, and OTA password.
- Copy
-
Compile and upload:
- Compile the firmware and upload it to your ESP32:
esphome run esp32-webasto36.yaml
- Compile the firmware and upload it to your ESP32:
To add on/off control to your heater, you need to solder transistor to the board. This is temporary albeit fully working solution until someone manages to control via UART, see Roadmap - nice to have in future.
Parts required, besides ESP32:
- 1 transistor, type 2N2222
- 1 resistor, 1K Ohm
When soldering to the control board, you will need to identify the emitter, base, and collector of a transistor. If you dont have this info from spec sheet, then:
- Set multimeter to diode mode, black probe in COM port, red probe in voltage port.
- Assume that we have NPN type transistor (2N2222 is that type) and BASE is in the middle.
- Keep red probe on middle leg and read values when black probe is connected to each of other legs of the transistor
Result:
- Higher voltage drop (~0.7V readout on multimeter) → Emitter.
- Lower (~0.5V readout on multimeter) → Collector.
A helpful video tutorial on which I based above method can be found here:
How to Identify Emitter, Base, and Collector on a Transistor
- Blue wire: serial connection wire
- Red wire: 5V DC, OPTIONAL: connect ESP32 to its +5V here to power ESP32 off the webasto.
- Black wire: Ground. connect this to GND of ESP32 (REQUIRED otherwise reading serial connection will not work)
- check using multimeter which pins of button are going to the ground. Use "contuinity check" with one probe connected to negative wire (see pic 2). For my controller, the negative ones were ones on left side, both on top on bottom of the power button.
- keep transistor fixed, I have used hot glue
- transistors' EMITTER pin connect to GROUND of the switch. On the picture its the bottom one, I have made its long feet turn almost 90 degrees up to the button solder point.
- transistor's COLLECTOR pin connect to other side of the switch. On the picture it is the top most one.
- transistor's BASE pin (middle one) goes through 1K resistor, then to ESP32 pin (brown cable on the picture). Make sure it does not touch the other pins - insulate it after soldering!
-
Transistor after insulation of the BASE pin
Make sure that it is possible to close the case of controller. I have routed the wire to top, exiting together with three wires standard.
-
Solder wire into negative output of controller (black line). Connect it to GND of the ESP32. This is required to have serial reading working.
-
Extra: Solder into +5V red line of the controller to have ESP32 powered out of it. Make sure you add some fuse.
The main configuration file is esp32-webasto36.yaml
. Key sections include:
- Wi-Fi: Configure your Wi-Fi network.
- MQTT: Set up MQTT integration for remote monitoring.
- UART: Configure serial communication with the heater.
- GPIO: Define pins for on/off control.
The custom component (heater.h
) handles serial communication and GPIO control. Work done by timmchugh11.
It is based on the reverse-engineered protocol documented by Ray Jones.
-
Monitor heater status:
- Use the ESPHome web interface or MQTT to monitor the heater's status, temperature, fan speed, and error codes.
-
Control the heater:
- Use the web interface or MQTT commands to turn the heater on/off.
- The Smart On/Off feature automatically handles 1-second or 3-second button presses based on the heater's current state.
-
Debugging:
- Change Logger level from INFO to Debug to debug UART serial communication.
The Smart On/Off feature in the YAML configuration automatically handles the required button press duration:
- 1-second press: Turns the heater on.
- 3-second press: Turns the heater off.
This is exposed in ESPHome Web Panel and as MQTT command.
The serial communication protocol for Chinese Webasto heaters was reverse-engineered by Ray Jones. Detailed documentation can be found in his work:
- Refer to the ESPHome documentation for details on configuring ESPHome components.
This project builds on the work of:
- timmchugh11: Original ESPHome integration for Chinese diesel heaters.
- Ray Jones: Reverse engineering of the serial communication protocol. Ray Jones - Hacking the Chinese Diesel Heater Communications Protocol V9.pdf - from gitlab.com/mrjones.id.au/bluetoothheater
This project is licensed under the MIT License. See the LICENSE file for details.