HoangSon.Io.Vn
  • Trang chủ
  • Smart Home
  • Máy Tính
  • Kiếm Tiền Online
  • Webmaster
  • WordPress
    • Plugin WordPress
    • Theme WordPress
    • Thủ Thuật WordPress
  • Điện Thoại
No Result
View All Result
  • Trang chủ
  • Smart Home
  • Máy Tính
  • Kiếm Tiền Online
  • Webmaster
  • WordPress
    • Plugin WordPress
    • Theme WordPress
    • Thủ Thuật WordPress
  • Điện Thoại
No Result
View All Result
HoangSon.Io.Vn
No Result
View All Result
Trang Chủ Smart Home

Code HASS – ESP32 kết nối BLE giám sát BMS JK

Admin by Admin
14/06/2025
in Smart Home
0
Cài đặt Home Assistant
0
SHARES
2
VIEWS
Chia sẻ lên FacebookChia sẻ lên Twitter

substitutions:
  name: jk-bms-new
  device_description: "Monitor and control a JK-BMS v11 via bluetooth"
  external_components_source: github://syssi/esphome-jk-bms@main
  mac_address: 98:DA:20:07:E5:XX
  # 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

esphome:
  name: ${name}
  comment: ${device_description}
  min_version: 2024.6.0
  project:
    name: "syssi.esphome-jk-bms"
    version: 2.1.0

esp32:
  board: esp32dev
  framework:
    type: esp-idf

external_components:
  - source: ${external_components_source}
    refresh: 0s

wifi:
  ssid: "SS"
  password: "XXXXXXXX"
  use_address: 192.168.88.XX
  # Optional manual IP  
  manual_ip:
    static_ip: 192.168.88.XX
    gateway: 192.168.88.1
    subnet: 255.255.255.0
    dns1: 192.168.88.1
    dns2: 8.8.8.8

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "EspZEM"
    password: "XXXXXXXX"

ota:
  platform: esphome
  on_begin:
    then:
      - switch.turn_off: ble_client_switch0
      - logger.log: "BLE connection suspended for OTA update"

logger:
  level: DEBUG
  logs:
    esp32_ble_tracker: INFO
    esp32_ble_client: INFO

# If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
api:

# mqtt:
#   broker: !secret mqtt_host
#   username: !secret mqtt_username
#   password: !secret mqtt_password
#   id: mqtt_client

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

binary_sensor:
  - platform: jk_bms_ble
    balancing:
      name: "${name} balancing"
    charging:
      name: "${name} charging"
    discharging:
      name: "${name} discharging"
    heating:
      name: "${name} heating"
    online_status:
      name: "${name} online status"
    dry_contact_1:
      name: "${name} dry contact 1"
    dry_contact_2:
      name: "${name} dry contact 2"

button:
  - platform: jk_bms_ble
    retrieve_settings:
      name: "${name} retrieve settings"
    retrieve_device_info:
      name: "${name} retrieve device info"

