Victron Energy VEDirect Bluetooth

Thanks, yeah I don’t know enough about these issues to know what’s what.

In the end it seems to have connected. I have wifi repeaters (supplied by the ISP router supplier) so I guess they are using different channels and maybe some conflicts.

Thanks!

I had a look and it seems D7 is the same as GPIO13 (I had earlier tried GPIO7 thinking it might be wanted ot use GPIO instead of D). So I replaced D7 in the code with GPIO13 and revalidated. That error has now been resolved but the validation threw up a new error, so now need to track that one down.

This is the new error:

INFO Reading configuration /config/esphome/esphome-web-82e879.yaml...
Failed config

sensor.victron_smart_shunt: [source /config/esphome/esphome-web-82e879.yaml:52]
  platform: victron_smart_shunt
  battery_voltage: 
    name: Battery Voltage
    
    ID bv redefined! Check sensor->0->battery_voltage->id.
    id: bv
    disabled_by_default: False
    force_update: False
    unit_of_measurement: V
    icon: mdi:flash
    accuracy_decimals: 3
    device_class: voltage
  battery_current: 
    name: Battery Current
    
    ID bc redefined! Check sensor->0->battery_current->id.

I’ll look a bit more and see what I can work out for these.

I’m sure it’s painful reading my stream of ignorance!

This just seems a promising option for getting my Smart Shunt data into HA, and it is important data to me, many of my energy system automations rely on it. I get it now via an alternative but that prevents me from accessing other battery data. So I am hoping I can crack this nut, but I need some guidance.

Found the error, those two sensors were defined twice in the code I pasted in. Removed the duplicates and

INFO Reading configuration /config/esphome/esphome-web-82e879.yaml...
INFO Configuration is valid!

Yay!

Installed and got this message at the end:

INFO Successfully compiled program.
INFO Resolving IP address of esphome-web-82e879.local
INFO  -> 192.168.0.97
INFO Uploading /data/esphome-web-82e879/.pioenvs/esphome-web-82e879/firmware.bin (516080 bytes)
INFO Compressed to 357985 bytes
Uploading: [============================================================] 100% Done...

So it looks like success. Now to work on the wiring of the ESPboard to the Shunt.

Thanks all for your patience. I’m learning a lot.

Will report back once I have had a suitable opportunity for connecting the wires.

After a few stabs and a couple solder points I got things nearly as small as they can be.

Hello from new relaised i have problem with all my esp. Do you have same problem?

What’s your config? Try setting to uart1. I know I can’t OTA mine but I can flash it locally if it isn’t plugged into the Victron.

Use uart_0 in yaml configuration

1 Like


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