From 769cb34eb66aa166e7cda6d03d5287be992584dc Mon Sep 17 00:00:00 2001 From: ESPHome Device Builder Date: Tue, 14 Jul 2026 21:51:48 +1200 Subject: [PATCH] Edit esp-bedside-panel.yaml --- esphome/esp-bedside-panel.yaml | 136 +++++++++++++++++++++++++-------- 1 file changed, 106 insertions(+), 30 deletions(-) diff --git a/esphome/esp-bedside-panel.yaml b/esphome/esp-bedside-panel.yaml index e353bd1..75d1745 100644 --- a/esphome/esp-bedside-panel.yaml +++ b/esphome/esp-bedside-panel.yaml @@ -6,6 +6,7 @@ # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml #:########################################################################################:# # VERSIONS: +# V0.5 2026-07-14 Added corrected JC1060P470 MIPI display configuration and text test # V0.4 2026-07-14 Removed MIPI display test after setup watchdog boot loop; retained backlight-only test # V0.3 2026-07-14 Added backlight control and first MIPI display text test # V0.2 2026-07-14 Added ESP32 hosted WiFi via ESP32-C6 co-processor @@ -16,29 +17,34 @@ # - 7 inch 1024x600 capacitive touch display # - ESP32-P4 main processor # - ESP32-C6 wireless co-processor +# - 16MB flash +# - 32MB PSRAM # - 100 Mbps Ethernet # - Dual USB-C ports # - Camera, speaker connector, microSD and RTC features present on board # -# Known / likely hardware details: -# - Display driver: JD9165 / JC1060P470 MIPI-DSI model +# Confirmed / referenced hardware details: +# - Display model: JC1060P470 +# - Display interface: MIPI-DSI +# - Display reset: GPIO5 +# - Display backlight PWM: GPIO23 # - Touch controller: GT911 -# - Backlight PWM pin appears to be GPIO23 in community examples -# - Touch I2C appears to be GPIO7 SDA / GPIO8 SCL in community examples +# - Touch I2C SDA: GPIO7 +# - Touch I2C SCL: GPIO8 +# - Touch interrupt: GPIO21 +# - Touch reset: GPIO22 #:########################################################################################:# # OPERATION NOTES: # - Flash this to the ESP32-P4 side of the board. -# - This version tests only: -# - ESPHome boot -# - Hosted WiFi through the ESP32-C6 -# - Home Assistant API -# - GPIO23 backlight PWM -# - Backlight light entity in Home Assistant -# - The MIPI display component has been temporarily removed because V0.3 -# triggered a watchdog reset during setup. -# - This version intentionally does not configure: +# - This version is intended to confirm: +# - ESPHome remains stable during display initialisation +# - MIPI-DSI display initialises correctly +# - Backlight control remains available in Home Assistant +# - Basic text is rendered on the screen +# - Display is left in its native landscape orientation for the first test. +# - Portrait rotation will be configured after the display and touch are proven stable. +# - This version intentionally does not yet configure: # - Ethernet -# - Display image generation # - Touchscreen # - LVGL # - Ambient light sensor @@ -46,9 +52,9 @@ # - Camera #:########################################################################################:# # OFFLINE NOTES: -# - Backlight control is exposed locally by ESPHome and through Home Assistant. -# - The panel should remain connected even though no image is drawn. -# - The physical panel may remain blank while the backlight is tested. +# - The display test is generated locally and does not require Home Assistant. +# - Backlight control remains locally hosted by ESPHome. +# - WiFi and Home Assistant are not required for the test text to remain visible. #:########################################################################################:# #:########################################################################################:# @@ -60,12 +66,12 @@ substitutions: # Device Naming device_name: "esp-bedside-panel" friendly_name: "ESP Bedside Panel" - description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 7 inch bedside control panel. Backlight-only test following MIPI setup watchdog. (Layout V1.1)" + description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 7 inch bedside control panel. Corrected MIPI display test. (Layout V1.1)" device_area: "Bedroom" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant. # Project Naming project_name: "Guition.JC1060P470C_I_W_Y" # Project Details - project_version: "v0.4" # Project V denotes release of yaml file, allowing checking of deployed vs latest version + project_version: "v0.5" # Project V denotes release of yaml file, allowing checking of deployed vs latest version # Passwords & Secrets api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names @@ -75,8 +81,8 @@ substitutions: log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE update_interval: "60s" # update time for general sensors etc - # Backlight Settings - backlight_pin: "23" + # Display Settings + backlight_pin: "GPIO23" backlight_frequency: "1220Hz" #:########################################################################################:# @@ -145,14 +151,19 @@ esp32: type: esp-idf advanced: enable_idf_experimental_features: true + disable_vfs_support_termios: false + disable_vfs_support_select: false + disable_vfs_support_dir: false sdkconfig_options: CONFIG_SPIRAM_XIP_FROM_PSRAM: "y" + CONFIG_SDMMC_HOST_DEFAULT: "y" #:########################################################################################:# # PSRAM: # https://esphome.io/components/psram.html #:########################################################################################:# psram: + mode: hex speed: 200MHz #:########################################################################################:# @@ -161,22 +172,24 @@ psram: #:########################################################################################:# esp32_hosted: variant: ESP32C6 - reset_pin: 54 - cmd_pin: 19 - clk_pin: 18 - d0_pin: 14 - d1_pin: 15 - d2_pin: 16 - d3_pin: 17 + reset_pin: GPIO54 + cmd_pin: GPIO19 + clk_pin: GPIO18 + d0_pin: GPIO14 + d1_pin: GPIO15 + d2_pin: GPIO16 + d3_pin: GPIO17 active_high: true #:########################################################################################:# # ESP LDO: -# Required by known ESP32-P4 display examples for this board family +# Supplies the ESP32-P4 MIPI-DSI PHY #:########################################################################################:# esp_ldo: - channel: 3 + id: dsi_phy_enable voltage: 2.5V + adjustable: true #:########################################################################################:# # LOGGER: @@ -226,7 +239,7 @@ time: #:########################################################################################:# output: - platform: ledc - pin: ${backlight_pin} + pin: "${backlight_pin}" id: backlight_output frequency: "${backlight_frequency}" @@ -242,6 +255,69 @@ light: icon: "mdi:brightness-6" restore_mode: RESTORE_DEFAULT_ON default_transition_length: 0s + gamma_correct: 1.0 + +#:########################################################################################:# +# DISPLAY: +# https://esphome.io/components/display/mipi_dsi.html +#:########################################################################################:# +display: + - platform: mipi_dsi + model: JC1060P470 + id: main_display + color_order: RGB + reset_pin: + number: GPIO5 + rotation: 0 + hsync_pulse_width: 20 + update_interval: never + auto_clear_enabled: false + lambda: |- + it.fill(Color(8, 12, 18)); + + it.printf( + 512, + 225, + id(font_heading), + Color::WHITE, + TextAlign::CENTER, + "ESPHome Display OK" + ); + + it.printf( + 512, + 305, + id(font_normal), + Color(0, 190, 255), + TextAlign::CENTER, + "Guition JC1060P470C_I_W_Y" + ); + + it.printf( + 512, + 365, + id(font_small), + Color(180, 180, 180), + TextAlign::CENTER, + "1024 x 600 MIPI-DSI Test" + ); + +#:########################################################################################:# +# FONTS: +# https://esphome.io/components/font.html +#:########################################################################################:# +font: + - file: "gfonts://Roboto" + id: font_heading + size: 64 + + - file: "gfonts://Roboto" + id: font_normal + size: 34 + + - file: "gfonts://Roboto" + id: font_small + size: 24 #:########################################################################################:# # SENSORS: