Skip to content

VE.Direct Interface

Manos1966 edited this page Sep 24, 2024 · 25 revisions

Canonical Documenation

Please consult the documentation.


Original Victron VE.Direct Cable with Fusion V2 mit CAN / Iso Shield

Cables The pin header is an off-the-shelf JST PH 2.0 4-pin header, often called "4Pin MiniMicro JST 2.0 PH". It is easy to source just the plug (Male and Female).
It might be easier to buy an original VE.Direct cable, slice the cable, and wire its individual wires up to the ESP32.
WARNING #1: The original Victron cable without slicing will NOT work with Fusion V2 mit CAN / Iso Shield (more explanations below).

WARNING #2: VE.Direct cable colors. Beware that the wire colors in VE.Direct cables may be misleading: Red might be GND, black might be VCC, and the other two change their meaning on one end of the cable versus the other end, as the cable is a "cross-over" cable. Test each wire and confirm to which pin it connects, e.g., using a multimeter.

This is the usion V2 mit CAN / Iso Shield board:
OpenDTU-Fusion CAN

and these the Victron PINs
Victron PINS

The TRANSMIT (TX) from Victron MPTT has to go to RECEIVE (RX) of the Fusion V2 CAN / Iso Shield.

Inside the original Victron cable however, the TX/RX are already switched (crossover cable)
You cable colors may look different in the below example but you can still see the difference between a self-made cable and an original:
t

This means, if you are using an original Victron VE.Direct cable, the TX from Victron MPTT has to go to the TX of the auf die Fusion V2 CAN / Iso Shield
and the RX from Victron MPTT has to go to the RX of the auf die Fusion V2 CAN / Iso Shield


Victron VE.Direct emulator for Linux

Hello everybody,

I created a ve.direct emulator as a small script for Linux.

It does exactly what the BlueSolar 75/15 MPPT controller does, it sends (to serial/USB port, terminal, ...) a data frame every 1s incl. checksum.

This might be interesting for people developing a display of some sorts and have no access to a controller, for whatever reason.

Values sent are somewhat randomized (for a good reason) but can be adjusted in the script.

Link to the GitHub repo: https://github.com/anju0001/ve.direct

I hope it is of some use to people.

Bye Andreas

This repo contains a simple BASH script to emulate a Victron BlueSolar 75/15 MPPT charger. These solar chargers send a text data frame every second with certain values like solar voltage and others. For development of a display to show me these values, I needed an emulator because my solar controller was mounted in a shed. So this script was born :) You can modify the parameters sent to fit your controller (maybe change the PID then as well). Only a few command line tools like shuf and stty are needed. The script also calculates the checksum for each frame. Uses the serial interface as parameter, e.g.

./victron_emulator.sh /dev/ttyUSB1

./victron_emulator.sh /dev/serial1

If called without parameter for serial interface, it will output the data frame on screen. Be aware, that the checksum value is not always a printable ASCII character and might be a terminal control character and mess up/freeze your terminal ;) Use at your own risk, think about voltage levels (TTL, RS232, ...) if you intend to use this to connect the interface to any hardware device!


IF the command: ascii -t "$CHAR"|head -n1|cut -d' ' -f4

returns Command 'ascii' not found, it can be installed with: sudo apt install ascii

THIS IS WORKING on the RASPI2** cd VICTRON/ ./victron_emulator.sh /dev/serial0

Troubleshooting

  • Make sure that the VE.Direct socket is not assigned an alternative function. Example: MPPT charge controllers can be configured to output a PWM signal.
  • MPPT charge controllers need to be able to source power from the battery at night, otherwise they are off and will not send messages.
Clone this wiki locally