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 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!
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()