Add CrowPanel Advanced (ESP32-P4) board and Blue Navy 1024x600 HA display (#322)
* add crowpanel board * add blue navy layout 1024x600
This commit is contained in:
1 parent
14dd332412
commit
35e839f1fd
9 files changed
+2305
-16
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# Updated : 2026.08.11
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.8.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
@@ -82,6 +82,7 @@ packages:
|
||||
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml' # 800x480
|
||||
- path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml' # 800x480
|
||||
# - path: 'packages/board/board_ESP32-P4_M5Stack-Tab5.yaml' # 1280x720
|
||||
# - path: 'packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml' # 1024x600
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> Board Display
|
||||
@@ -89,7 +90,9 @@ packages:
|
||||
# +------------------------------------------------------------------------------+
|
||||
|
||||
- path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml' # 800x480 Blue Navy display - YamBMS pages
|
||||
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml' # 800x480 Blue Navy display - Overview + YamBMS pages
|
||||
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml' # 800x480 Blue Navy display - Overview + YamBMS pages
|
||||
# - path: 'packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml' # 1024x600 Blue Navy display - YamBMS pages
|
||||
# - path: 'packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml' # 1024x600 Blue Navy display - Overview + YamBMS pages
|
||||
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_ha.yaml' # 1280x720 Tab5 display
|
||||
|
||||
vars:
|
||||
@@ -100,6 +103,7 @@ packages:
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> Uncomment the variables below to use the following YAMLs :
|
||||
# | >>> board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml
|
||||
# | >>> board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml
|
||||
# +------------------------------------------------------------------------------+
|
||||
|
||||
# Overview page inputs
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.1.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
# Elecrow CrowPanel Advanced (ESP32-P4 + ESP32-C6)
|
||||
# 7" / 9" / 10.1" share the same 1024x600 MIPI DSI pinout.
|
||||
# 5" is RGB 800x480 with different GPIOs - do not use this board file.
|
||||
# https://www.elecrow.com/display/esp-hmi-display/esp32-p4-hmi-display.html
|
||||
# https://www.elecrow.com/wiki/CrowPanel_Advanced_9inch_ESP32-P4_HMI_AI_Display_1024x600_IPS.html
|
||||
|
||||
# NOTE: WiFi uses the ESP32-C6 co-processor via esp32_hosted (SDIO).
|
||||
# Factory C6 firmware is unreliable — update it after the first flash
|
||||
# (ESPHome update entity / esphome.github.io/esp-hosted-firmware).
|
||||
# Display: mipi_dsi Waveshare 7B preset (EK79007), 1024x600 landscape.
|
||||
|
||||
# +--------------------------------------------------------------------------------------------+
|
||||
# | Crowtail UART
|
||||
# +--------------------------------------------------------------------------------------------+
|
||||
# | UART1 (PH2.0-4P): TX=GPIO47, RX=GPIO48 - include board_options_itf_uart_esp_1.yaml
|
||||
# | UART3-IN (XH2.54-4P): TX=GPIO34, RX=GPIO33 - include board_options_itf_uart_esp_2.yaml
|
||||
# | I2C Crowtail shares GPIO45/46 with the GT911 touch controller.
|
||||
# | No onboard CAN transceiver.
|
||||
# +--------------------------------------------------------------------------------------------+
|
||||
|
||||
substitutions:
|
||||
board_chip: "ESP32-P4"
|
||||
board_name: "CrowPanel Advanced"
|
||||
# I²C bus (GT911 touch and Crowtail I2C)
|
||||
i2c_sda: "45"
|
||||
i2c_scl: "46"
|
||||
# uart_esp_1 (UART1 Crowtail)
|
||||
tx_pin_1: "47"
|
||||
rx_pin_1: "48"
|
||||
# uart_esp_2 (UART3-IN)
|
||||
tx_pin_2: "34"
|
||||
rx_pin_2: "33"
|
||||
# LOOP_TASK_STACK
|
||||
loop_task_stack_size: "8192" # see LOOP_TASK_STACK.md before changing
|
||||
|
||||
packages:
|
||||
device_base: !include ../base/device_base.yaml
|
||||
device_base_wifi: !include ../base/device_base_wifi.yaml
|
||||
no_led_control: !include board_options_no_led_control.yaml
|
||||
|
||||
preferences:
|
||||
flash_write_interval: never
|
||||
|
||||
esp32:
|
||||
variant: esp32p4
|
||||
engineering_sample: true
|
||||
cpu_frequency: 360MHz
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
loop_task_stack_size: ${loop_task_stack_size}
|
||||
execute_from_psram: true
|
||||
enable_idf_experimental_features: true
|
||||
sdkconfig_options:
|
||||
CONFIG_IDF_EXPERIMENTAL_FEATURES: "y"
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO: "y"
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M: "y"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB: "y"
|
||||
|
||||
# WiFi via ESP32-C6 co-processor (PCB V1.0, 1-bit SDIO)
|
||||
esp32_hosted:
|
||||
variant: esp32c6
|
||||
active_high: true
|
||||
bus_width: 1
|
||||
reset_pin: GPIO32
|
||||
cmd_pin: GPIO19
|
||||
clk_pin: GPIO18
|
||||
d0_pin: GPIO14
|
||||
|
||||
psram:
|
||||
speed: 200MHz
|
||||
|
||||
wifi:
|
||||
id: my_network
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
domain: !secret domain
|
||||
reboot_timeout: 0s
|
||||
power_save_mode: none
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
|
||||
# +--------------------------------------+
|
||||
# | I²C Bus |
|
||||
# +--------------------------------------+
|
||||
|
||||
i2c:
|
||||
- id: bus_a
|
||||
sda: ${i2c_sda}
|
||||
scl: ${i2c_scl}
|
||||
frequency: 400kHz
|
||||
|
||||
# +--------------------------------------+
|
||||
# | ESP LDO for display |
|
||||
# +--------------------------------------+
|
||||
|
||||
esp_ldo:
|
||||
- channel: 3
|
||||
voltage: 2.5V
|
||||
- channel: 4
|
||||
voltage: 2.5V
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Backlight |
|
||||
# +--------------------------------------+
|
||||
# | LCD_BK_EN (PWM) = GPIO31
|
||||
# | LCD_BK_POWER (MOSFET, inverted) = GPIO29
|
||||
# +--------------------------------------+
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO31
|
||||
id: backlight_pwm
|
||||
frequency: 100Hz
|
||||
min_power: 0.03
|
||||
zero_means_zero: true
|
||||
- platform: gpio
|
||||
id: power_light
|
||||
pin: GPIO29
|
||||
inverted: true
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
output: backlight_pwm
|
||||
name: Display Backlight
|
||||
id: backlight
|
||||
restore_mode: ALWAYS_ON
|
||||
default_transition_length: 250ms
|
||||
|
||||
esphome:
|
||||
on_boot:
|
||||
- priority: 800
|
||||
then:
|
||||
- output.turn_on: backlight_pwm
|
||||
- delay: 200ms
|
||||
- output.turn_off: power_light
|
||||
- delay: 300ms
|
||||
- light.turn_on: backlight
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Touch Screen (GT911) |
|
||||
# +--------------------------------------+
|
||||
|
||||
touchscreen:
|
||||
- platform: gt911
|
||||
id: my_touchscreen
|
||||
i2c_id: bus_a
|
||||
reset_pin: GPIO40
|
||||
interrupt_pin: GPIO42
|
||||
update_interval: 50ms
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Display (MIPI DSI 1024x600) |
|
||||
# +--------------------------------------+
|
||||
|
||||
display:
|
||||
- platform: mipi_dsi
|
||||
id: my_display
|
||||
model: WAVESHARE-ESP32-P4-WIFI6-TOUCH-LCD-7B
|
||||
reset_pin:
|
||||
number: GPIO41
|
||||
update_interval: never
|
||||
auto_clear_enabled: false
|
||||
dimensions:
|
||||
width: 1024
|
||||
height: 600
|
||||
color_order: RGB
|
||||
color_depth: 16
|
||||
@@ -0,0 +1,168 @@
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.1.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
# Scaled from board_options_display_lvgl_design_800x480_blue_navy_base.yaml
|
||||
# for 1024x600 Blue Navy. Same colors, font IDs, footer and pages.
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | Color definitions (LVGL hex) |
|
||||
# +---------------------------------------------------------+
|
||||
substitutions:
|
||||
color_bg: '0x1a1a2e' # dark navy
|
||||
color_panel: '0x16213e' # slightly lighter navy
|
||||
color_1: '0xffffff' # white
|
||||
color_2: '0xb2bec3' # grey
|
||||
color_3: '0x0f3460' # blue
|
||||
color_4: '0x74b9ff' # light_blue
|
||||
color_5: '0x00b894' # green
|
||||
color_6: '0xfdcb6e' # yellow
|
||||
color_7: '0xe17055' # red
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | Fonts (same IDs as 800x480, sizes ×1.25) |
|
||||
# +---------------------------------------------------------+
|
||||
font:
|
||||
- file: "gfonts://Montserrat"
|
||||
id: font_14
|
||||
size: 18
|
||||
bpp: 4
|
||||
- file: "gfonts://Montserrat"
|
||||
id: font_18
|
||||
size: 22
|
||||
bpp: 4
|
||||
glyphs: "!\"%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ °↑↓"
|
||||
- file: "gfonts://Montserrat"
|
||||
id: font_22
|
||||
size: 28
|
||||
bpp: 4
|
||||
- file: "gfonts://Montserrat"
|
||||
id: font_28
|
||||
size: 35
|
||||
bpp: 4
|
||||
- file: "gfonts://Montserrat"
|
||||
id: font_40
|
||||
size: 50
|
||||
bpp: 4
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | Display Timeout |
|
||||
# +---------------------------------------------------------+
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
id: display_timeout
|
||||
device_id: ${board_id}
|
||||
name: "Display timeout"
|
||||
optimistic: true
|
||||
unit_of_measurement: "s"
|
||||
initial_value: 300
|
||||
restore_value: true
|
||||
min_value: 5
|
||||
max_value: 300
|
||||
step: 5
|
||||
mode: box
|
||||
entity_category: config
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | Touch Screen actions |
|
||||
# +---------------------------------------------------------+
|
||||
|
||||
touchscreen:
|
||||
- platform: gt911
|
||||
id: !extend my_touchscreen
|
||||
on_release: # when the finger leaves the screen surface
|
||||
- if:
|
||||
condition: lvgl.is_paused
|
||||
then:
|
||||
- lvgl.resume:
|
||||
- lvgl.widget.redraw:
|
||||
- light.turn_on: backlight
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | LVGL Configuration |
|
||||
# +---------------------------------------------------------+
|
||||
lvgl:
|
||||
byte_order: little_endian
|
||||
color_depth: 16
|
||||
buffer_size: 50%
|
||||
displays:
|
||||
- my_display
|
||||
touchscreens:
|
||||
- my_touchscreen
|
||||
|
||||
on_idle:
|
||||
timeout: !lambda "return (id(display_timeout).state * 1000);"
|
||||
then:
|
||||
- light.turn_off: backlight
|
||||
- lvgl.pause:
|
||||
|
||||
style_definitions:
|
||||
- id: footer
|
||||
bg_color: ${color_panel}
|
||||
bg_opa: COVER
|
||||
border_opa: TRANSP
|
||||
radius: 19
|
||||
opa: 80%
|
||||
pad_all: 0
|
||||
pad_row: 0
|
||||
pad_column: 0
|
||||
text_color: ${color_2}
|
||||
text_font: montserrat_30
|
||||
width: 60%
|
||||
height: 40
|
||||
|
||||
# Global style defaults
|
||||
theme:
|
||||
label:
|
||||
text_color: ${color_1}
|
||||
obj:
|
||||
pad_all: 0
|
||||
scrollbar_mode: "off"
|
||||
|
||||
top_layer:
|
||||
widgets:
|
||||
- buttonmatrix:
|
||||
id: top_layer
|
||||
align: bottom_mid
|
||||
y: -12
|
||||
pad_all: 0
|
||||
bg_opa: TRANSP
|
||||
border_opa: TRANSP
|
||||
outline_width: 0
|
||||
width: 60%
|
||||
height: 40
|
||||
items:
|
||||
styles: footer
|
||||
rows:
|
||||
- buttons:
|
||||
- id: page_prev
|
||||
text: "\uF053"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.previous:
|
||||
- id: page_home
|
||||
text: "\uF015"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.show: ${home_page}
|
||||
- id: page_next
|
||||
text: "\uF054"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.next:
|
||||
@@ -0,0 +1,558 @@
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.1.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
# Scaled from board_options_display_lvgl_design_800x480_blue_navy_overview.yaml
|
||||
# for 1024x600 Blue Navy (x*1.28, y*1.25). Same widgets and IDs.
|
||||
|
||||
lvgl:
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# │ PAGE — OVERVIEW │
|
||||
# └──────────────────────────────────────────────────────
|
||||
|
||||
pages:
|
||||
- id: page_overview
|
||||
bg_color: ${color_bg}
|
||||
widgets:
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | DATE AND HOUR
|
||||
# └──────────────────────────────────────────────────────
|
||||
|
||||
# ── Date
|
||||
- label:
|
||||
id: lbl_date
|
||||
x: 38
|
||||
y: 10
|
||||
width: 474
|
||||
text: "Wednesday 17"
|
||||
text_font: font_28
|
||||
text_color: ${color_2}
|
||||
text_align: LEFT
|
||||
# ── Clock
|
||||
- label:
|
||||
id: lbl_clock
|
||||
x: 512
|
||||
y: 10
|
||||
width: 474
|
||||
text: "06:00"
|
||||
text_font: font_28
|
||||
text_color: ${color_2}
|
||||
text_align: RIGHT
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | SOLAR
|
||||
# └──────────────────────────────────────────────────────
|
||||
- obj:
|
||||
x: 371
|
||||
y: 12
|
||||
width: 282
|
||||
height: 118
|
||||
bg_color: ${color_panel}
|
||||
border_width: 2
|
||||
border_color: ${color_6}
|
||||
radius: 15
|
||||
pad_all: 0
|
||||
scrollbar_mode: "off"
|
||||
widgets:
|
||||
- label:
|
||||
x: 13
|
||||
y: 8
|
||||
width: 256
|
||||
text: "SOLAR"
|
||||
text_font: font_14
|
||||
text_color: ${color_6}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_pv_now
|
||||
x: 13
|
||||
y: 28
|
||||
width: 256
|
||||
text: "--- W"
|
||||
text_font: font_22
|
||||
text_color: ${color_1}
|
||||
text_align: CENTER
|
||||
- obj:
|
||||
x: 13
|
||||
y: 68
|
||||
width: 256
|
||||
height: 1
|
||||
bg_color: ${color_3}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
- label:
|
||||
id: lbl_pv_today
|
||||
x: 13
|
||||
y: 78
|
||||
width: 256
|
||||
text: "Today: --- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_6}
|
||||
text_align: CENTER
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | GRID
|
||||
# └──────────────────────────────────────────────────────
|
||||
- obj:
|
||||
x: 38
|
||||
y: 148
|
||||
width: 256
|
||||
height: 182
|
||||
bg_color: ${color_panel}
|
||||
border_width: 2
|
||||
border_color: ${color_2}
|
||||
radius: 15
|
||||
pad_all: 0
|
||||
scrollbar_mode: "off"
|
||||
widgets:
|
||||
- label:
|
||||
x: 13
|
||||
y: 8
|
||||
width: 230
|
||||
text: "GRID"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_grid_net_now
|
||||
x: 13
|
||||
y: 28
|
||||
width: 230
|
||||
text: "--- W"
|
||||
text_font: font_22
|
||||
text_color: ${color_1}
|
||||
text_align: CENTER
|
||||
|
||||
- label:
|
||||
id: lbl_grid_voltage
|
||||
x: 13
|
||||
y: 62
|
||||
width: 115
|
||||
text: "--- V"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
# - label:
|
||||
# id: lbl_grid_free_1
|
||||
# x: 10
|
||||
# y: 70
|
||||
# width: 90
|
||||
# text: "---"
|
||||
# text_font: font_14
|
||||
# text_color: ${color_2}
|
||||
# text_align: CENTER
|
||||
- label:
|
||||
id: lbl_grid_frequency
|
||||
x: 128
|
||||
y: 62
|
||||
width: 115
|
||||
text: "--.- Hz"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
# - label:
|
||||
# id: lbl_grid_free_2
|
||||
# x: 100
|
||||
# y: 70
|
||||
# width: 90
|
||||
# text: "---"
|
||||
# text_font: font_14
|
||||
# text_color: ${color_2}
|
||||
# text_align: CENTER
|
||||
|
||||
- obj:
|
||||
x: 13
|
||||
y: 119
|
||||
width: 230
|
||||
height: 1
|
||||
bg_color: ${color_3}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
- label:
|
||||
x: 13
|
||||
y: 125
|
||||
text: "Daily import:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_grid_import_today
|
||||
x: 109
|
||||
y: 125
|
||||
width: 134
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_7}
|
||||
text_align: RIGHT
|
||||
- label:
|
||||
x: 13
|
||||
y: 150
|
||||
text: "Daily export:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_grid_export_today
|
||||
x: 109
|
||||
y: 150
|
||||
width: 134
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_5}
|
||||
text_align: RIGHT
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | BATTERY
|
||||
# └──────────────────────────────────────────────────────
|
||||
- obj:
|
||||
x: 730
|
||||
y: 148
|
||||
width: 256
|
||||
height: 182
|
||||
bg_color: ${color_panel}
|
||||
border_width: 2
|
||||
border_color: ${color_5}
|
||||
radius: 15
|
||||
pad_all: 0
|
||||
scrollbar_mode: "off"
|
||||
widgets:
|
||||
- label:
|
||||
x: 13
|
||||
y: 8
|
||||
width: 230
|
||||
text: "BATTERY"
|
||||
text_font: font_14
|
||||
text_color: ${color_5}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_bat_power
|
||||
x: 13
|
||||
y: 28
|
||||
width: 230
|
||||
text: "--- W"
|
||||
text_font: font_22
|
||||
text_color: ${color_1}
|
||||
text_align: CENTER
|
||||
|
||||
|
||||
- label:
|
||||
id: lbl_bat_soc
|
||||
x: 13
|
||||
y: 62
|
||||
width: 115
|
||||
text: "--- %"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_bat_charging_phase
|
||||
x: 13
|
||||
y: 88
|
||||
width: 115
|
||||
text: "Float"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_bat_voltage
|
||||
x: 128
|
||||
y: 62
|
||||
width: 115
|
||||
text: "--.- V"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_cell_voltage
|
||||
x: 128
|
||||
y: 88
|
||||
width: 115
|
||||
text: "-.-- Vpc"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
text_align: CENTER
|
||||
|
||||
- obj:
|
||||
x: 13
|
||||
y: 119
|
||||
width: 230
|
||||
height: 1
|
||||
bg_color: ${color_3}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
- label:
|
||||
x: 13
|
||||
y: 125
|
||||
text: "Daily charge:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_bat_charge_today
|
||||
x: 115
|
||||
y: 125
|
||||
width: 128
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_4}
|
||||
text_align: RIGHT
|
||||
- label:
|
||||
x: 13
|
||||
y: 150
|
||||
text: "Daily discharge:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_bat_discharge_today
|
||||
x: 115
|
||||
y: 150
|
||||
width: 128
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_5}
|
||||
text_align: RIGHT
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | HOME
|
||||
# └──────────────────────────────────────────────────────
|
||||
- obj:
|
||||
x: 371
|
||||
y: 348
|
||||
width: 282
|
||||
height: 190
|
||||
bg_color: ${color_panel}
|
||||
border_width: 2
|
||||
border_color: ${color_4}
|
||||
radius: 15
|
||||
pad_all: 0
|
||||
scrollbar_mode: "off"
|
||||
widgets:
|
||||
- label:
|
||||
x: 13
|
||||
y: 8
|
||||
width: 256
|
||||
text: "HOME"
|
||||
text_font: font_14
|
||||
text_color: ${color_4}
|
||||
text_align: CENTER
|
||||
- label:
|
||||
id: lbl_home_now
|
||||
x: 13
|
||||
y: 28
|
||||
width: 256
|
||||
text: "--- W"
|
||||
text_font: font_22
|
||||
text_color: ${color_1}
|
||||
text_align: CENTER
|
||||
- obj:
|
||||
x: 13
|
||||
y: 68
|
||||
width: 256
|
||||
height: 1
|
||||
bg_color: ${color_3}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
- label:
|
||||
x: 13
|
||||
y: 78
|
||||
text: "Today:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_home_daily_energy_total
|
||||
x: 122
|
||||
y: 78
|
||||
width: 147
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_4}
|
||||
text_align: RIGHT
|
||||
- label:
|
||||
x: 13
|
||||
y: 102
|
||||
text: "Solar:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_home_daily_energy_solar
|
||||
x: 122
|
||||
y: 102
|
||||
width: 147
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_6}
|
||||
text_align: RIGHT
|
||||
- label:
|
||||
x: 13
|
||||
y: 128
|
||||
text: "Grid:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_home_daily_energy_grid
|
||||
x: 122
|
||||
y: 128
|
||||
width: 147
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_7}
|
||||
text_align: RIGHT
|
||||
- label:
|
||||
x: 13
|
||||
y: 152
|
||||
text: "Battery:"
|
||||
text_font: font_14
|
||||
text_color: ${color_2}
|
||||
- label:
|
||||
id: lbl_home_daily_energy_bat
|
||||
x: 122
|
||||
y: 152
|
||||
width: 147
|
||||
text: "--- kWh"
|
||||
text_font: font_14
|
||||
text_color: ${color_5}
|
||||
text_align: RIGHT
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | CONNECTION LINES — Junction
|
||||
# └──────────────────────────────────────────────────────
|
||||
|
||||
# Line Solar (vertical, yellow)
|
||||
- obj:
|
||||
id: line_solar
|
||||
x: 511
|
||||
y: 130
|
||||
width: 3
|
||||
height: 106
|
||||
bg_color: ${color_6}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Line Grid (horizontal, grey)
|
||||
- obj:
|
||||
id: line_grid
|
||||
x: 294
|
||||
y: 238
|
||||
width: 215
|
||||
height: 2
|
||||
bg_color: ${color_2}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Line Battery (horizontal, green)
|
||||
- obj:
|
||||
id: line_battery
|
||||
x: 515
|
||||
y: 238
|
||||
width: 215
|
||||
height: 2
|
||||
bg_color: ${color_5}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Line Home (vertical, light blue)
|
||||
- obj:
|
||||
id: line_home
|
||||
x: 511
|
||||
y: 240
|
||||
width: 3
|
||||
height: 108
|
||||
bg_color: ${color_4}
|
||||
border_width: 0
|
||||
radius: 0
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Junction circle
|
||||
# Outer ring
|
||||
- obj:
|
||||
x: 481
|
||||
y: 209
|
||||
width: 61
|
||||
height: 60
|
||||
bg_color: ${color_panel}
|
||||
border_width: 2
|
||||
border_color: ${color_1}
|
||||
radius: 30
|
||||
scrollbar_mode: "off"
|
||||
# Inner dot
|
||||
# - obj:
|
||||
# x: 394
|
||||
# y: 185
|
||||
# width: 12
|
||||
# height: 12
|
||||
# bg_color: ${color_1}
|
||||
# border_width: 0
|
||||
# radius: 6
|
||||
# scrollbar_mode: "off"
|
||||
|
||||
# ┌──────────────────────────────────────────────────────
|
||||
# | ANIMATED DOTS — 1 per line, color = block border color
|
||||
# └──────────────────────────────────────────────────────
|
||||
|
||||
# Solar dot (yellow)
|
||||
- obj:
|
||||
id: dot_solar
|
||||
x: 506
|
||||
y: 156
|
||||
width: 13
|
||||
height: 12
|
||||
bg_color: ${color_6}
|
||||
border_width: 0
|
||||
radius: 6
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Grid dot (grey, hidden by default)
|
||||
- obj:
|
||||
id: dot_grid
|
||||
x: 384
|
||||
y: 232
|
||||
width: 13
|
||||
height: 12
|
||||
bg_color: ${color_2}
|
||||
border_width: 0
|
||||
radius: 6
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Battery dot (green, hidden by default)
|
||||
- obj:
|
||||
id: dot_bat
|
||||
x: 640
|
||||
y: 232
|
||||
width: 13
|
||||
height: 12
|
||||
bg_color: ${color_5}
|
||||
border_width: 0
|
||||
radius: 6
|
||||
scrollbar_mode: "off"
|
||||
|
||||
# Home dot (light blue)
|
||||
- obj:
|
||||
id: dot_home
|
||||
x: 506
|
||||
y: 312
|
||||
width: 13
|
||||
height: 12
|
||||
bg_color: ${color_4}
|
||||
border_width: 0
|
||||
radius: 6
|
||||
scrollbar_mode: "off"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,5 @@
|
||||
# Updated : 2026.06.29
|
||||
# Version : 1.1.5
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.2.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
@@ -17,6 +17,22 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
substitutions:
|
||||
anim_pv_power_max: '8000'
|
||||
anim_grid_power_max: '6000'
|
||||
anim_battery_power_max: '6000'
|
||||
anim_home_power_max: '6000'
|
||||
anim_duration_min: '800'
|
||||
anim_duration_max: '4000'
|
||||
anim_pv_y_from: '106'
|
||||
anim_pv_y_to: '186'
|
||||
anim_grid_x_import_from: '232'
|
||||
anim_grid_x_import_to: '395'
|
||||
anim_bat_x_charge_from: '395'
|
||||
anim_bat_x_charge_to: '562'
|
||||
anim_home_y_from: '186'
|
||||
anim_home_y_to: '272'
|
||||
|
||||
# +---------------------------------------------------------+
|
||||
# | Boot: initialize Solar and Home dots |
|
||||
# +---------------------------------------------------------+
|
||||
@@ -84,7 +100,7 @@ sensor:
|
||||
lv_anim_t a; lv_anim_init(&a);
|
||||
lv_anim_set_var(&a, id(dot_solar));
|
||||
lv_anim_set_exec_cb(&a, cb);
|
||||
lv_anim_set_values(&a, 106, 186);
|
||||
lv_anim_set_values(&a, ${anim_pv_y_from}, ${anim_pv_y_to});
|
||||
lv_anim_set_time(&a, dur);
|
||||
lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&a, 0);
|
||||
@@ -137,9 +153,9 @@ sensor:
|
||||
if (direction_changed || speed_changed) {
|
||||
last_dur_grid = dur;
|
||||
last_is_import_grid = is_import;
|
||||
// Import: left→right (232→395), Export: right→left (395→232)
|
||||
int32_t from_x = is_import ? 232 : 395;
|
||||
int32_t to_x = is_import ? 395 : 232;
|
||||
// Import: left→right, Export: right→left
|
||||
int32_t from_x = is_import ? ${anim_grid_x_import_from} : ${anim_grid_x_import_to};
|
||||
int32_t to_x = is_import ? ${anim_grid_x_import_to} : ${anim_grid_x_import_from};
|
||||
lv_anim_exec_xcb_t cb = [](void* obj, int32_t v){ lv_obj_set_x((lv_obj_t*)obj, v); };
|
||||
lv_anim_del(id(dot_grid), NULL);
|
||||
lv_anim_t a; lv_anim_init(&a);
|
||||
@@ -259,10 +275,10 @@ sensor:
|
||||
if (direction_changed || speed_changed) {
|
||||
last_dur_bat = dur;
|
||||
last_is_charge_bat = is_charge;
|
||||
// Charge: junction→battery (left→right 395→562)
|
||||
// Discharge: battery→junction (right→left 562→395)
|
||||
int32_t from_x = is_charge ? 395 : 562;
|
||||
int32_t to_x = is_charge ? 562 : 395;
|
||||
// Charge: junction→battery (left→right)
|
||||
// Discharge: battery→junction (right→left)
|
||||
int32_t from_x = is_charge ? ${anim_bat_x_charge_from} : ${anim_bat_x_charge_to};
|
||||
int32_t to_x = is_charge ? ${anim_bat_x_charge_to} : ${anim_bat_x_charge_from};
|
||||
lv_anim_exec_xcb_t cb = [](void* obj, int32_t v){ lv_obj_set_x((lv_obj_t*)obj, v); };
|
||||
lv_anim_del(id(dot_bat), NULL);
|
||||
lv_anim_t a; lv_anim_init(&a);
|
||||
@@ -323,7 +339,7 @@ sensor:
|
||||
lv_anim_t a; lv_anim_init(&a);
|
||||
lv_anim_set_var(&a, id(dot_home));
|
||||
lv_anim_set_exec_cb(&a, cb);
|
||||
lv_anim_set_values(&a, 186, 272);
|
||||
lv_anim_set_values(&a, ${anim_home_y_from}, ${anim_home_y_to});
|
||||
lv_anim_set_time(&a, dur);
|
||||
lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE);
|
||||
lv_anim_set_repeat_delay(&a, 0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Updated : 2026.06.28
|
||||
# Version : 1.1.3
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.2.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
@@ -24,6 +24,7 @@
|
||||
substitutions:
|
||||
device_name: 'yambms'
|
||||
yambms_name: 'yambms_1'
|
||||
battery_fill_px_per_percent: '1'
|
||||
|
||||
sensor:
|
||||
|
||||
@@ -91,7 +92,7 @@ sensor:
|
||||
text: !lambda 'return to_string((int)x) + "%";'
|
||||
- lvgl.obj.update:
|
||||
id: battery_fill_soc
|
||||
height: !lambda 'return (int)x;'
|
||||
height: !lambda 'return (int)(x * ${battery_fill_px_per_percent});'
|
||||
bg_color: !lambda |-
|
||||
if (x > 80) return lv_color_hex(${color_5}); // green
|
||||
if (x > 20) return lv_color_hex(${color_6}); // yellow
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.1.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
# Blue Navy Overview + YamBMS pages - copy of
|
||||
# board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml
|
||||
# with layout scaled to 1024x600 (same widgets, IDs and HA sensors).
|
||||
|
||||
substitutions:
|
||||
home_page: "page_overview"
|
||||
|
||||
packages:
|
||||
lvgl_design_base: !include board_options_display_lvgl_design_1024x600_blue_navy_base.yaml
|
||||
lvgl_design_overview: !include board_options_display_lvgl_design_1024x600_blue_navy_overview.yaml
|
||||
lvgl_design_yambms: !include board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml
|
||||
ha_sensors_overview: !include
|
||||
file: board_options_display_lvgl_ha_sensors_blue_navy_overview.yaml
|
||||
vars:
|
||||
# Flow-dot travel follows the scaled 1024x600 connection lines.
|
||||
anim_pv_y_from: "132"
|
||||
anim_pv_y_to: "233"
|
||||
anim_grid_x_import_from: "296"
|
||||
anim_grid_x_import_to: "509"
|
||||
anim_bat_x_charge_from: "515"
|
||||
anim_bat_x_charge_to: "724"
|
||||
anim_home_y_from: "240"
|
||||
anim_home_y_to: "340"
|
||||
anim_pv_power_max: ${anim_pv_power_max}
|
||||
anim_grid_power_max: ${anim_grid_power_max}
|
||||
anim_battery_power_max: ${anim_battery_power_max}
|
||||
anim_home_power_max: ${anim_home_power_max}
|
||||
anim_duration_min: ${anim_duration_min}
|
||||
anim_duration_max: ${anim_duration_max}
|
||||
pv_power: ${pv_power}
|
||||
pv_energy_today: ${pv_energy_today}
|
||||
grid_power: ${grid_power}
|
||||
grid_voltage: ${grid_voltage}
|
||||
grid_frequency: ${grid_frequency}
|
||||
grid_import_today: ${grid_import_today}
|
||||
grid_export_today: ${grid_export_today}
|
||||
bat_power: ${bat_power}
|
||||
bat_soc: ${bat_soc}
|
||||
bat_voltage: ${bat_voltage}
|
||||
bat_cell_count: ${bat_cell_count}
|
||||
bat_charging_phase: ${bat_charging_phase}
|
||||
bat_charge_today: ${bat_charge_today}
|
||||
bat_discharge_today: ${bat_discharge_today}
|
||||
home_power: ${home_power}
|
||||
home_daily_energy_total: ${home_daily_energy_total}
|
||||
home_daily_energy_solar: ${home_daily_energy_solar}
|
||||
home_daily_energy_grid: ${home_daily_energy_grid}
|
||||
home_daily_energy_battery: ${home_daily_energy_battery}
|
||||
ha_sensors_yambms: !include
|
||||
file: board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml
|
||||
vars:
|
||||
# Battery fill shell is 125 px at 1024x600 vs 100 px at 800x480.
|
||||
battery_fill_px_per_percent: "1.25"
|
||||
device_name: ${device_name}
|
||||
yambms_name: ${yambms_name}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Updated : 2026.09.11
|
||||
# Version : 1.1.0
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
# Blue Navy YamBMS pages — copy of
|
||||
# board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml
|
||||
# with layout scaled to 1024x600 (same widgets, IDs and HA sensors).
|
||||
|
||||
substitutions:
|
||||
home_page: 'page_battery'
|
||||
|
||||
packages:
|
||||
lvgl_design_base: !include board_options_display_lvgl_design_1024x600_blue_navy_base.yaml
|
||||
lvgl_design_yambms: !include board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml
|
||||
ha_sensors_yambms: !include
|
||||
file: board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml
|
||||
vars:
|
||||
# Battery fill shell is 125 px at 1024x600 vs 100 px at 800x480.
|
||||
battery_fill_px_per_percent: '1.25'
|
||||
device_name: ${device_name}
|
||||
yambms_name: ${yambms_name}
|
||||
Reference in new issue
Block a user