monitoring entre carte JK BMS en Bluetooth et ESP32.
Cet écran vous permet de connaitre en temps réel l'état de charge de votre batterie équipée d'une carte JK BMS Bluetooth.
ESP32-S3 : https://s.click.aliexpress.com/e/_oDQrqDw
Ecran Oled 1.3" 4 Pins I2C : https://s.click.aliexpress.com/e/_oBvoNdW
8 x entretoises nylon : 1cm / M3 (5.6mm)
8 x vis M3
fils dupont
esphome:
name: jk-bms-cc
friendly_name: JK BMS CC
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable Home Assistant API
#api:
# encryption:
# key: "vztkFXenI8z8Vb3bXDr0p4HQmwLrcYNisUYTXzl70/U="
#web_server:
#port: 80
#wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "Jk-Bms-Cc Fallback Hotspot"
# password: "kDWHDC7TyWEs"
#captive_portal:
substitutions:
name: jk-bms
device_description: "Monitor and control a JK-BMS via bluetooth"
external_components_source: github://syssi/esphome-jk-bms@main
mac_address: C8:47:80:28:90:32
# Please use "JK02_24S" if you own a old JK-BMS < hardware version 11.0 (hardware version >= 6.0 and < 11.0)
# Please use "JK02_32S" if you own a new JK-BMS >= hardware version 11.0 (f.e. JK-B2A8S20P hw 11.XW, sw 11.26)
# Please use "JK04" if you have some old JK-BMS <= hardware version 3.0 (f.e. JK-B2A16S hw 3.0, sw. 3.3.0)
protocol_version: JK02_32S
external_components:
- source: ${external_components_source}
refresh: 0s
#ota:
# platform: esphome
logger:
level: DEBUG
logs:
esp32_ble_tracker: INFO
esp32_ble_client: INFO
i2c:
sda: 8
scl: 9
font:
- file: "gfonts://Roboto"
id: font1
size: 10
- file: "gfonts://Roboto"
id: font2
size: 48
- file: "gfonts://Roboto"
id: font3
size: 14
#time:
# - platform: homeassistant
# id: esptime
display:
- platform: ssd1306_i2c
model: "SH1106 128x64"
update_interval: 0.5s
address: 0x3C
lambda: |-
// Print "Le Profes'SolaireSOC" in top center.
//it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "SOC");
// SOC en pourcentage
it.printf(64, 10, id(font2), TextAlign::TOP_CENTER, "%.0f", id(soc).state);
it.print(105, 32, id(font3), "%");
// Power en Watts
it.printf(10, 5, id(font1), "%.0f",id(Power).state);
// Delta cellules mV
it.printf(100, 5, id(font1), "%.4f",id(Delta).state);
// Draw the outline of a rectangle with the top left at [5,20], a width of 30 and a height of 42
it.rectangle(10, 18, 107, 43);
esp32_ble_tracker:
scan_parameters:
active: false
ble_client:
- mac_address: ${mac_address}
id: client0
jk_bms_ble:
- ble_client_id: client0
protocol_version: ${protocol_version}
throttle: 5s
id: bms0
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms0
delta_cell_voltage:
name: "${name} delta cell voltage"
id: Delta
power:
name: "${name} power"
id: Power
state_of_charge:
name: "${name} state of charge"
id: soc