278 lines
10 KiB
YAML
278 lines
10 KiB
YAML
#:########################################################################################:#
|
|
# TITLE: ESP BEDSIDE PANEL
|
|
# zorruno.com layout v1.1 2026
|
|
#:########################################################################################:#
|
|
# REPO:
|
|
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml
|
|
#:########################################################################################:#
|
|
# VERSIONS:
|
|
# 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
|
|
# V0.1 2026-07-14 Initial ESPHome bring-up for Guition JC1060P470C_I_W_Y ESP32-P4 panel
|
|
#:########################################################################################:#
|
|
# HARDWARE:
|
|
# - Guition JC1060P470C_I_W_Y
|
|
# - 7 inch 1024x600 capacitive touch display
|
|
# - ESP32-P4 main processor
|
|
# - ESP32-C6 wireless co-processor
|
|
# - 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
|
|
# - 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
|
|
#:########################################################################################:#
|
|
# 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:
|
|
# - Ethernet
|
|
# - Display image generation
|
|
# - Touchscreen
|
|
# - LVGL
|
|
# - Ambient light sensor
|
|
# - RTC
|
|
# - 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.
|
|
#:########################################################################################:#
|
|
|
|
#:########################################################################################:#
|
|
# SUBSTITUTIONS:
|
|
# Specific device variable substitutions
|
|
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
|
#:########################################################################################:#
|
|
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)"
|
|
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
|
|
|
|
# Passwords & Secrets
|
|
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
|
|
ota_pass: !secret esp-ota_pass # unfortunately you can't use substitutions inside secrets names
|
|
|
|
# Device Settings
|
|
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"
|
|
backlight_frequency: "1220Hz"
|
|
|
|
#:########################################################################################:#
|
|
# PACKAGES:
|
|
# Included Common Packages
|
|
# https://esphome.io/components/packages.html
|
|
#:########################################################################################:#
|
|
packages:
|
|
#### WIFI, Network DHCP, Fallback AP, Safemode ####
|
|
# This board does not have native WiFi in the ESP32-P4 itself.
|
|
# The esp32_hosted section below exposes the ESP32-C6 co-processor as WiFi.
|
|
common_wifi: !include
|
|
file: common/network_common_dhcp.yaml
|
|
vars:
|
|
local_device_name: "${device_name}"
|
|
local_ota_pass: "${ota_pass}"
|
|
|
|
#### HOME ASSISTANT API (choose encryption or no encryption options) ####
|
|
common_api: !include
|
|
file: common/api_common.yaml
|
|
#file: common/api_common_noencryption.yaml
|
|
vars:
|
|
local_api_key: "${api_key}"
|
|
|
|
#### MQTT ####
|
|
#common_mqtt: !include
|
|
# file: common/mqtt_common.yaml
|
|
# vars:
|
|
# local_device_name: "${device_name}"
|
|
|
|
#### WEB PORTAL ####
|
|
#common_webportal: !include common/webportal_common_nopass.yaml
|
|
|
|
#### SNTP (Only use if you want/need accurate timeclocks) ####
|
|
#common_sntp: !include common/sntp_common.yaml
|
|
|
|
#### DIAGNOSTICS Sensors ####
|
|
#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
|
|
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
|
|
|
|
#:########################################################################################:#
|
|
# ESPHOME:
|
|
# https://esphome.io/components/esphome.html
|
|
#:########################################################################################:#
|
|
esphome:
|
|
name: "${device_name}"
|
|
friendly_name: "${friendly_name}"
|
|
comment: "${description_comment}" # Appears on the ESPHome page in HA
|
|
area: "${device_area}"
|
|
project:
|
|
name: "${project_name}"
|
|
version: "${project_version}"
|
|
|
|
#:########################################################################################:#
|
|
# ESP PLATFORM AND FRAMEWORK:
|
|
# https://esphome.io/components/esp32.html
|
|
#:########################################################################################:#
|
|
esp32:
|
|
variant: ESP32P4
|
|
engineering_sample: true
|
|
cpu_frequency: 360MHz
|
|
flash_size: 16MB
|
|
framework:
|
|
type: esp-idf
|
|
advanced:
|
|
enable_idf_experimental_features: true
|
|
sdkconfig_options:
|
|
CONFIG_SPIRAM_XIP_FROM_PSRAM: "y"
|
|
|
|
#:########################################################################################:#
|
|
# PSRAM:
|
|
# https://esphome.io/components/psram.html
|
|
#:########################################################################################:#
|
|
psram:
|
|
speed: 200MHz
|
|
|
|
#:########################################################################################:#
|
|
# ESP32 HOSTED WIFI COPROCESSOR:
|
|
# https://esphome.io/components/esp32_hosted.html
|
|
#:########################################################################################:#
|
|
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
|
|
active_high: true
|
|
|
|
#:########################################################################################:#
|
|
# ESP LDO:
|
|
# Required by known ESP32-P4 display examples for this board family
|
|
#:########################################################################################:#
|
|
esp_ldo:
|
|
- channel: 3
|
|
voltage: 2.5V
|
|
|
|
#:########################################################################################:#
|
|
# LOGGER:
|
|
# https://esphome.io/components/logger.html
|
|
#:########################################################################################:#
|
|
logger:
|
|
level: "${log_level}" # INFO Level suggested, or DEBUG for testing
|
|
baud_rate: 115200
|
|
hardware_uart: USB_SERIAL_JTAG
|
|
#tx_buffer_size: 64
|
|
|
|
#:########################################################################################:#
|
|
# HOME ASSISTANT API:
|
|
#:########################################################################################:#
|
|
api:
|
|
on_client_connected:
|
|
then:
|
|
- logger.log:
|
|
level: INFO
|
|
format: "API connected: ESP Bedside Panel is online"
|
|
|
|
on_client_disconnected:
|
|
then:
|
|
- logger.log:
|
|
level: WARN
|
|
format: "API disconnected: ESP Bedside Panel is offline from Home Assistant"
|
|
|
|
#:########################################################################################:#
|
|
# OTA:
|
|
# https://esphome.io/components/ota/esphome.html
|
|
#:########################################################################################:#
|
|
ota:
|
|
- platform: esphome
|
|
password: "${ota_pass}"
|
|
|
|
#:########################################################################################:#
|
|
# TIME:
|
|
# https://esphome.io/components/time/homeassistant.html
|
|
#:########################################################################################:#
|
|
time:
|
|
- platform: homeassistant
|
|
id: ha_time
|
|
|
|
#:########################################################################################:#
|
|
# OUTPUT:
|
|
# https://esphome.io/components/output/ledc.html
|
|
#:########################################################################################:#
|
|
output:
|
|
- platform: ledc
|
|
pin: ${backlight_pin}
|
|
id: backlight_output
|
|
frequency: "${backlight_frequency}"
|
|
|
|
#:########################################################################################:#
|
|
# LIGHT:
|
|
# https://esphome.io/components/light/monochromatic.html
|
|
#:########################################################################################:#
|
|
light:
|
|
- platform: monochromatic
|
|
output: backlight_output
|
|
name: "Backlight"
|
|
id: display_backlight
|
|
icon: "mdi:brightness-6"
|
|
restore_mode: RESTORE_DEFAULT_ON
|
|
default_transition_length: 0s
|
|
|
|
#:########################################################################################:#
|
|
# SENSORS:
|
|
# https://esphome.io/components/sensor/
|
|
#:########################################################################################:#
|
|
sensor:
|
|
- platform: uptime
|
|
name: "${friendly_name} Uptime"
|
|
id: uptime_sensor
|
|
update_interval: "${update_interval}"
|
|
|
|
- platform: wifi_signal
|
|
name: "${friendly_name} WiFi Signal"
|
|
id: wifi_signal_sensor
|
|
update_interval: "${update_interval}"
|
|
|
|
#:########################################################################################:#
|
|
# TEXT SENSOR COMPONENT:
|
|
# https://esphome.io/components/text_sensor/
|
|
#:########################################################################################:#
|
|
text_sensor:
|
|
- platform: version
|
|
name: "${friendly_name} ESPHome Version"
|
|
hide_timestamp: true
|
|
|
|
- platform: wifi_info
|
|
ip_address:
|
|
name: "${friendly_name} IP Address"
|
|
ssid:
|
|
name: "${friendly_name} Connected SSID"
|
|
bssid:
|
|
name: "${friendly_name} Connected BSSID"
|
|
mac_address:
|
|
name: "${friendly_name} MAC Address" |