number:
  - platform: jk_bms_ble
    jk_bms_ble_id: bms0
    balance_trigger_voltage:
      name: "${name} balance trigger voltage"
    cell_count:
      name: "${name} cell count"
    total_battery_capacity:
      name: "${name} total battery capacity"
    cell_voltage_overvoltage_protection:
      name: "${name} cell voltage overvoltage protection"
    cell_voltage_overvoltage_recovery:
      name: "${name} cell voltage overvoltage recovery"
    cell_voltage_undervoltage_protection:
      name: "${name} cell voltage undervoltage protection"
    cell_voltage_undervoltage_recovery:
      name: "${name} cell voltage undervoltage recovery"
    balance_starting_voltage:
      name: "${name} balance starting voltage"
    voltage_calibration:
      name: "${name} voltage calibration"
    current_calibration:
      name: "${name} current calibration"
    power_off_voltage:
      name: "${name} power off voltage"
    max_balance_current:
      name: "${name} max balance current"
    max_charge_current:
      name: "${name} max charge current"
    max_discharge_current:
      name: "${name} max discharge current"
    smart_sleep_voltage:
      name: "${name} smart sleep voltage"
    cell_soc100_voltage:
      name: "${name} cell soc100 voltage"
    cell_soc0_voltage:
      name: "${name} cell soc0 voltage"
    cell_request_charge_voltage:
      name: "${name} cell request charge voltage"
    cell_request_float_voltage:
      name: "${name} cell request float voltage"
    cell_request_charge_voltage_time:
      name: "${name} cell request charge voltage time"
    cell_request_float_voltage_time:
      name: "${name} cell request float voltage time"
    charge_overcurrent_protection_delay:
      name: "${name} charge overcurrent protection delay"
    charge_overcurrent_protection_recovery_time:
      name: "${name} charge overcurrent protection recovery time"
    discharge_overcurrent_protection_delay:
      name: "${name} discharge overcurrent protection delay"
    discharge_overcurrent_protection_recovery_time:
      name: "${name} discharge overcurrent protection recovery time"
    short_circuit_protection_delay:
      name: "${name} short circuit protection delay"
    short_circuit_protection_recovery_time:
      name: "${name} short circuit protection recovery time"
    charge_overtemperature_protection:
      name: "${name} charge overtemperature protection"
    charge_overtemperature_protection_recovery:
      name: "${name} charge overtemperature protection recovery"
    discharge_overtemperature_protection:
      name: "${name} discharge overtemperature protection"
    discharge_overtemperature_protection_recovery:
      name: "${name} discharge overtemperature protection recovery"
    charge_undertemperature_protection:
      name: "${name} charge undertemperature protection"
    charge_undertemperature_protection_recovery:
      name: "${name} charge undertemperature protection recovery"
    power_tube_overtemperature_protection:
      name: "${name} power tube overtemperature protection"
    power_tube_overtemperature_protection_recovery:
      name: "${name} power tube overtemperature protection recovery"

