How to get Total Charge/Discharge from MQTT

Hi,

I was able to connect Victron MQTT to home assistant to read some battery and VE.bus details. Is it possible to get total charge/discharge we see in dashboard?

I have been using below REST API to get this, but i was wonder if i can achieve the same using MQTT (then no need to use API):slight_smile:

curl -X GET “https://vrmapi.victronenergy.com/v2/installations/XXX/stats?interval=days&start={{ now().replace(hour=0, minute=0, second=0, microsecond=0).timestamp() | int }}&type=live_feed_kwh”

what do you exactly mean with total charge? Could you send a screenshot?

Victron has its own integration for Home Assistant.
The energy panel can get data that way.

see attached:

I have used that Home Assistant add-on and its not showing total charge/discharge.

Select a range, one day, one month, and you get the totals?

Can you send me integration you have used pls?

This one:

Could you send the link to integration pls? Hard to figure out from the screenshot. Tnx

id say this is calculated somehow in VRM

In my case, it ist not really exact

But as you have the main power meter readings somewhere in HA, it should be easy to calculate these values?

(I don´t have HA, bt calculate them myself in a batch script)

If I may,

I’d rather go with this Victron itegration : GitHub - tomer-w/ha-victron-mqtt: Home Assistant Victron integration based on MQTT

Way more info and for sure more up to date compared to the other integration mentioned above. I recently switched to the mqtt one.