Victron integrated with HA and EMHASS - My Single Guide

Hi! I’ve just got a Victron solar system installed and am looking at integrating it into my HA install…

I’ve been a developer for 20+ years but I’m pretty new to HA and very new to Victron.

I’m trying to understand the best way to integrate my Victron system into HA… I’m mainly interested in reading values from Victron and outputting HA dashboards and potentially using them as triggers to turn things on and off for now. In future I might have use-cases where I want to write to the Victron but I don’t know what they are…

I see a few different approaches to integrating with Victron… Can anyone give an overview of the pros and cons of hass-victron vs ha-victron-mqtt?

I also came across the possibility of installing node-red on the cerbo gx - is that something that would help with HA integration or is it orthogonal?

Thanks for any insight :slight_smile:

To read data via MQTT from different sources in HA, you need to have only one MQTT server for all entities. This means that if there is a Victron MQTT server, you need to configure zigbee2mqtt to use the Victron server IP address. I don’t use zigbee2mqtt. I don’t know what configuration options it has. However, I have another device where I use mqtt and I had to configure it to the Victron server IP address.

don’t create another mqtt server. that’s like connecting to 2 APs at the same time with one wifi client

Hi @vitch77 , both modbus and mqtt are valid protocols to grab data from Victron. The hass-victron integration is quite popular and exists for some time, so there are already lot of different sensors defined over there. It uses modbus protocol under the hood. The ha-victron-mqtt (which I’m the author of) is newer one so there is much less sensors exposed till now, although people started to add more. The benefit of mqtt is that it is enabled by default and push information in near real time vs, the modbus approach which you need to pull everything every few seconds. I cant say that there is huge benefit one or the other. I created the mqtt one as this is more modern protocol and there were so many people trying to connect to victron via mqtt which was very complex till I created this integration.

Hope it helps.

1 Like

@marek76, zigbee2mqtt is not related to the Victron case at all to the best of my understanding. The ha-victron-mqtt integration is connecting directly to the Victron Cerbo GX built-in mqtt server. It does not require any local mqtt server (like the mosquitto add-on) and there is no zigbee involved whatsoever.

Hi @tomer-w, I decided to give ha-victron-mqtt a go and it’s looking great so far - thank you!

Do you have any suggestions for integrating it into the HA energy dashboard or any example dashboards which display the data nicely?

Hi @vitch77, I actually just started to play with one . But I didn’t have time to fully configuired it to my needs. If you do make progress with it, I am sure more people will want to see a sample.

That looks pretty cool!

I was thinking something simpler at first… I need to identify the relevant entities to add to the built in energy dashboard in HA…

I have 7 devices and 70 entities within this integration:

My setup is a little complex:

  • 3-phase power so 3xMultiPlus-II
  • some “legacy” solar with it’s own inverter on the a/c side of things
  • Batteries
  • An extra energy meter which should be measuring power to / from the grid

Do you have any pointers as to how I should wire this in?

Hi @kc_au, just wanted to add my immense thanks for your efforts on this. One of the very few times I just follow the instructions and everything goes to plan!! Really nice work. My future electricty bills thank you.

For anyone trying to adapt this guide to Dutch or Belgian dynamic contracts — EMHASS works well but getting EPEX prices wired in correctly adds some friction, especially on 3-phase setups.

I am building an energy intelligence platform and running a pilot of a battery dispatch service specifically for NL EPEX prices + Victron ESS. The output is a daily schedule that can go into the Cerbo GX via MQTT — similar plumbing to what’s described in this guide. I am still in early testing and looking for a small number of NL Victron owners to try it. If you’re interested, reach out directly.