Hi,
My house is equipped with an own developed energy meter
At this moment I have made it such that the energy-meter communicates via MQTT to listeners in my network.
Now I want to setup my Victron Multiplus II GX as ESS, which requires the Multiplus to receive the MQTT messages for current and voltages as well.
You are saying that you’ve developed yourself the energy meter that is capable of MQTT communication.
Also, you are saying that Multiplus requires MQTT messages for V and A.
Why not add to the energy meter firmware the necessary modification for also sending this V and A info?
Or maybe I don’t understand the “read-between-the-lines” question?..
I have indeed developed myself an energy meter, which measures voltages, currents, phase-shifts, disturbances/harmonics, etc of all 3 incoming phases. This meter is located in another building as the Victron Multiplus. But both are on the same internal internet network.
I can modify the firmware of the energy meter in any way I like.
The question is: what modification is needed to make the Victron have access to the information?
I was looking at the “Wireless AC sensors” in the settings of Victron, but it states “no gateway”. So it seems I have to build a “gateway”.
My first proposed solution was to create some electronics that will receive the MQTT from the energy meter via the Ethernet network and convert this to an electrical signal, which I can apply via a cable to either the Modbus or the CAN-bus of the Victron Multiplus.
I have written some Python to emulate a Carlo Gavazzi EM530/540 energy meter that responds just like the real thing, except that it is ModbusRTU over Ethernet (no RS-485). However, to use this code on my Cerbo, I have to install some scripts that make a tty device that connects to the TCP/IP port using socat. It is a little complicated but it works for me.
One approach you could take is to “fill in the blanks” for an emulated device with the values from your custom power meter. Just gather the MQTT values from what you have broadcasting.
A ready-made alternative is dbus-mqtt-grid, which reads meter data from an external MQTT server in a specific JSON format.
So you would modify your firmware to (additionally) publish in that format and bob’s your uncle.
I’ve succesfully used this to integrate my utilities’ meter.
Note that contrary to the “minimal example” given in the README, I needed to provide “power” values for all three phases for VenusOS to be happy.