question

rares-vasilescu avatar image
rares-vasilescu asked

Victron info in Home Assistant Energy dashboard

With the new release of the Energy dashboard in Home Assistant, I've been trying to surface the Victron data into it.

But I'm using modbus TCP to get data from my installation (through the Venus GX).. and those sensors apparently don't have the state_class attribute defined for them (which is ok i guess, as modbus is a generic protocol) but i also can't add such in the modbus sensor configuration in HA.. so this does not work. Link https://www.home-assistant.io/more-info/statistics/

Is there any other way (than using modbus) to get information from Venus GX in a way it would be useful in the Energy dashboard from Home Assistant?

Venus GX - VGXModbus TCPhome assistant
2 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.

johan-anderholm avatar image johan-anderholm commented ·

I have integrated the "life time total" (i.e. total energy generated in kWh) of my SmartSolar, and Energy from Grid input of my multiplus, using mqtt, but it should be possible using modbus too.

What I needed to do was add "last_reset" to "1970-01-01T00:00:00+00:00". This can be done in Configuration->Customizations (at the bottom). I believe you can change the other attributes you need too. Make sure to look in your log after restarting home assistant since there is a configuration that must be added which will be reported there.

It is also possible to use the "Riemann sum integral" integration to create an energy sensor out of any power sensor as long as it is sampled often enough.

I should note that my integration of the Grid input probably is not that great since it is using the riemann sum of the input power. It would be better if there was an actual energy measurement calculated directly in the multiplus. If someone knows if there is please let me know!

0 Likes 0 ·
rares-vasilescu avatar image rares-vasilescu johan-anderholm commented ·
Excellent suggestion to use that integration to compute Energy from Power. Thank you.
0 Likes 0 ·
3 Answers
rares-vasilescu avatar image
rares-vasilescu answered ·

As with the Home Assistant September 2021 release, there is support for state_class in sensors coming from modbus and therefore enabled me to configure this:

      - name: Solar Yield Today
        unit_of_measurement: "kWh"
        slave: 245
        address: 784
        scale: 0.1
        device_class: energy
        state_class: total_increasing

But this is the only "Energy" (Wh) measurement i can get from the Victron system. I tried others (eg: to see how much energy comes out of battery or from the grid itself) but i could not make them work. So probably i need to use the Riemann sum integral to estimate those.

2 |3000

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

David Borg avatar image
David Borg answered ·

I have some data from my Victron system, but can not get the battery kwh to work?1665504848064.png


1665504848064.png (125.5 KiB)
2 |3000

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

daba avatar image
daba answered ·

DAvid, could you share your sensors.yaml and modbus.yaml ?and another question, do you habe a ESS Systems with 3~ ?


2 |3000

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

Related Resources

Modbus TCP Basics

Venus GX manual

Venus GX product page

Additional resources still need to be added for this topic