ESP32-P4 Diesel Heater Controller
Description
I want to operate my diesel heater locally, from my phone and through Home Assistant. To do that, I built a custom controller around a Guition JC4880P443 with an ESP32-P4 and a 4.3-inch touchscreen. It replaces the original control panel on my heater and communicates over its three-wire Blue-Wire bus. The heater's own electronics still handle ignition, warm-up and cooldown. The display has five swipe pages for operation, schedules, settings, service and an overview. The device serves its own web interface without a cloud connection. Both interfaces switch between German and English. MQTT connects the controller to Home Assistant; HTTP and WebSocket also support the Flutter companion app. In thermostat mode, gentle control can adjust output gradually instead of immediately requesting maximum power for a small temperature difference. At the target temperature, the heater keeps running at low output. If all valid room temperature readings are lost, it uses a separately configured fixed pump frequency. Without a working sensor, it cannot regulate room temperature. Fuel consumption is estimated from the reported pump frequency and an adjustable delivery volume. The default of 22 ml per 1,000 strokes has not yet been calibrated for my pump. An HX711 tank scale also sends its weight straight to the P4 over Wi-Fi, so Home Assistant is not needed for that. Using a configured diesel density, the panel works out litres, tank level and remaining runtime at the current output. Without a scale, the fuel level can be tracked by hand. Below five percent, the P4 blocks new starts, but it does not stop a heater that is already running. Over MQTT, Home Assistant can also start and stop the heater and set the target temperature. The low-fuel lock applies there too. The P4 and the scale can be updated over Wi-Fi. Status as of 3 November 2026: I have tested bus communication, startup and heating on my real heater, now also with the current firmware. When I cut power to the P4 while heating, the heater shut down in a controlled way. Still open are repeatable cold starts, longer testing of gentle control and a run over several days. The display images marked "demo" come from a PC simulation of the original LVGL interface, along with screenshots of the web interface. The values in them are simulated, which is noted in each image. The photos from running it in the garden are real.
Features
- 4.3-inch touchscreen with five swipe pages and live operating readings
- German/English on the display and in the browser, saved as a shared setting
- Device-hosted web interface, usable on a smartphone
- Thermostat operation with gentle control or a manually selected fixed pump frequency
- Gentle control: 4 °C range, changing by at most 0.1 Hz every 10 seconds
- Low output at the target; separately adjustable fallback frequency if sensors fail
- Local SHT3x/SHT4x room sensor or an external temperature source
- Four weekly schedules and a battery-backed DS3231 clock
- Home Assistant via MQTT discovery, plus HTTP/WebSocket support for the Flutter app
- Estimated diesel consumption, tank scale directly over Wi-Fi or manual fuel tracking
- Start lock below five percent fuel, including starts from Home Assistant
- Diagnostic logs and bus captures in a ZIP download, plus firmware updates over Wi-Fi
Techstack
- Guition JC4880P443, 4.3 inches, 800 × 480 landscape
- ESP32-P4 with ESP32-C6 for Wi-Fi
- Bidirectional BSS138 level shifter on the Blue-Wire bus
- SHT3x/SHT4x for room temperature and humidity
- DS3231 clock module with backup battery
- Optional: HX711 tank scale (ESP8266) directly over Wi-Fi, also via MQTT
- ESP-IDF 5.5.5 and C
- LVGL 9 touchscreen interface
- Self-contained HTML/CSS/JavaScript web interface
- Flutter companion app
- Blue-Wire bus, UART at 25,000 baud
- MQTT with Home Assistant discovery
- HTTP API and WebSocket
- Wi-Fi client and fallback hotspot










