Jump to content

Victron BMV in Home Assistant


DeepBass9

Recommended Posts

I have been trying to get BMV 712 values into home assistant. I seem to be on the right track. I am using a VE direct cable into a USB port on the PI. I am getting some data from the BMV, but something is not working properly. The BMV is supposed to send the values every second or so to the USB port in a tab delimited format. I am managing to read one value, and then that's it. Does anyone have any clues as to what the problem can be?

I have it set up as follows in the configuration.yaml file :

Quote

 

#BMV
  - platform: serial
    serial_port: /dev/serial/by-id/usb-VictronEnergy_BV_VE_Direct_cable_VE4A9OUM-if00-port0
    name: BMV712
    baudrate: 19600

  - platform: template
    sensors:
      bmv_data:
        friendly_name: Anything
        unit_of_measurement: "V"
        value_template: "{{ states('sensor.serial_sensor').split('\t')[0] states('sensor.serial_sensor').split('\t')[1] }}"
      

 

I have fiddled around with many permutations of the value template and only get this:

image.png.c4e88ffeb36105494398fe3d82607553.png

That is correct and is the amount of charged energy and agrees with what I see on the victron app, but it is static and only changes with a reboot of the pi (s I assume it is reading one line of data and nothing further)

image.png.1b30e3c1dec52a68ebc65a79f44f7bee.png

 Anyone have any ideas how to get the other values, and how to get the values to update periodically?

Link to comment
Share on other sites

I also came across this guy who managed to get it right with a script that writes the data to a file which then gets parsed into HA. (translated from Norwegian) https://translate.google.com/translate?sl=auto&tl=en&u=https%3A%2F%2Fbaatplassen.no%2Fi%2Ftopic%2F141981-b%C3%A5tautomasjon-med-batterioverv%C3%A5king-og-zigbee%2F

Link to comment
Share on other sites

  • 3 weeks later...

I linked mine up to the Colour GX which was very easy in the end - cant help with BMV though sorry:

Added this to Configuration.yaml and had to "enable modbus-TCP" on Colour GX :

sensor:

  - platform: modbus
    registers:
    - name: Grid power
      hub: victron
      unit_of_measurement: "W"
      slave: 100
      register: 820
    - name: Solar power
      hub: victron
      unit_of_measurement: "W"
      slave: 100
      register: 850
    - name: Load
      hub: victron
      unit_of_measurement: "W"
      slave: 100
      register: 817
    - name: Battery
      hub: victron
      unit_of_measurement: "%"
      slave: 100
      register: 843
    - name: Grid Failure
      hub: victron
      unit_of_measurement: "State"
      slave: 100
      register: 826

https://community.victronenergy.com/questions/12314/connecting-rpi-with-venusos-mqtt-to-home-assistant.html

Edited by Tim
Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...