patman15 / BMS_BLE-HA

This integration allows to monitor Bluetooth Low Energy (BLE) battery management systems (BMS) from within Home Assistant.
GNU Lesser General Public License v2.1
26 stars 4 forks source link

JK BMS - is the remaining capacity supported by this BMS-BLE HA integration ? #43

Closed typxxi closed 1 month ago

typxxi commented 1 month ago

Checklist

Describe the issue

I am still using BAT-MON and I have checked the docs, but wanna move ahead cause I have a JK V15 inverter BMS and that BAT MON is not showing the remaining capacity which is shown in the JK Windows app.

Therefore I am asking if that item is part of your integration or not?

Due to the missing discussion page I had to put it here under "issues" even though it might not being one or maybe only one of the documentation or that I have overlooked it.

image

To make it clear: I want the genuine BMS data and not aggregated ones like Wh if someone things that the equivalent to "remaining capacity [Ah]" would be the same like or similiar to "stored energy [Wh] currently stored energy"

It is not, therefore I am asking how to get this specific value "remaining capacity [Ah]" which is different to energy stored cause Voltages has an impact too which can itself depends a bit on temperature and what not.

patman15 commented 1 month ago

You can get exactly this value by using a template sensor with a value template {{ float(states("sensor.smartbat_..._stored_energy"))/float(states("sensor.smartbat_..._voltage")) }}

Due to the missing discussion page I had to put it here under "issues" even though it might not being one or maybe only one of the documentation or that I have overlooked it.

No worries, available information is listed in the README.

typxxi commented 1 month ago

thanks a lot.

Of cause kWh / voltage gives me Ah but I had assumed that it would be "available" as it is in the JK BMS out of the box. But your solution is good and will do what I want / need.

I have opened a new question about a migration path from old bat mon to your bat mon - maybe you have a suggestion that can make it easier ?

FINALLY: I have started reading the README part where i had missed the cellvoltages and what not till I found the solution here in an example which has a typo you can easily fix.

"{{ iif(has_value("sensor.smartbat_..._delta_voltage"), state_attr("sensor.smartbat_..._delta_voltage", "cell_voltages")[0], None) }}"

You can remove the second i in the beginning from iif cause I bet you meant if

patman15 commented 1 month ago

Home Assistant does not provide a native sensor with Ah as unit. Thus, I expose only the Wh one.

The double I in the iif is actually correct for templating.

Will have a look at your other question later.

typxxi commented 1 month ago

``

The double I in the iif is actually correct for templating.

Great, but I have never seen that before and therefore assumed a mistake. Lesson learned.