Pushing Victron solar data over MQTT

Get detailed solar statistics from your victron system into home assistant!

Pushing Victron solar data over MQTT
Photo by Andreas Gücklhorn / Unsplash

Victron solar charge controllers use their own open-source ve.direct protocol to send solar data back to their different controllers like the Cerbo GX.

This is in reality a UART bus that we could for example connect to a raspberry pi. I decided to write some code to do just that.

GitHub - metrafonic/asyncio-vedirect-mqtt: Publish serial data from ve.direct to an MQTT broker
Publish serial data from ve.direct to an MQTT broker - GitHub - metrafonic/asyncio-vedirect-mqtt: Publish serial data from ve.direct to an MQTT broker

The data is published according to the Home Assistant MQTT Discovery specification. This allows the device to be auto-discovered in home assistant.

MQTT Discovery
Instructions on how to setup MQTT Discovery within Home Assistant.

You will have to make your own cable for this. Connect GND, TX and RX to the pi. Do not connect the 5V pin. I used a logic level shifter between the pi and smartsolar controller just to be safe.

I have this running on a raspberry pi zero, which consumes less than 100mA.

Let me know what you think!