Victron Energy VEDirect Bluetooth

The part on Github that confuses me is it shows pin 2 from the right as TX but then they are not stating for which model. But then below the schematic they say TX is pin 3, so which is it?

Look at the image on this page
https://beta.ivc.no/wiki/index.php/Victron_VE_Direct_DIY_Cable

It’s always pin 2 on the socket. It’s pin3 on the jack (plug) as it’s inverted (industry standard). You don’t need the ground pin at the end. So as long as you don’t use either of the end 2 pin connections you can’t blow anything up. If you don’t receive data to the esp then just use the alternative middle pin.

Hope that helps

Got it working but using an ESP8266 on TX pin from controller to D7 on ESP. I am seeing a lot of errors though and the Battery voltage would change constantly from say 14.6V to 1.06 and then back to 14.6V. I tried using throttle 30s instead of 10 but it does not make much of a difference.

And here are some of the errors I am receiving -

Anyone else get the same?

You might need the ground connection in your setup. Most don’t as it finds a ground from somewhere particularly in vehicle setups.

Can you also share your config for the esp code

1 Like

Thanks for the suggestion. I left the ground as most above said not to ground it but will try tomorrow. Here is my ESP code

substitutions:
  name: victron-mppt
  external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main

esphome:
  name: ${name}
  platform: ESP8266
  board: d1_mini

external_components:
  - source: ${external_components_source}
    refresh: 0s

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

ota:
api:

logger:
  baud_rate: 0
  esp8266_store_log_strings_in_flash: false

#mqtt:
#  broker: !secret mqtt_host
#  username: !secret mqtt_username
#  password: !secret mqtt_password
#  id: mqtt_client

uart:
  id: uart_0
  tx_pin: D8  # Not connected! The communication is read-only
  rx_pin: D7  # Connect this this GPIO and GND to the MPPT charger
  baud_rate: 19200
  rx_buffer_size: 256

victron:
  uart_id: uart_0
  id: victron0
  throttle: 30s

sensor:
  - platform: victron
    victron_id: victron0
    max_power_yesterday:
      name: "${name} max power yesterday"
    max_power_today:
      name: "${name} max power today"
    yield_total:
      name: "${name} yield total"
    yield_yesterday:
      name: "${name} yield yesterday"
    yield_today:
      name: "${name} yield today"
    panel_voltage:
      name: "${name} panel voltage"
    panel_power:
      name: "${name} panel power"
    battery_current:
      name: "${name} panel current"
    battery_voltage:
      name: "${name} battery voltage"
    day_number:
      name: "${name} day number"
    charging_mode_id:
      name: "${name} charging mode id"
    error_code:
      name: "${name} error code"
    tracking_mode_id:
      name: "${name} tracking mode id"
    load_current:
      name: "${name} load current"

text_sensor:
  - platform: victron
    victron_id: victron0
    charging_mode:
      name: "${name} charging mode"
    error:
      name: "${name} error"
    tracking_mode:
      name: "${name} tracking mode"
    firmware_version:
      name: "${name} firmware version"
    device_type:
      name: "${name} device type"
    serial_number:
      name: "${name} serial number"

binary_sensor:
  - platform: victron
    victron_id: victron0
    load_state:
      name: "${name} load state"
    relay_state:
      name: "${name} relay state"

Here again I saw some weird errors.

I could not wait until tomorrow (even in this freezing weather - South Africa) so I added a ground to the ESP and to the Victron unit and now all is perfect. No more errors. Thank you for the suggestion and to anyone else that is getting weird errors, try adding the ground. Once again thank you so much for the assistance.

I connected my Victron Smartshunt to Home-Assistant using an ESP32 with ESPHome in combination with this library: GitHub - Fabian-Schmidt/esphome-victron_ble: Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.

After getting the authentication key using a Laptop with a bootable Ubuntu stick, this library worked flawlessly to obtain data from my smartshunt.
A few notes on how to obtain the authentication key:

One more thing: My Windows installation uses bitlocker for disk encryption. For some reason I had to enter my decryption key to get access to my Windows installation again, after using the Ubunti-stick. So just to be sure, make sure you have a copy of that decryption key somewhere safe where you can access it anytime (which is a smart thing anyway).

1 Like

Hi,

I’ve got the authentication keys and the values are successfully read in the logs of esp home using victron-ble lib from above, but devices are not populated by the victron ble custom component.

Any ideas, I’m out of mine.

Thanks, B.

I’m a bit confused, which custom component are you referring to? My Victron sensors showed up in the ESPhome integration, as past of the ESPhome device.

I’m sorry I missed your reply.

Everything is working now, but maybe I should explain what I did and what I possibly misunderstood.

Perhaps it might help somebody else going through the process that took me to long in my opinion.

I have three Victron devices installed in my vehicle:
DCDC converter (Orion Smart), MPPT regulator (Smart Solar) and battery monitor (BMV 712).

I am running HA OS on RPi 400 in that same vehicle, not far from the other devices.

I was folllowing the described procedures using the notebook running Ubuntu with Victron Connect image installed (and bluetoothctl to force enter PIN) to acquire the three authentication keys.

Next I have added Victron BLE custom integration to HA (GitHub - keshavdv/victron-hacs: Home Assistant plug-in for Victron Instant Readout compatible devices)

Since the RPi supports BLE, initially all three devices cropped up and in the Settings/Devices and Services. I entered the authentication keys and one of them (DCDC) was soon populated by entities.

After some time the other one got populated as well (MPPT), but in both cases there was a tendency that the entities would become unavailable in time, but maybe reconnected again in a while.

I thought that the signal reception is not good/stable enough and decided to install ESPHome and add a Bloototh proxy that I could configure a bit more. There was no improvement.

Then I found the (GitHub - Fabian-Schmidt/esphome-victron_ble: Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.) and configured and installed that component (the part that refers to Victron BLE integration) and also checked the logs which were promising (the data was parsed successfully), but no entities were added, not in ESPHome not at the previously added devices. By analysing the logs I found the naming conflict between the Victron BLE HACS installation and ESPHome device. After resolving that the entities were finally added to ESPHome device.

Everyhing seems stable now, but I think that the devices that are found in Victron BLE integration should better be disabled.

I hope this makes sense.

Many thanks to all contributors.

hi,
having the same issue here … how exactly did you “resolve the mentioned naming conflicts” ? could you describe in more detail what you did ?
thanx in advance
lg
g

Hi,

I think my logs at the time showed that entities with the names I wanted to add through the ESP Home have already existed, I believe that was due to my prior experiments with different integrations. I deleted those and then they appeared in ESP Home device - you could also try different naming schemes in ESP Home code.

As far as I remember that was the last step in otherwise frustrating - and finally rewarding - experience…

Everything still works perfectly ever since and connections are solid.

KR, B.

Hello,
i also want to connect my Victron Device with ESP32 Ble to Home Assistant. @bvovk can you explain exactly the way to install the Github from Fabian-Schmidt ? I try this for hours, no chance to run this. My english ist bad, i am german. thank you for your help.

Awesome!

How’s this been working for you?

The post you linked to outlining this has been deleted, any chance you could explain how to connect HA to victron gear via BLE?

This is working perfectly:

1 Like

I used GitHub - softwarecrash/Victron2MQTT: Little Program for ESP82XX to get the Victron data to web and MQTT on a Wemos D1 mini.

No need to compile as the img file can be flashed with tasmotiser directly.
Only suitable if your victron has an vedirect port.

Latest version has hassio discovery and code owner is actively working on new features
Possible to buy complete modules and pcb’s to connect to your victron.

Works perfectly. You can get the code straight from the app now, so it couldn’t be easier!

Could you elaborate how you did that? I try to get an MPPT and a shunt work on one esp8266.

hi i have one MPPT 100/20 working like a charm with esphome.
i wanr to add one more mppt to improve the charge of my batterie , was it possible to synchronise the two mppt like it could with ve.smart ?