Victron Energy VEDirect Bluetooth

Hi

Could anybody possibly integrate the Victron Energy VE Direct Protocol, i will be running HA in my selfbuild campervan shortly and would like to get the info out of the Solar Charge Controller using the Victron Bluetooth Dongle, if neccessaryt i can use serial comms.

The protocl data sheet is here Protocol

Any help would be appreciated

Thanks in advance

Hi,

I am looking for something similar and found this: https://github.com/physee/Victron.Arduino-ESP8266

From the list here: https://www.victronenergy.com/live/open_source:start

Matt

1 Like

Also: https://github.com/karioja/vedirect

I would also like this! :smiley: :smiley: :smiley:

Thi smight make things easier if anybody is willing to do some coding/component
http://caravanersforum.com/viewtopic.php?t=63614

hope some one can help

and this mqtt solution. How easy would this be to put into HA?

Anyone gotten any closer to getting this to work?

I have the Victron BMV‑702 with a bluetooth dongle and I will install a HASS.IO on Raspberry Pi 3 with a 12v powersupply (to be installed in a boat). Hoping to get the data from VE Direct over to Home Assistant. The data I am looking for is to replicate this (formatting not important, just content):

My goal is to be able to automate switches based on the charge state of the batteries and also be able to stop/start charging over the internet (4G router is allready installed).

I guess first steps is to pair the bluetooth donhle to HASS.IO and then somehow pull the data …

2 Likes

I’ve just stumbled upon this recent addition, im presuming somebody with the know how could pull the data from it. This guy uses the USB victron cables

http://majora.myqnapcloud.com:10080/root/victronPi
https://www.chronicle.me.uk/victronPi/

I’ve emailed him for some more detail, but looks very promising, there is some python scripts and nodejs going on. although i’m no expert in either of these :slight_smile:

hope it helps, as i need to do the same as yourself but in my campervan.

1 Like

Great tip! Changing to USB is absolutely an option. Not sure the interface could be split to accommodate both but that is not important.

Found this on git: https://github.com/oekoluk/Victron-Data-Reader-and-Logger/blob/master/README.md

I think this could work. If we get the data into a CSV file we could get it into HA easily I imagine.

I have now done a script to dump the data from USB to a text file that I have imported as sensors into Home Assistant. At least now I have Charge %, Current draw/input and voltage on the battery. I think the USB is the way to go to make this easier.

3 Likes

Could you expand on how you have configured it?
Is the victron stick connected directly to the ha pi or are you running it separate?

I installed victron a Venus pi OS and it gives a little web interface and you can configure devices etc.

It would be just ideal to get it in the front end of ha, I only need watts/amps coming in from solar battery voltage and amps going into battery again from solar controller.

Any guidance would be appreciated

Cheers

Hello, I will document everything once I have completed the setup but the short summary is:

  1. Install Raspberry Pi with Raspbian
  2. Install HA on Raspbian
  3. USB dongle connected to Pi and BMV-700
  4. TTY settings in rc.local
  5. PHP script running in crontab dumping data to file
  6. Sensor in HA using file sensor pulling the data from named file

Not sure if 5 and 6 could be combined with a more clever script in HA that could pull directly from the serial interface, that is probably possible. I am working on getting the file output in 5. to become JSON. Today is is CSV or one value per file (this is the screenshotted one). Once I have finished I will upload all my configs for sharing and improvement.

All you data needs are available. Download the PDF from Victron and you can see it all. Watts, amps, volts, deep charges and more. https://www.victronenergy.no/download-document/2036/ve.direct-protocol-3.24.pdf

Superb. Good work. I wouldn’t know were to start.

You deserve a virtual pint :beers:

hi corvy

have you got any further with a wrtie up yet. Sorry to nag could do to get it configured before my campervan europe honeymoon trip.

Thanks again

Yes I have and I will write an update :slight_smile: For now if you want to read in Norwegian I have create this in a local forum… https://baatplassen.no/i/topic/141981-b%C3%A5tautomasjon-med-batterioverv%C3%A5king-og-zigbee/

Gimme a day or two and I will do an update. Zigbee swith and everything is working now. Automation is the next step!

Excellent write up. Google translate did itself proud.

I will try and have a go over the weekend if I get chance and report back. Looks pretty straightforward.

Thank you once again.

Perfect, good luck!

up and running, thanks again for spending time on this and your writeup.
I did have problems with the Serial side of things, in rc.local, it comes up device not found. However i only have the one USB device, so once i set the serial port speed it started working.

What i do find though is that it doesnt update every 20seconds with the crontab lines. It just seems random when it does seen it as long as 43minutes and sometimes as low as a minute. Have you any thoughts on why this might be happening?

Thanks

update - the txt file is being written to every 20 seconds so that side is working its something in HA thats not happening.

I found that sometimes the serial settings goes haywire. I ended up putting this into crontab:

# Run the TTY script, sometimes it resets for unknown reason
* * * * * /etc/rc.local

Try it and see what happens.