From 4e196395e1587dd941db65c5fd9731a3143bdf4b Mon Sep 17 00:00:00 2001 From: Sleeper85 Date: Tue, 9 Sep 2025 17:12:01 +0200 Subject: [PATCH] Create board_ESP32-S3_WS-RS485-CAN.yaml --- .../board/board_ESP32-S3_WS-RS485-CAN.yaml | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 packages/board/board_ESP32-S3_WS-RS485-CAN.yaml diff --git a/packages/board/board_ESP32-S3_WS-RS485-CAN.yaml b/packages/board/board_ESP32-S3_WS-RS485-CAN.yaml new file mode 100644 index 0000000..42edf4a --- /dev/null +++ b/packages/board/board_ESP32-S3_WS-RS485-CAN.yaml @@ -0,0 +1,86 @@ +# Updated : 2025.09.09 +# Version : 1.1.1 +# 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.waveshare.com/wiki/ESP32-S3-RS485-CAN + +substitutions: + board_chip: "ESP32-S3" + board_name: "WS RS485-CAN" + # Interfaces GPIOs + # uart_esp_1 RS485 port (RS485_EN = GPIO 21) + tx_pin_1: '17' + rx_pin_1: '18' + # uart_esp_2 + tx_pin_2: '3' + rx_pin_2: '4' + # uart_esp_3 + tx_pin_3: '5' + rx_pin_3: '6' + # canbus_esp32_can CAN port + tx_pin_4: '15' + rx_pin_4: '16' + # canbus_mcp2515 + spi_mosi_pin: '11' + spi_miso_pin: '13' + spi_clk_pin: '12' + mcp2515_cs_pin: '10' + +packages: + device_base: !include ../base/device_base.yaml + device_base_wifi: !include ../base/device_base_wifi.yaml + +esp32: + board: esp32-s3-devkitc-1 + flash_size: 16MB + cpu_frequency: 240MHz + framework: + type: esp-idf + +esphome: + platformio_options: + board_build.flash_mode: dio # use Dual IO (dio) instead of Quad IO (qio) to prevent boot loop after flashing + +wifi: + id: my_network + ssid: !secret wifi_ssid + password: !secret wifi_password + domain: !secret domain + +logger: + baud_rate: 0 # frees the 3rd UART and avoids some bugs like "WK2168 with canbus" or "BLE client with RS485 modbus" + +# +--------------------------------------+ +# | Inverter Heartbeat Light | +# +--------------------------------------+ + +light: + # ESP Light used to see the inverter heartbeat + # Internal : only specifying an id without a name will implicitly set this to true. + - platform: binary + id: esp_light + output: esp_output + +output: + # ESP32 board without LED + - platform: template + id: esp_output + type: binary + write_action: + - logger.log: "Inverter Heartbeat Output" + #- lambda: C++ code; # action to be performed at each inverter heartbeat