From 35e839f1fd4cb43a24a584ddd851082cc10248aa Mon Sep 17 00:00:00 2001 From: Lewa-Reka Date: Sun, 1 Nov 2026 08:39:39 +0100 Subject: [PATCH] Add CrowPanel Advanced (ESP32-P4) board and Blue Navy 1024x600 HA display (#322) * add crowpanel board * add blue navy layout 1024x600 --- YamBMS_RP_HA_Display.yaml | 8 +- ...32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml | 189 +++ ...y_lvgl_design_1024x600_blue_navy_base.yaml | 168 +++ ...gl_design_1024x600_blue_navy_overview.yaml | 558 ++++++++ ...lvgl_design_1024x600_blue_navy_yambms.yaml | 1243 +++++++++++++++++ ...ay_lvgl_ha_sensors_blue_navy_overview.yaml | 38 +- ...play_lvgl_ha_sensors_blue_navy_yambms.yaml | 7 +- ...gl_package_1024x600_blue_navy_ha_full.yaml | 74 + ..._package_1024x600_blue_navy_ha_yambms.yaml | 36 + 9 files changed, 2305 insertions(+), 16 deletions(-) create mode 100644 packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml create mode 100644 packages/board/board_options_display_lvgl_design_1024x600_blue_navy_base.yaml create mode 100644 packages/board/board_options_display_lvgl_design_1024x600_blue_navy_overview.yaml create mode 100644 packages/board/board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml create mode 100644 packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml create mode 100644 packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml diff --git a/YamBMS_RP_HA_Display.yaml b/YamBMS_RP_HA_Display.yaml index 74ab31f..46d1902 100644 --- a/YamBMS_RP_HA_Display.yaml +++ b/YamBMS_RP_HA_Display.yaml @@ -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 diff --git a/packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml b/packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml new file mode 100644 index 0000000..fc60f7a --- /dev/null +++ b/packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml @@ -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 . + +# 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 diff --git a/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_base.yaml b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_base.yaml new file mode 100644 index 0000000..14b5b38 --- /dev/null +++ b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_base.yaml @@ -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 . + +# 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: diff --git a/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_overview.yaml b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_overview.yaml new file mode 100644 index 0000000..a4f7d5c --- /dev/null +++ b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_overview.yaml @@ -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 . + +# 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" diff --git a/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml new file mode 100644 index 0000000..92342f1 --- /dev/null +++ b/packages/board/board_options_display_lvgl_design_1024x600_blue_navy_yambms.yaml @@ -0,0 +1,1243 @@ +# 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 . + +# Scaled from board_options_display_lvgl_design_800x480_blue_navy_yambms.yaml +# for 1024x600 Blue Navy (x*1.28, y*1.25). Same widgets, IDs and pages. +# + +lvgl: + + # ┌─────────────────────────────────────────────────────┐ + # │ PAGE — BATTERY │ + # └─────────────────────────────────────────────────────┘ + + pages: + - id: page_battery + bg_color: ${color_bg} + widgets: + + # ── ROW 1 : Faults Status | Battery SoC | Charge Status ──────── + + # Faults Status + - obj: + x: 26 + y: 12 + width: 314 + height: 188 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 10 + pad_all: 0 + scrollbar_mode: "off" + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Faults Status" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # Row 1 + - obj: + id: net_network + x: 19 + y: 38 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "IP Network" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + - obj: + id: net_api_mqtt + x: 160 + y: 38 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "API/MQTT" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + + # Row 2 + - obj: + id: net_can_inv + x: 19 + y: 75 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "CAN INV" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + - obj: + id: net_rs485_inv + x: 160 + y: 75 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "RS485 INV" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + + # Row 3 + - obj: + id: bg_bms + x: 19 + y: 112 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "BMS" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + - obj: + id: bg_shunt + x: 160 + y: 112 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "Shunt" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + + # Row 4 + - obj: + id: bg_balancer + x: 19 + y: 150 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "Balancer" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + - obj: + id: bg_alarm + x: 160 + y: 150 + width: 128 + height: 25 + bg_color: ${color_4} + border_width: 0 + radius: 5 + scrollbar_mode: "off" + widgets: + - label: + width: 100% + text: "Alarm" + text_font: font_14 + text_color: ${color_bg} + text_align: CENTER + + # Battery SoC + - obj: + x: 352 + y: 12 + width: 320 + height: 188 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 10 + pad_all: 0 + scrollbar_mode: "off" + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Battery SoC" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # Terminal + + - obj: + x: 77 + y: 38 + width: 13 + height: 6 + bg_color: ${color_2} + border_width: 0 + radius: 1 + scrollbar_mode: "off" + + # Battery + - obj: + x: 51 + y: 44 + width: 64 + height: 125 + bg_color: ${color_3} + border_width: 2 + border_color: ${color_2} + radius: 5 + pad_all: 0 + scrollbar_mode: "off" + widgets: + # SoC + - obj: + id: battery_fill_soc + x: 0 + y: 0 + width: 100% + height: 0 # SoC % + bg_color: ${color_6} + border_width: 0 + radius: 2 + align: BOTTOM_LEFT + scrollbar_mode: "off" + + # SoC text value + - label: + id: lbl_soc_value + x: 154 + y: 75 + width: 128 + text: "---%" + text_font: font_40 + text_color: ${color_1} + + # Requested Values to Inverter + - obj: + x: 685 + y: 12 + width: 314 + height: 188 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Requested Values to Inverter" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + # CVL + - label: + x: 19 + y: 38 + width: 64 + text: "CVL :" + text_font: font_18 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_req_cvl + x: 96 + y: 38 + width: 77 + text: "--.- V" + text_font: font_18 + text_color: ${color_5} + # CVL instruction + - label: + id: lbl_cvl_instruction + x: 186 + y: 38 + width: 115 + text: "---" + text_font: font_18 + text_color: ${color_4} + # CCL + - label: + x: 19 + y: 75 + width: 64 + text: "CCL :" + text_font: font_18 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_req_ccl + x: 96 + y: 75 + width: 77 + text: "--- A" + text_font: font_18 + text_color: ${color_5} + # CCL Derating + - label: + id: lbl_ccl_derating + x: 186 + y: 75 + width: 115 + text: "---" + text_font: font_18 + text_color: ${color_7} + # DCL + - label: + x: 19 + y: 112 + width: 64 + text: "DCL :" + text_font: font_18 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_req_dcl + x: 96 + y: 112 + width: 77 + text: "--- A" + text_font: font_18 + text_color: ${color_5} + # DCL Derating + - label: + id: lbl_dcl_derating + x: 186 + y: 112 + width: 115 + text: "---" + text_font: font_18 + text_color: ${color_4} + # DVL + - label: + x: 19 + y: 150 + width: 64 + text: "DVL :" + text_font: font_18 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_req_dvl + x: 96 + y: 150 + width: 77 + text: "--.- V" + text_font: font_18 + text_color: ${color_5} + # DVL instruction + - label: + id: lbl_dvl_instruction + x: 186 + y: 150 + width: 115 + text: "---" + text_font: font_18 + text_color: ${color_4} + + # ── ROW 2 : Voltage | Power | Current ─── + + # Voltage + - obj: + x: 26 + y: 212 + width: 314 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 10 + pad_all: 0 + scrollbar_mode: "off" + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "VOLTAGE" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_voltage + x: 0 + y: 38 + width: 100% + text: "--.- V" + text_font: font_40 + text_color: ${color_1} + text_align: CENTER + + # Power + - obj: + x: 352 + y: 212 + width: 320 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 10 + pad_all: 0 + scrollbar_mode: "off" + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "POWER" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_power + x: 0 + y: 38 + width: 100% + text: "--- W" + text_font: font_40 + text_color: ${color_1} + text_align: CENTER + + # Current + - obj: + x: 685 + y: 212 + width: 314 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 10 + pad_all: 0 + scrollbar_mode: "off" + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "CURRENT" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_current + x: 0 + y: 38 + width: 100% + text: "--- A" + text_font: font_40 + text_color: ${color_1} + text_align: CENTER + + # ── ROW 3 : Capacity infos - SoH ── + + # Installed Capacity + - obj: + x: 26 + y: 338 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Installed Cap." + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_installed_cap + x: 0 + y: 38 + width: 100% + text: "--- Ah" + text_font: font_18 + text_color: ${color_1} + text_align: CENTER + + # Battery Capacity + - obj: + x: 266 + y: 338 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Battery Cap." + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_battery_cap + x: 0 + y: 38 + width: 100% + text: "--- Ah" + text_font: font_18 + text_color: ${color_1} + text_align: CENTER + + # Capacity Remaining + - obj: + x: 507 + y: 338 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Cap. Remaining" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_cap_remaining + x: 0 + y: 38 + width: 100% + text: "--- Ah" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + + # SoH + - obj: + x: 748 + y: 338 + width: 251 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Battery SoH" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_soh + x: 0 + y: 38 + width: 100% + text: "--- %" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + + # ── ROW 4 : Cell voltages + Delta + Temperatures ── + + # Max Cell V. + - obj: + x: 26 + y: 425 + width: 228 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Max Cell V." + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_max_cell_v + x: 0 + y: 38 + width: 100% + text: "-.--- V" + text_font: font_18 + text_color: ${color_7} + text_align: CENTER + - label: + id: lbl_max_cell_num + x: 0 + y: 69 + width: 100% + text: "Cell ---" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # Min Cell V. + - obj: + x: 266 + y: 425 + width: 228 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Min Cell V." + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_min_cell_v + x: 0 + y: 38 + width: 100% + text: "-.--- V" + text_font: font_18 + text_color: ${color_4} + text_align: CENTER + - label: + id: lbl_min_cell_num + x: 0 + y: 69 + width: 100% + text: "Cell ---" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # Delta Cell V. + Equalizing + - obj: + x: 507 + y: 425 + width: 228 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Delta Cell V." + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_delta_cell + x: 0 + y: 38 + width: 100% + text: "--- mV" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + - label: + id: lbl_equalizing + x: 0 + y: 69 + width: 100% + text: "Equalizing: ---" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # Max/Min Temperature + - obj: + x: 748 + y: 425 + width: 251 + height: 112 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Temperature" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_max_temp + x: 0 + y: 38 + width: 124 + text: "↑ ---°C" + text_font: font_18 + text_color: ${color_7} + text_align: CENTER + - label: + id: lbl_min_temp + x: 124 + y: 38 + width: 124 + text: "↓ ---°C" + text_font: font_18 + text_color: ${color_4} + text_align: CENTER + - label: + id: lbl_max_temp_sensor + x: 0 + y: 69 + width: 124 + text: "Sensor ---" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_min_temp_sensor + x: 124 + y: 69 + width: 124 + text: "Sensor ---" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + + # ┌─────────────────────────────────────────────────────┐ + # │ PAGE — STATUS │ + # └─────────────────────────────────────────────────────┘ + - id: page_status + bg_color: ${color_bg} + widgets: + + # ── ROW 1 : Charging status | Charge instruction | Discharge instruction | Last Complete Charge ── + + # Charging status + - obj: + x: 26 + y: 12 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Charging status" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_charging_status + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + + # Charge instruction + - obj: + x: 266 + y: 12 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Charge instruction" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_charge_instr + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_4} + text_align: CENTER + + # Discharge instruction + - obj: + x: 507 + y: 12 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Discharge instruction" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_discharge_instr + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_7} + text_align: CENTER + + # Last complete charge + - obj: + x: 748 + y: 12 + width: 251 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Last Complete Charge" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_last_charge + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_1} + text_align: CENTER + + # ── ROW 2 : Alarm | Warning | Free 1 | Free 2 ── + + # Alarm + - obj: + x: 26 + y: 100 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Alarm" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_alarm + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_7} + text_align: CENTER + + # Warning + - obj: + x: 266 + y: 100 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Warning" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_warning + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_6} + text_align: CENTER + + # Free_1 + - obj: + x: 507 + y: 100 + width: 228 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Free 1" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: lbl_free_1 + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + + # Free_2 + - obj: + x: 748 + y: 100 + width: 251 + height: 75 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 100% + text: "Free 2" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + id: + x: 0 + y: 38 + width: 100% + text: "---" + text_font: font_18 + text_color: ${color_5} + text_align: CENTER + + # ── ROW 4 : BMS counters | Shunt counters | Uptime | Version ── + + # BMS info panel + - obj: + x: 26 + y: 325 + width: 243 + height: 212 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 241 + text: "BMS" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + x: 15 + y: 32 + text: "Count:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_bms_count + x: 205 + y: 32 + text: "--" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 60 + text: "Combined:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_bms_combined + x: 205 + y: 60 + text: "--" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 88 + text: "Blocking charge:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_bms_blk_chg + x: 205 + y: 88 + text: "--" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 115 + text: "Blocking discharge:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_bms_blk_dchg + x: 205 + y: 115 + text: "--" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 142 + text: "In alarm:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_bms_alarm + x: 205 + y: 142 + text: "--" + text_font: font_14 + text_color: ${color_7} + + # Shunt + - obj: + x: 282 + y: 325 + width: 243 + height: 212 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 241 + text: "Shunt" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + x: 15 + y: 32 + text: "Shunt count:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_shunt_count + x: 205 + y: 32 + text: "--" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 60 + text: "Shunt combined:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_shunt_combined + x: 205 + y: 60 + text: "--" + text_font: font_14 + text_color: ${color_1} + + # System + - obj: + x: 538 + y: 325 + width: 461 + height: 212 + bg_color: ${color_panel} + border_width: 1 + border_color: ${color_3} + radius: 8 + widgets: + - label: + x: 0 + y: 6 + width: 458 + text: "System" + text_font: font_14 + text_color: ${color_2} + text_align: CENTER + - label: + x: 15 + y: 32 + text: "CCL Der. Reason:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_ccl_derating_reason + x: 205 + y: 32 + text: "---" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 60 + text: "DCL Der. Reason:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_dcl_derating_reason + x: 205 + y: 60 + text: "---" + text_font: font_14 + text_color: ${color_1} + # + # one line free (y: 70) + # + - label: + x: 15 + y: 115 + text: "YamBMS Uptime:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_uptime + x: 205 + y: 115 + text: "---" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 142 + text: "ESPHome version:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_esphome_ver + x: 205 + y: 142 + text: "---" + text_font: font_14 + text_color: ${color_1} + - label: + x: 15 + y: 170 + text: "YamBMS version:" + text_font: font_14 + text_color: ${color_2} + - label: + id: lbl_yambms_ver + x: 205 + y: 170 + text: "---" + text_font: font_14 + text_color: ${color_1} diff --git a/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_overview.yaml b/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_overview.yaml index aabfdb1..bb3d63f 100644 --- a/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_overview.yaml +++ b/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_overview.yaml @@ -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 . +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); diff --git a/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml b/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml index 4ab74c7..05aaf5f 100644 --- a/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml +++ b/packages/board/board_options_display_lvgl_ha_sensors_blue_navy_yambms.yaml @@ -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 diff --git a/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml b/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml new file mode 100644 index 0000000..0f56824 --- /dev/null +++ b/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml @@ -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 . + +# 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} diff --git a/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml b/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml new file mode 100644 index 0000000..9c876f8 --- /dev/null +++ b/packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml @@ -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 . + +# 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}