300A SmartShunt and VE.Direct to USB

Hello all,

I have the smart shunt 300a and a ve.direct to usb cable connecting to my Windows 11 PC. It works perfectly. No issues.

I’d like to interface the data myself to pull it into another application. If I’m reading the programming page right at VictronEnergy I don’t think they have a way to talk directly to the smart shunt with custom software? Is there a way I can talk to the victron connect software package to get the information I need?

I’m basically looking to write a small monitoring app, that will just display the basic information about the state of the battery. Their application gives me what I need, but the window is awful big to leave on the screen all the time. I could write something much more small and compact.

Thanks for any tips/suggestions!

Here are some links:

1 Like

Thanks Rick, this is some helpful information! Can you confirm if the SmartShunt 300A supports any of this? I don’t actually see it in the list, and I’m not sure if that means it isn’t supported or if perhaps the document just needs updated to add the 300a (The 500A is on the list).

I can fight my way through python so I will look at that code, but it appears to be Linux specific (the whole virtual com port interface part), so I’ll need to figure that part out as well! I’m not sure if windoze can even do that sort of thing!

Thank again for any help!

I cannot confirm it, but the SmartShunts all work the same.
Victron will have to tell us what the assigned Product ID for the 300A model is.
Or maybe they will update the document..

On Windows, the USB VE.Direct device might just show up as a standard COM port, check Device Manager to see if it does. If so, then you just have to use “COM28” or whatever is assigned and talk the protocol.

Rick, I got it to work. The 300 is supported it would seem! Thanks again!

I fed co-pilot the documents you linked and asked it to get me started. Then I asked it to update it to windows… Seems to be working, I’m getting data on teh screen like every second:

import serial

def read_vedirect(port='COM3', baudrate=19200):
    """
    Reads data from a VE.Direct device and parses fields.
    """
    ser = serial.Serial(port, baudrate, timeout=1)
    
    while True:
        try:
            line = ser.readline().decode('utf-8', errors='ignore').strip()
            if line:
                fields = line.split('\t')
                if len(fields) == 2:
                    label, value = fields
                    print(f"{label}: {value}")
        except KeyboardInterrupt:
            print("Stopping VE.Direct interface.")
            break
        except Exception as e:
            print(f"Error: {e}")

if __name__ == "__main__":
    read_vedirect()

I can fight through it from here!! Thanks!

1 Like

Sample output:

PID: 0xC038
V: 13268
I: -154
P: -2
CE: -1045
SOC: 952
TTG: 7421
Alarm: OFF
AR: 0
BMV: SmartShunt 300A
FW: 0418
MON: 0
H1: -6197
H2: -1045
H3: 0
H4: 0
H5: 0
H6: -7305
H7: 10529
H8: 13934
H9: 23859
H10: 1
H11: 0
H12: 0
H15: 0
H16: 0
H17: 8
H18: 37
Checksum: b

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.