Battery Monitor

I have an off-grid solar system installed at my house. I have software running on a pi that gets data (Power, Volts, Amps, etc.) from the inverter and writes it to a mySQL database. I have Home Assistant running on a separate pi reading the data from the mySQL DB.

My problem is, there are no comms between my battery and my inverter, so the battery State of Charge of the battery is unknown. I only get the voltage of the battery from the inverter, which is not accurate. I am looking for a way to get an accurate SOC from the battery and displaying it in HA.

First option will be if there is a way to read the data from the integrated BMS of the battery. Thus far I have not been successful to do this. I have a Narada 48v 100ah Lithium ion Battery.

Second option is to install a third party Battery Monitor that calculate the state of charge and then sending the info to HA. Is there such a third party Battery Monitor available on the market.

1 Like

Hi Eric, did you get a solution for this? I am looking for same also

Hi,

Unfortunately I did not get a solution. I have subsequently sold my Narada battery, so I don’t need this anymore. However, the Narada battery does have a RS-485 port. If you can get or figure out the Modbus configuration, it might be a solution to get the data from the battery.

I will try and assist you of you want to give this a try

i have this problem but with esp and rs485 convert read data but
code :

esphome:
name: solar-inverter-esp32

esp32:
board: esp32dev

#////////Enable logging////////////
logger:
level: DEBUG
baud_rate: 0

#//////////////Enable Home Assistant API/////////////
api:
encryption:
key: “”
#//////////OTA/////////////
ota:
password: “”
#//////////WiFi//////////////
wifi:
ssid: Home WiFi
password: Home5642096

#////////////fallback hotspot///////////
ap:
ssid: “Narada-Bms Hotspot”
password: “internetit”
#/////////mqtt//////////
mqtt:
broker: 192.168.101.253
username: bms
password: internetit

#////////uart////////////

captive_portal:
uart:
id: uart_bus
tx_pin: GPIO19
rx_pin: GPIO18
baud_rate: 9600
data_bits: 8
stop_bits: 1

#////////////modbus//////////

modbus:
id: modbus1
flow_control_pin: GPIO4
uart_id: uart_bus
send_wait_time: 500ms

modbus_controller:

  • id: epever
    address: 0x01 ## address of the ModBUS slave device on the bus
    modbus_id: modbus1
    command_throttle: 200ms
    setup_priority: -10
    update_interval: 10s

#//////////////Sensor/////////////////////////
sensor:
#//////////Cell Volte////////////////////////

  • platform: modbus_controller
    modbus_controller_id: epever
    id: cell_volte_15
    name: “Cell Volte 15”
    address: 0x101C
    unit_of_measurement: “V” ## for any other unit the value is returned in minutes
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    • multiply: 0.01
      #///////////////////Cell Temp/////////////////
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 0”
    id: cell_temp_0
    register_type: holding
    address: 0x101E
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 1”
    id: cell_temp_1
    register_type: holding
    address: 0x101F
    unit_of_measurement: “C”
    value_type: FP32
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 2”
    id: cell_temp_2
    register_type: holding
    address: 0x1020
    unit_of_measurement: “C”
    value_type: FP32
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 3”
    id: cell_temp_3
    register_type: holding
    address: 0x1021
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 4”
    id: cell_temp_4
    register_type: holding
    address: 0x1022
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 5”
    id: cell_temp_5
    register_type: holding
    address: 0x1023
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 6”
    id: cell_temp_6
    register_type: holding
    address: 0x1024
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 7”
    id: cell_temp_7
    register_type: holding
    address: 0x1025
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 8”
    id: cell_temp_8
    register_type: holding
    address: 0x1026
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 9”
    id: cell_temp_9
    register_type: holding
    address: 0x1027
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 10”
    id: cell_temp_10
    register_type: holding
    address: 0x1028
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 11”
    id: cell_temp_11
    register_type: holding
    address: 0x1029
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 12”
    id: cell_temp_12
    register_type: holding
    address: 0x102A
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 13”
    id: cell_temp_13
    register_type: holding
    address: 0x102B
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 14”
    id: cell_temp_14
    register_type: holding
    address: 0x102C
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Temp 15”
    id: cell_temp_15
    register_type: holding
    address: 0x102D
    unit_of_measurement: “C”
    value_type: U_WORD

#///////////////Cell D/////////////

  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Remain Capacity”
    id: remain_capacity
    register_type: holding
    address: 0x1001
    unit_of_measurement: “AH”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Average Cell Temp”
    id: average_cell_temp
    register_type: holding
    address: 0x1002
    unit_of_measurement: “C”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Current Battery”
    id: current_battery
    register_type: holding
    address: 0x1000
    unit_of_measurement: “AH”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Cell Number”
    id: cell_number
    register_type: holding
    address: 0x100C
    unit_of_measurement: “#”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Full Capacity”
    id: full_capacity
    register_type: holding
    address: 0x102E
    unit_of_measurement: “AH”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Remain Charge Time”
    id: remain_charge_time
    register_type: holding
    address: 0x102F
    unit_of_measurement: “Min”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “Remain Discharge Time”
    id: remain_discharge_time
    register_type: holding
    address: 0x1030
    unit_of_measurement: “Min”
    value_type: U_WORD
  • platform: modbus_controller
    modbus_controller_id: epever
    name: “BMS PCB TEmp”
    id: bms_pcb_temp
    register_type: holding
    address: 0x100A
    unit_of_measurement: “C”
    value_type: U_WORD

#////////////Binary Sensor////////////////////
binary_sensor:

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Env T
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1003

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Woening Flag
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1004

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Protection Flag
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1005

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Fault/Status
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1006

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Soc
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1007

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Circulate Number
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1008

  • platform: modbus_controller
    modbus_controller_id: epever
    name: SOH
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1009

  • platform: modbus_controller
    modbus_controller_id: epever
    name: Cell UV State
    entity_category: diagnostic
    device_class: problem
    register_type: read
    address: 0X1031

#////////////Text Sensor//////////////////////

#////////////////Switch///////////////////////

#/////////////Number/////////////////////////

#/////////////Output////////////////////////

#/////////////web Server/////////////////////
web_server:
port: 80
auth:
username: admin
password: internetit