question

markus71 avatar image
markus71 asked

How can I forward Home consumption from OpenWB to Venus OS by MQTT?

Hi there,

I am new in this forum and i am from Germany. So please excuse my unsufficient english.


I am currently preparing to setup up a LiFePo4 - battary with an MP2 and a Raspi with Venus OS. The MP2 is ordered but not installed yet. I have already installed a Raspi with Venus OS and by now it shows only the production of my SMA Tri 25000.

If have also installed and OpenWB-Wallbox which can load my car with surplus from the solar production. Together with the wallboxes there has been installed the "OpenWB EVU-Kit"-Smartmeter which is basicly an Eastron SDM72D-N with a RS485 to LAN converter.

Because I already have the OpenWB-Smartmeter I don't want to buy an additional EM24. I have read, that the OpenWB can forward the home consumption to the Venus OS by MQTT, but I don't know how to do that and have found no tutorial for this. Can anyone help me to understand, how this must be done?

Thanks, Markus

Venus OSMQTT
2 |3000

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

6 Answers
hominidae avatar image
hominidae answered ·

I have a similar setup. What you are looking for is to keep the existing "EVU-Kit" from the openWB setup, which is the equivalent Grid-Meter (not home meter/consumption) for a victron ESS.

IMHO, and there have been discussions in the openWB forum as well, there is no alternative to installing a Grid-meter that is compatible with a victron GX setup.

In short: the old EVU-Kit has to go (with future Version 2.x of openWB Software you could puut it to re-use as a Home-consumption meter, later).

Edit: there is a possibility with an add-on in venus-OS, somewhere to be found, here in the modifications section of the forum, that would allow to use other meters than the carlo gavazzi line of meters. But again, thiss is not what you asked for.

Once this is done, the openWB setup for the EVU-Kit module can be configured to use the GX (as well as the battery storage (Speicher).

This is what I've done.

Also, I noticed that the GX does query the Grid Meter (EM24) more frequently (approx one per second), whilst openWB does this only every 10sec.

So even if what you are asking can be achieved, the resolution and quality of the grid-meter data from openWB will be reduced compred to the victron ESS standard. I actually don't know if this would have an impact on the functionality.

Edit: So I'd recommend to either go for an EM24 or use the modifications add-on for venus-os to use tge SDM as grid meter...do not use the openWB as grid metering source

P.S.: there is agerman speaking section here, in the victron forum, too.

2 |3000

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

Tom Büschgens avatar image
Tom Büschgens answered ·

As a general disclaimer:

Yes, this is possible, but the EM24 will be the more robust solution, as it does not include potential point of failure like Wifi, Network, the script got stuck etc.

In general you will have to turn to github to find possible solutions, like this one here: https://github.com/stormmurdoc/victron_sdm630_bridge

For openWB, the basic procedure would be:

  1. Setup an environment (python script, iobroker, nodered, etc) where you can subscribe to the relevant openWB MQTT topics required for this
  2. If required, compute missing values
  3. publish the required values either using MQTT-DBUS bridge or write them onto the DBUS directly - the linked solution will provide you some details about it

Also be aware that most solution will not survive a firmware upgrade of Venus OS, some even have problems when restarting the Raspberry.

Here some more links:

https://github.com/victronenergy/dbus-mqtt

https://github.com/victronenergy/venus/wiki

https://github.com/RalfZim/venus.dbus-fronius-smartmeter

For installations that I take care of (friends), I always go for the EM24. Any other solution will be more fragile - be prepared to got bug-hunting in the middle of the night, when a script went berzerk.

Just happened to me last week :-/


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 ·
...what about the different granularity of data (openWB does query/publish grid-meter data every 10 secs only, while a GX with EM24 will do that every second) when going that route...did you notice an impact on the ESS(GX..like not being able to sustain the desired grid-level consumptiion easily (more fluctuation)?
0 Likes 0 ·
Tom Büschgens avatar image Tom Büschgens hominidae commented ·
Hi @Hominidae ,

I for myself do not use this solution - I am using my fronius datamanger instead, which can be polled using either modbus or the fronius api once every second or so. So this works quite nicely.

But you are right: When the script hangs (or there is some network congestion), the ESS cannot maintain the set gridpoint anymore.

This is why I generally recommend to stick with the Victron solution - especially if people seem to be new to Linux, Venus OS or Programming.

For the not so faint of heart, the provided links should offer some guidance.

And again: It will never be a "turn-key" solution - but always very tailored. And fragile.

0 Likes 0 ·
hominidae avatar image hominidae Tom Büschgens commented ·
..exactly my thinking and the reason I went for the EM24 as well (luckily I was able to procure one...availability is scarce these days, as it seems).
0 Likes 0 ·
Tom Büschgens avatar image
Tom Büschgens answered ·

Hi @Markus71 ,

searching the Forum (Space: Modifications) I probably found your solution - under the assumption that the SMD720D-N is "outside" the openWB and cann be adressed / polled directly:

https://community.victronenergy.com/idea/114716/power-meter-lib-for-modbus-rtu-based-meters-from-a.html

Give it a try. Won't become easier than following that thread, i guess.

2 |3000

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

markus71 avatar image
markus71 answered ·

Thanks guys for so many quick answers. After reading everything I have decided, that it will be the better way for me to replace the OpenWB-Kit by an EM24. I need a stabile running system and don't want to fix stuff after each update of venus OS.


Do you have a recommendation, if I should go for either the lan- or the rs485-version of the EM24? Both would be possible because I have lan access at the place, where the EM24 will be installed. The rs485 version seems more safe for me because it does not depend on the Netwerk. Does the lan-version have other advantages?

4 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.

Ein EM24 ist derzeit schwer zu bekommen. Als Alternative bietet sich das ABB B23 an, weil auf dem Markt besser verfügbar: https://www.victronenergy.de/upload/documents/Datasheet-Energy-Meters-Selection-Guide-EN-.pdf

bzw: https://www.victronenergy.com/media/pg/Energy_Meter_ABB_B21_B23_and_B24/en/index-en.html

0 Likes 0 ·
Show more comments
hominidae avatar image hominidae commented ·

@Markus71 jemand drüben im openWB Forum hat gerade einen Flow in Node-red gebaut, der das Standard EVU-Kit in einen EM24 "verwandeln" kann https://openwb.de/forum/viewtopic.php?f=8&t=6066&p=74632#p74632

0 Likes 0 ·
markus71 avatar image
markus71 answered ·

Ich habe wirklich noch Zeit, bis meine Zellen da sind. Also mal angenommen, der EM24 wäre verfügbar, dann Frage wie oben.

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 answered ·

Wenn Du den EM24 oder den ABB (Edit: OK, beim ABB weiss ich es nicht genau...muss openWB-seitig evtl. angepasst werden) installierst (mit dem victron GX verbindest und aktivierst), kann openWB den direkt verwenden...EVU-Modul Victron GX ....Speicher Modul ebenso. Das alte EVU-Modul kann dann raus oder später als Hausverbrauch eingebaut werden (oenWB V2 kann weitere Zäher, die aktuelle 1.9x berechnet den Hausverbrauch intern.

edit: Achso, Du willst ja VenusOS aufm RPi...dann wird/ist der RPi Dein GX.

Aber das ist eher was fürs openWB forum, hmmm?

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