All Projects
Heating / Home Assistant

ESP32-P4 Diesel Heater Controller

4.3-inch touchscreen, web interface and Home Assistant · prototype in testing
ESP32-P4ESP32-C6LVGLESP-IDFTouchscreenBlue-WireMQTTHome AssistantFlutter
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.

Safety note: This setup has been tested with my Blue-Wire heater and is not a universal control panel. A level shifter sits between the heater bus and the ESP32's 3.3 V pins; the display has its own power supply. Fixed fallback output after sensor failure is not a substitute for a monitored frost protection system. Rebuilds at your own risk. This description is a personal documentation, not a verified build guide, and the values given are experience-based estimates without any guarantee. Details under Disclaimer (German).

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

Hardware
  • 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
Software
  • ESP-IDF 5.5.5 and C
  • LVGL 9 touchscreen interface
  • Self-contained HTML/CSS/JavaScript web interface
  • Flutter companion app
Integration
  • Blue-Wire bus, UART at 25,000 baud
  • MQTT with Home Assistant discovery
  • HTTP API and WebSocket
  • Wi-Fi client and fallback hotspot

Screenshots

My photo: the real P4 control panel during warm-up, with the English interface.
Image coming soon
My photo: the real P4 control panel during warm-up, with the English interface.
Web interface during real operation: bus OK, heat exchanger at 153 °C, pump at 1.6 Hz.
Image coming soon
Web interface during real operation: bus OK, heat exchanger at 153 °C, pump at 1.6 Hz.
Starting point: the heater's original control panel with a small colour LCD and five buttons. The P4 controller replaces it.
Image coming soon
Starting point: the heater's original control panel with a small colour LCD and five buttons. The P4 controller replaces it.
Original control panel showing E-07: no reply from the heater. With the heater emulator as a test bench, this message went away.
Image coming soon
Original control panel showing E-07: no reply from the heater. With the heater emulator as a test bench, this message went away.
P4 display: German operating screen. Original LVGL interface in a PC simulation with simulated readings.
Image coming soon
P4 display: German operating screen. Original LVGL interface in a PC simulation with simulated readings.
P4 display: the same operating screen in English. PC simulation of the original interface with demo readings.
Image coming soon
P4 display: the same operating screen in English. PC simulation of the original interface with demo readings.
P4 display: scheduler with four weekly schedules. PC simulation with example switching times.
Image coming soon
P4 display: scheduler with four weekly schedules. PC simulation with example switching times.
P4 display: English settings for heater mode, room sensor and Wi-Fi. PC simulation with demo data.
Image coming soon
P4 display: English settings for heater mode, room sensor and Wi-Fi. PC simulation with demo data.
German web interface: temperature, heater readings and consumption. Demo with simulated values.
Image coming soon
German web interface: temperature, heater readings and consumption. Demo with simulated values.
Gentle control and fallback frequency after sensor failure. Original web interface with demo data.
Image coming soon
Gentle control and fallback frequency after sensor failure. Original web interface with demo data.
English web interface: tank scale and estimated consumption. All readings are simulated.
Image coming soon
English web interface: tank scale and estimated consumption. All readings are simulated.

More about this project