sensor:
  - platform: jk_bms_ble
    jk_bms_ble_id: bms0
    min_cell_voltage:
      name: "${name} min cell voltage"
    max_cell_voltage:
      name: "${name} max cell voltage"
    min_voltage_cell:
      name: "${name} min voltage cell"
    max_voltage_cell:
      name: "${name} max voltage cell"
    delta_cell_voltage:
      name: "${name} delta cell voltage"
    average_cell_voltage:
      name: "${name} average cell voltage"
    cell_voltage_1:
      name: "${name} cell voltage 1"
    cell_voltage_2:
      name: "${name} cell voltage 2"
    cell_voltage_3:
      name: "${name} cell voltage 3"
    cell_voltage_4:
      name: "${name} cell voltage 4"
    cell_voltage_5:
      name: "${name} cell voltage 5"
    cell_voltage_6:
      name: "${name} cell voltage 6"
    cell_voltage_7:
      name: "${name} cell voltage 7"
    cell_voltage_8:
      name: "${name} cell voltage 8"
    cell_voltage_9:
      name: "${name} cell voltage 9"
    cell_voltage_10:
      name: "${name} cell voltage 10"
    cell_voltage_11:
      name: "${name} cell voltage 11"
    cell_voltage_12:
      name: "${name} cell voltage 12"
    cell_voltage_13:
      name: "${name} cell voltage 13"
    cell_voltage_14:
      name: "${name} cell voltage 14"
    cell_voltage_15:
      name: "${name} cell voltage 15"
    cell_voltage_16:
      name: "${name} cell voltage 16"
    cell_voltage_17:
      name: "${name} cell voltage 17"
    cell_voltage_18:
      name: "${name} cell voltage 18"
    cell_voltage_19:
      name: "${name} cell voltage 19"
    cell_voltage_20:
      name: "${name} cell voltage 20"
    cell_voltage_21:
      name: "${name} cell voltage 21"
    cell_voltage_22:
      name: "${name} cell voltage 22"
    cell_voltage_23:
      name: "${name} cell voltage 23"
    cell_voltage_24:
      name: "${name} cell voltage 24"
    cell_resistance_1:
      name: "${name} cell resistance 1"
    cell_resistance_2:
      name: "${name} cell resistance 2"
    cell_resistance_3:
      name: "${name} cell resistance 3"
    cell_resistance_4:
      name: "${name} cell resistance 4"
    cell_resistance_5:
      name: "${name} cell resistance 5"
    cell_resistance_6:
      name: "${name} cell resistance 6"
    cell_resistance_7:
      name: "${name} cell resistance 7"
    cell_resistance_8:
      name: "${name} cell resistance 8"
    cell_resistance_9:
      name: "${name} cell resistance 9"
    cell_resistance_10:
      name: "${name} cell resistance 10"
    cell_resistance_11:
      name: "${name} cell resistance 11"
    cell_resistance_12:
      name: "${name} cell resistance 12"
    cell_resistance_13:
      name: "${name} cell resistance 13"
    cell_resistance_14:
      name: "${name} cell resistance 14"
    cell_resistance_15:
      name: "${name} cell resistance 15"
    cell_resistance_16:
      name: "${name} cell resistance 16"
    cell_resistance_17:
      name: "${name} cell resistance 17"
    cell_resistance_18:
      name: "${name} cell resistance 18"
    cell_resistance_19:
      name: "${name} cell resistance 19"
    cell_resistance_20:
      name: "${name} cell resistance 20"
    cell_resistance_21:
      name: "${name} cell resistance 21"
    cell_resistance_22:
      name: "${name} cell resistance 22"
    cell_resistance_23:
      name: "${name} cell resistance 23"
    cell_resistance_24:
      name: "${name} cell resistance 24"
    total_voltage:
      name: "${name} total voltage"
    current:
      name: "${name} current"
    heating_current:
      name: "${name} heating current"
    power:
      name: "${name} power"
    charging_power:
      name: "${name} charging power"
    discharging_power:
      name: "${name} discharging power"
    temperature_sensor_1:
      name: "${name} temperature sensor 1"
    temperature_sensor_2:
      name: "${name} temperature sensor 2"
    temperature_sensor_3:
      name: "${name} temperature sensor 3"
    temperature_sensor_4:
      name: "${name} temperature sensor 4"
    temperature_sensor_5:
      name: "${name} temperature sensor 5"
    power_tube_temperature:
      name: "${name} power tube temperature"
    balancing:
      name: "${name} balancing"
    state_of_charge:
      name: "${name} state of charge"
    capacity_remaining:
      name: "${name} capacity remaining"
    total_battery_capacity_setting:
      name: "${name} total battery capacity setting"
    charging_cycles:
      name: "${name} charging cycles"
    total_charging_cycle_capacity:
      name: "${name} total charging cycle capacity"
    total_runtime:
      name: "${name} total runtime"
    balancing_current:
      name: "${name} balancing current"
    errors_bitmask:
      name: "${name} errors bitmask"
    emergency_time_countdown:
      name: "${name} emergency time countdown"
    charge_status_id:
      name: "${name} charge status id"
    charge_status_time_elapsed:
      name: "${name} charge status time elapsed"

switch:
  - platform: jk_bms_ble
    charging:
      name: "${name} charging"
    discharging:
      name: "${name} discharging"
    balancer:
      name: "${name} balancer"
    emergency:
      name: "${name} emergency"
    heating:
      name: "${name} heating"
    disable_temperature_sensors:
      name: "${name} disable temperature sensors"
    display_always_on:
      name: "${name} display always on"
    smart_sleep:
      name: "${name} smart sleep"
    disable_pcl_module:
      name: "${name} disable pcl module"
    timed_stored_data:
      name: "${name} timed stored data"
    charging_float_mode:
      name: "${name} charging float mode"

  - platform: ble_client
    ble_client_id: client0
    id: ble_client_switch0
    name: "${name} enable bluetooth connection"

text_sensor:
  - platform: jk_bms_ble
    errors:
      name: "${name} errors"
    total_runtime_formatted:
      name: "${name} total runtime formatted"
    charge_status:
      name: "${name} charge status"
Đánh giá post
Bài trước

FIX update, INSTALL package sau khi vòng đời CentOS 7 ngừng hỗ trợ

Admin

Admin

HoangSon.Us

Liên quanBài đăng

Code pzem cho esphome
Smart Home

Code pzem cho esphome

25/03/2025
62
Code hass: sunsynk-power-flow-card for luxpower+luxpython – Part 2
Smart Home

