question

ds1707 avatar image
ds1707 asked

MQTT Battery history energy values

Hello guys,

I wanted to have some battery statistics also in my home assistant (Energy from battery / Energy into battery).

I tried it with the following MQTT topics and expected a kWh Counter, but those values are quite too high.

N/XXXX/battery/512/History/ChargedEnergy

N/XXXX/battery/512/History/DischargedEnergy

Can anyone help me and explain what is the unit behind those topics?

Is there any documentation on this?

Thank you, best Regards, Dominik

VRMMQTT
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
sorinpopa avatar image
sorinpopa answered ·

Hi. I was looking for the same data, but couldn't find anything in the MQTT topics.

In my case the History topic is actually empty.

The solution for me will be to calculate this data using my domoticz installation. Using MQTT and nodered I will update a virtual energy counter in domoticz, which will result in exactly what I'm looking for...

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

JohnC avatar image
JohnC answered ·

Hi @ds1707

You don't say what device you're looking at, but seems like a shunt. Those values are indeed kWh, and cumulative back to the date they were last reset, There's some pics here, but not much explanation.. https://www.victronenergy.com/media/pg/VictronConnect_Manual/en/application-overview.html

Maybe try the product manual for more.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ds1707 avatar image ds1707 commented ·

Hello,

Sorry, the deivce is a battery with Seplos BMS connected to CAN.

I also thought those were kWh, but the values are much too high, compared to the VRM Portal. That's confusing me..

0 Likes 0 ·
Mike Weerdenburg avatar image
Mike Weerdenburg answered ·

You can find more info in the excel sheet "CCGX-Modbus-TCP-register-list-2.90", the mqtt path can be found in column "dbus-obj-path" and don't forget to apply the "Scalefactor". In this case (for ChargedEnergy andDischargedEnergy) 10, so you need to divide the values by 10.


It can also be that your battery doesn't provide this data and it will return 0 or some default fixed value.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Thomas avatar image
Thomas answered ·

I'm using a Pylontech battery and the MQTT topics are

1679685751780.png

I think it depends on the battery / BMS if this data is available.


1679685751780.png (5.1 KiB)
3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

hominidae avatar image hominidae commented ·

same here. Luckly my EV-Wallbox keeps track of this and reports back via mqtt as well ;-)

I am using these to feed it into my TIG stack in my NAS.

1679689299229.png

0 Likes 0 ·
1679689299229.png (160.9 KiB)
Show more comments