diff --git a/esphome/esp-bedside-panel.yaml b/esphome/esp-bedside-panel.yaml index b11298b..8d71444 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.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 # V0.1 2026-07-14 Initial ESPHome bring-up for Guition JC1060P470C_I_W_Y ESP32-P4 panel #:########################################################################################:# @@ -25,21 +26,19 @@ # - Touch I2C appears to be GPIO7 SDA / GPIO8 SCL in community examples #:########################################################################################:# # OPERATION NOTES: -# - This is still a first-stage ESPHome bring-up file. # - Flash this to the ESP32-P4 side of the board. # - This version is intended to confirm: # - ESPHome compile -# - USB flashing +# - USB/OTA flashing # - Serial logging # - WiFi connection via ESP32-C6 hosted co-processor # - Home Assistant API connection -# - OTA becomes available after first successful network connection +# - Backlight entity appears in Home Assistant +# - Display lights and shows simple test text # - This version intentionally does not yet configure: # - Ethernet -# - Display # - Touchscreen # - LVGL -# - Backlight # - Ambient light sensor # - RTC # - Camera @@ -47,7 +46,7 @@ # OFFLINE NOTES: # - This version has no local control logic yet. # - This version does not require Home Assistant to boot. -# - Serial logs are the main proof-of-life test if WiFi does not connect. +# - Display test should run locally once the device boots. # - Home Assistant API will connect only once hosted WiFi is working. #:########################################################################################:# @@ -60,12 +59,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. Initial ESPHome WiFi bring-up. (Layout V1.1)" + description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 7 inch bedside control panel. Backlight and 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.2" # Project V denotes release of yaml file, allowing checking of deployed vs latest version + project_version: "v0.3" # 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,6 +74,11 @@ 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 + # Display Settings + display_width: "1024" + display_height: "600" + display_rotation: "90" + #:########################################################################################:# # PACKAGES: # Included Common Packages @@ -108,7 +112,7 @@ packages: #### WEB PORTAL #### # NOTE: - # Leave disabled until WiFi/API are confirmed. + # Leave disabled until WiFi/API/display are confirmed. #common_webportal: !include common/webportal_common_nopass.yaml #### SNTP (Only use if you want/need accurate timeclocks) #### @@ -118,7 +122,7 @@ packages: #### DIAGNOSTICS Sensors #### # NOTE: - # Keep common diagnostic packages disabled until first WiFi/API connection works. + # Keep common diagnostic packages disabled until first display test is confirmed. #diag_basic: !include common/include_basic_diag_sensors.yaml #diag_more: !include common/include_more_diag_sensors.yaml #diag_debug: !include common/include_debug_diag_sensors.yaml @@ -225,6 +229,60 @@ time: - platform: homeassistant id: ha_time +#:########################################################################################:# +# OUTPUT: +# https://esphome.io/components/output/ledc.html +#:########################################################################################:# +output: + - platform: ledc + pin: 23 + id: backlight_output + frequency: 1220Hz + +#:########################################################################################:# +# LIGHT: +# https://esphome.io/components/light/monochromatic.html +#:########################################################################################:# +light: + - platform: monochromatic + output: backlight_output + name: "${friendly_name} Backlight" + id: display_backlight + restore_mode: ALWAYS_ON + default_transition_length: 0s + +#:########################################################################################:# +# DISPLAY: +# https://esphome.io/components/display/mipi_dsi.html +#:########################################################################################:# +display: + - platform: mipi_dsi + model: JC1060P470 + id: main_display + rotation: ${display_rotation} + dimensions: + width: ${display_width} + height: ${display_height} + update_interval: 1s + lambda: |- + it.fill(Color::BLACK); + it.printf(300, 210, id(font_large), Color::WHITE, "ESPHome OK"); + it.printf(300, 280, id(font_small), Color::WHITE, "JC1060P470C_I_W_Y"); + it.printf(300, 330, id(font_small), Color::WHITE, "WiFi + Display Test"); + +#:########################################################################################:# +# FONTS: +# https://esphome.io/components/font.html +#:########################################################################################:# +font: + - file: "gfonts://Roboto" + id: font_large + size: 48 + + - file: "gfonts://Roboto" + id: font_small + size: 28 + #:########################################################################################:# # SENSORS: # https://esphome.io/components/sensor/