In addition to the main YAML, you must have the packages folder as well as secrets.yaml (with your wifi credentials) in order to compile.
Hello, I recently buyed a JK BMS PB2A16S20P, Hardware version V15.XA, running V15.10 firmware and have issues compiling the code for ESP32 - C3 board or for standard ESP32. I have copied packages folder as well as secrets.yaml and i get the following error:
from src/main.cpp:3:
src/esphome/components/jk_rs485_sniffer/binary_output.h:18:7: error: redefinition of 'class esphome:
utput::BinaryOutput'
class BinaryOutput {
^~~~~~~~~~~~
In file included from src/esphome/components/binary/light/binary_light_output.h:4,
from src/esphome.h:15,
from src/main.cpp:3:
src/esphome/components/output/binary_output.h:18:7: note: previous definition of 'class esphome:
utput::BinaryOutput'
class BinaryOutput {
^~~~~~~~~~~~
Generating LD script .pioenvs/smartbms/memory.ld
Compiling .pioenvs/smartbms/app_trace/app_trace.o
*** [.pioenvs/smartbms/src/main.o] Error 1
========================= [FAILED] Took 607.51 seconds =========================
I have created a new board file for C3 board, and i cannot find what is the issue for not managing to compile.
The content for C3 board is as follows:
# Updated : 2024.05.19
# Version : 1.1
# GitHub :
https://github.com/Sleeper85/esphome-jk-bms-can
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
uart:
# UART 1
- id: uart_esp_1
tx_pin: 21
rx_pin: 20
baud_rate: 115200
rx_buffer_size: 384
canbus:
# CANBUS NODE 1
- platform: esp32_can
id: canbus_node1
tx_pin: 9
rx_pin: 8
can_id: 1
bit_rate: 500kbps
output:
# ESP LED
- platform: gpio
pin: 2
id: esp_led
inverted: true
light:
# ESP Light
- platform: binary
output: esp_led
id: esp_light
name: "${name} On board light"
internal: true
C3 has no onboard led but i will attach one on GPIO2 if it will manage to compile and run successfully.
If i choose board type esp32-s3 the code is compiling successfully but obviously it cannot be flashed to C3 board.
Any ideas?