substitutions: name: seplos-bms device_description: "Monitor a Seplos BMS via RS485" external_components_source: github://syssi/esphome-seplos-bms@main tx_pin: GPIO4 rx_pin: GPIO5 esphome: name: ${name} comment: ${device_description} min_version: 2024.6.0 project: name: "syssi.esphome-seplos-bms" version: 1.2.0 esp8266: board: d1_mini external_components: - source: ${external_components_source} refresh: 0s wifi: ssid: !secret wifi_ssid password: !secret wifi_password ota: platform: esphome logger: level: DEBUG # If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component! # The native API has many advantages over MQTT: https://esphome.io/components/api.html#advantages-over-mqtt mqtt: broker: !secret mqtt_host username: !secret mqtt_username password: !secret mqtt_password id: mqtt_client # api: uart: id: uart_0 # Please set the default baudrate of your Seplos BMS model here. It's sometimes 19200 baud instead of 9600. baud_rate: 9600 tx_pin: ${tx_pin} rx_pin: ${rx_pin} # The increased RX buffer size is important because # the full BMS response must fit into the buffer rx_buffer_size: 384 seplos_modbus: id: modbus0 uart_id: uart_0 rx_timeout: 150ms seplos_bms: id: bms0 # Dip switch configuration of a single pack setup / address 0x0 # 8 7 6 5 4 3 2 1 # off, off, off, off, off, off, off, off address: 0x00 # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang) protocol_version: 0x20 seplos_modbus_id: modbus0 update_interval: 10s sensor: - platform: seplos_bms 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" temperature_1: name: "${name} temperature 1" temperature_2: name: "${name} temperature 2" temperature_3: name: "${name} temperature 3" temperature_4: name: "${name} temperature 4" temperature_5: name: "${name} environment temperature" temperature_6: name: "${name} mosfet temperature" total_voltage: name: "${name} total voltage" current: name: "${name} current" power: name: "${name} power" charging_power: name: "${name} charging power" discharging_power: name: "${name} discharging power" residual_capacity: name: "${name} residual capacity" battery_capacity: name: "${name} battery capacity" rated_capacity: name: "${name} rated capacity" state_of_charge: name: "${name} state of charge" charging_cycles: name: "${name} charging cycles" state_of_health: name: "${name} state of health" port_voltage: name: "${name} port voltage"