Victron is building wonderful devices for Solar systems. Some of the devices have a VE.Direct interface and Victron disclosed the protocol.
I do own 2 MPTT75/15 Solar charger and all that I was missing was a MQTT interface for monitoring. I do NOT plan or intend to augment or replace the, in my eyes, perfect bluetooth app.
So here it is
VE.Direct2MQTT is using an ESP32 developers board and the Arduino IDE to send all ASCII data coming from a VE.Direct device to a MQTT server.
With the help of the MQTT server you can integrate the monitoring data to virtually any Home Automation System.
- Listen to VE.Direct messages and publish a block (consisting of several key-value pairs) to a MQTT broker
Every key from the device will be appended to the MQTT_PREFIX and build a topic. e.g. MQTT_PREFIX="/MPPT"; Topic /MPPT/V will contain the Battery Voltage
so please see the VE.Direct protocol for the meaning of topics - SSL enabled
If you are sending messages over the internet or using User/Passwords over the Internet you have to use SSL.
If you are using a locally protected network you can disable the Usage of SSL in the config file - Have several WiFi SSID's to connect to, in case one or the other is not reachable from your position
- Have sveral MQTT Servers in case one is down.
The system will only be bound to one MQTT server at a time - Have several OneWire temperature sensors
So you can see the temperature of e.g. the MPPT Solracharger or the batteries or your inverter, ... - Timing parameters can be changed via MQTT
E.g. you can set that VE.Direct blocks are only transmitted every 10 seconds. The last received block will be transmitted, all other blocks are lost - OTA (Over The Air Update)
If you have a webserver where you can put binary files on and run php scripts you can use that server to install new VE.Direct2MQTT software on your ESP32
Please make sure that you use SSL and User/Password - One config file to enable/disable features and configure serial port or MQTT Topics
- VE.Direct2MQTT is only listening to messages of the VE.Direct device
It understands only the "ASCII" part of the protocol that is only good to receive a set of values. You can't request any special data or change any parameters of the VE.Direct device.
This is intentionally because this is monitoring only - If you transmit a block only every 10 seconds, 9 previous blocks will be lost, because VE.Direct devices publish every second
This is normally not a problem. - During sending OneWire Data or OTA checking, no VE.Direct blocks will be sent.
This is a limitation of the ESP32, having several tasks tranmitting in parallel caused crashes of the device
I WILL NOT BE HELD LIABLE FOR ANY DAMAGE THAT YOU DO TO YOU OR ONE OF YOUR DEVICES.