Code hass: sunsynk-power-flow-card for luxpower+luxpython – Part 2

06/09/2024
174
Refresh info  Luxpower Home assistant theo thời gian tùy chỉnh
Smart Home

Refresh info Luxpower Home assistant theo thời gian tùy chỉnh

03/03/2025
431
Code sunsynk-power-flow-card cho luxpython – Home Assistant
Smart Home

Code sunsynk-power-flow-card cho lxp-bridge– Home Assistant

28/08/2024
197
Code sunsynk-power-flow-card cho luxpython – Home Assistant
Smart Home

Code sunsynk-power-flow-card cho luxpython – Home Assistant

03/03/2025
166

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

  • Trending
  • Bình luận
  • Mới nhất
Cách Active Windows 10 kích hoạt bản quyền số vĩnh viễn

Cách Active Windows 10 kích hoạt bản quyền số vĩnh viễn

02/09/2020
Khắc phục lỗi Wifi báo No Internet, Secured trên Windows 10 2004

Khắc phục lỗi Wifi báo No Internet, Secured trên Windows 10 2004

11/08/2020
Hướng dẫn cách cài lại Windows 10 từ ổ cứng chi tiết

Hướng dẫn cách cài lại Windows 10 từ ổ cứng chi tiết

30/07/2020
Hướng dẫn tải và cài đặt driver card màn hình VGA NVidia

Hướng dẫn tải và cài đặt driver card màn hình VGA NVidia

29/07/2020
Cách Active Windows 10 kích hoạt bản quyền số vĩnh viễn

Cách Active Windows 10 kích hoạt bản quyền số vĩnh viễn

49
Khắc phục lỗi Wifi báo No Internet, Secured trên Windows 10 2004

Khắc phục lỗi Wifi báo No Internet, Secured trên Windows 10 2004

18
Share plugin Elementor Pro v3.0.3 WordPress update liên tục

Share plugin Elementor Pro v3.0.3 WordPress update liên tục

17
Chia Sẻ Theme Newspaper By Tagdiv Update Liên Tục

Chia Sẻ Theme Newspaper By Tagdiv Update Liên Tục

10
Cài đặt Home Assistant

Code HASS – ESP32 kết nối BLE giám sát BMS JK

14/06/2025
FIX update, INSTALL package sau khi vòng đời CentOS 7 ngừng hỗ trợ

FIX update, INSTALL package sau khi vòng đời CentOS 7 ngừng hỗ trợ

22/04/2025
Code Pzem lên Hass Home Assistant ESPHOME

Code Pzem lên Hass Home Assistant ESPHOME

30/03/2025
Code sunsynk-power-flow-card cho luxpython – Home Assistant

Đưa thông tin Luxpower lên Home Assistant dùng LuxPython

30/03/2025

Cập nhật

Cài đặt Home Assistant

Code HASS – ESP32 kết nối BLE giám sát BMS JK

14/06/2025
2
FIX update, INSTALL package sau khi vòng đời CentOS 7 ngừng hỗ trợ

FIX update, INSTALL package sau khi vòng đời CentOS 7 ngừng hỗ trợ

22/04/2025
4
Code Pzem lên Hass Home Assistant ESPHOME

Code Pzem lên Hass Home Assistant ESPHOME

30/03/2025
7
Code sunsynk-power-flow-card cho luxpython – Home Assistant

Đưa thông tin Luxpower lên Home Assistant dùng LuxPython

30/03/2025
34
Cài đặt Home Assistant

Cài đặt Home Assistant

29/03/2025
8
Các câu lệnh xóa archive log trong Oracle

Check process ID từ port trong Linux, Solaris

01/11/2024
18
  • Liên Hệ
  • Giới thiệu
  • Chính sách bảo mật
SON

© 2020 bản quyền thuộc về SON

No Result
View All Result
  • Trang chủ
  • Smart Home
  • Máy Tính
  • Kiếm Tiền Online
  • Webmaster
  • WordPress
    • Plugin WordPress
    • Theme WordPress
    • Thủ Thuật WordPress
  • Điện Thoại

© 2020 bản quyền thuộc về SON