Hi All,
I would like to share my knowledge regarding Daly BMS that have UART functionality to be integrated using ESP base board (NodeMCU) to Home Assistant.
List of guide and links that I use to make it happen. Credit to them!
For starters, below is the list of items that needed:
-
Daly BMS (with UART) sometimes they share it with Bluetooth port
-
ESP base board (I’m using NodeMCU ESP32)
-
PH2.0 Mini Micro JST 2.0 Connector (The connector may vary base on BMS model)
Wiring
-
Cut the dupont Male connector
-
Strip the cable and plug into the Wire Connector
- Base on the guide, we need to plug the RX, TX, 3.3V and GND, but in my case i just need RX, TX and GND. I have issues when connecting the 3.3V it wont boot. My NodeMCU ESP32 will be powered from the standard Micro USB.
- For extra precautions, i did a continuity test using my multi-meter end to end of the wiring. This should be compulsory for those who have a multi-meter.
ESPHome Configuration
- Below is the yaml config file for my setup. Do note that this is for NodeMCU ESP32. You may refer to ESPHome Daly BMS for ESP8266
#General
esphome:
name: hall-daly-bms
esp32:
board: nodemcu-32s
#Logging
logger:
level: DEBUG
baud_rate: 0
#Network
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 172.16.0.14
gateway: 172.16.0.1
subnet: 255.255.255.128
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp-Demo Fallback Hotspot"
password: "11sOsn77e2G1"
#Sensor
sensor:
- platform: daly_bms
voltage:
name: "Battery Voltage"
current:
name: "Battery Current"
battery_level:
name: "Battery Level"
max_cell_voltage:
name: "Max Cell Voltage"
max_cell_voltage_number:
name: "Max Cell Voltage Number"
min_cell_voltage:
name: "Min Cell Voltage"
min_cell_voltage_number:
name: "Min Cell Voltage Number"
max_temperature:
name: "Max Temperature"
max_temperature_probe_number:
name: "Max Temperature Probe Number"
min_temperature:
name: "Min Temperature"
min_temperature_probe_number:
name: "Min Temperature Probe Number"
remaining_capacity:
name: "Remaining Capacity"
cells_number:
name: "Cells Number"
temperature_1:
name: "Temperature 1"
temperature_2:
name: "Temperature 2"
#Binary Sensor
binary_sensor:
- platform: daly_bms
charging_mos_enabled:
name: "Charging MOS"
discharging_mos_enabled:
name: "Discharging MOS"
#UART
uart:
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 9600
daly_bms:
update_interval: 20s
text_sensor:
- platform: daly_bms
status:
name: "BMS Status"
#Others
api:
ota:
- Update - yaml config with my ESP8266
#General
esphome:
name: yard-esp8266-multisensor
platform: ESP8266
board: nodemcuv2
#Logging
logger:
level: DEBUG
baud_rate: 0
#Network
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 172.16.0.16
gateway: 172.16.0.1
subnet: 255.255.255.128
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp-Demo Fallback Hotspot"
password: "11sOsn77e2G1"
#i2c
i2c:
sda: 4
scl: 5
#Sensor
sensor:
- platform: daly_bms
voltage:
name: "BMS Battery Voltage"
current:
name: "BMS Battery Current"
battery_level:
name: "BMS Battery Level"
max_cell_voltage:
name: "BMS Max Cell Voltage"
max_cell_voltage_number:
name: "BMS Max Cell Voltage Number"
min_cell_voltage:
name: "BMS Min Cell Voltage"
min_cell_voltage_number:
name: "BMS Min Cell Voltage Number"
max_temperature:
name: "BMS Max Temperature"
max_temperature_probe_number:
name: "BMS Max Temperature Probe Number"
min_temperature:
name: "BMS Min Temperature"
min_temperature_probe_number:
name: "BMS Min Temperature Probe Number"
remaining_capacity:
name: "BMS Remaining Capacity"
cells_number:
name: "BMS Cells Number"
temperature_1:
name: "BMS Temperature 1"
temperature_2:
name: "BMS Temperature 2"
- platform: bmp280
temperature:
name: "yard-esp8266-multisensor BMP280 Temperature"
oversampling: 2x
pressure:
name: "yard-esp8266-multisensor BMP280 Pressure"
address: 0x76
update_interval: 15s
- platform: dht
model: DHT22_TYPE2
pin: 13
temperature:
name: "yard-esp8266-multisensor DHT22 Temperature"
# filters:
# - calibrate_linear:
# - 0.0 -> 0.0
# - 20.0 -> 19.0
# - 23.0 -> 21.9
# - 27.0 -> 25.7
# - 31.0 -> 29.7
humidity:
name: "yard-esp8266-multisensor DHT22 Humidity"
update_interval: 15s
- platform: wifi_signal
name: "yard-esp8266-multisensor RSI"
update_interval: 15s
#Binary Sensor
binary_sensor:
- platform: gpio
pin: 12
name: "yard-esp8266-multisensor AM312 PIR"
device_class: motion
- platform: daly_bms
charging_mos_enabled:
name: "BMS Charging MOS"
discharging_mos_enabled:
name: "BMS Discharging MOS"
#UART
uart:
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 9600
daly_bms:
update_interval: 20s
text_sensor:
- platform: daly_bms
status:
name: "BMS Status"
#Others
api:
ota:
-
Flash it with any mean necessary (I’m using ESPHome-Flasher)
-
Add it in your HA environment, in the Integration (ESPHome)
-
Done!
List of sensor