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.
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 …
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
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
hope it helps, as i need to do the same as yourself but in my campervan.
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.
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.
Hello, I will document everything once I have completed the setup but the short summary is:
Install Raspberry Pi with Raspbian
Install HA on Raspbian
USB dongle connected to Pi and BMV-700
TTY settings in rc.local
PHP script running in crontab dumping data to file
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.
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?