Victron Energy VEDirect Bluetooth


This is what’s i have

I also have the cables connected directly to my RPI without going through an ESP. I see that the ESP files refer to an external Victron component.

How do you replace that directly in the configuration.yaml file?

I have this already:

  • platform: serial
    serial_port: /dev/ttyACM0
    baudrate: 19200

Read my post again.
Use uart_0 not uart0

1 Like

As @pepe59 said you need the underscore. This was caused by an esphome update. Where uart0 worked before you now need uart_0. I think it’s important people know why this is now the issue :wink:

Hi , uart0 its private name in esphome
use some other name eg

uart:
 id: my_uart_name 



victron:
 uart_id: my_uart_name

or whatever you choose

So I sat down today having finally decided to hardwire an ESP device to my Victron to get the data and very luckily stumbled upon this post:

https://www.reddit.com/r/homeassistant/comments/13ip2mt/victron_bluetooth_devices_to_home_assistant/

Getting the data passively via Bluetooth is now possible!

It takes a little extra effort to get the Advertising Key so HA can decrypt the data, but otherwise it’s quite seamless; once you add the custom integration and restart it was even auto-discovered! I spent a while trying to get said key off of my android phone but finally gave up and went the Linux route mentioned in the Reddit post.

If the Linux bit is just too much for you, I ran across some posts (I think they might have been official Victron ones?) that mentioned they are working to make the advertising key accessible from within the app. They were relatively recent posts (earlier this year), so I’m hopeful that comes to fruition. That would make this whole process INCREDIBLY simple and straight-forward.

Here’s a screenshot of everything it’s pulling in:
image

4 Likes

That is amazing. Victron, while loving open source, has always been tight lipped about their Bluetooth. This gets the door cracked and hopefully swung fully open soon!

Awesome!!! Thankyou, I’ve been hoping for this!!!

Does anyone have a full guide on hooking a ESP32 (D1 R32) up to a Victron SmartSolar 75/15 and get it working in ESPHOME? I have searched around and am confused as I see some of the MPPT units pinouts read 1,2,3,4 from left to right and others read 4,3,2,1 from left to right? I need to know for my model smartsolar 75/15 what pins I should use to connect to which pins on my ESP32.

Also I have a jumper connected to the two middle pins on my VE direct port. Can I just remove this jumper permanently?

I would greatly appreciate any help as I really do not want to mess up my charge controller.
Also on the Github repo, do I just use the file as is - https://github.com/KinDR007/VictronMPPT-ESPHOME/blob/cf5e6a8f46b5640e34ec3e7da10f28a81ac78b98/debug-esp32-example.yaml

Thank you in advance for the help.

UPDATE: I found this image so I guess my model goes 4,3,2,1? But it does not say what is TX and RX

Connectors are the same pin config just upside down on different models. You need the TX pin. The pin out is on the GitHub page. pin 2

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.