Coder Social home page Coder Social logo

fabian-schmidt / esphome-victron_ble Goto Github PK

View Code? Open in Web Editor NEW
147.0 17.0 13.0 345 KB

Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.

License: GNU General Public License v3.0

Python 18.82% C++ 81.18%
ble bluetooth esp32 esphome esphome-component victron victronenergy bluetooth-low-energy home-assistant sensor

esphome-victron_ble's Introduction

ESPHome victron_ble component

This repository is in no way approved by or affiliated with the official Victron Energy repository.

I am not responsible for any problems or damages with your devices or this code

This ESPHome component supports both official Victron Bluetooth BLE Protocols:

  • (Recommended) Bluetooth advertising protocol - Component victron_ble.
    • Supported Devices:
      • Smart Shunt
      • Smart Solar
      • Inverter
      • DC/DC converter
      • SmartLithium
        • Missing definition for bms_flags and error.
      • Inverter RS
      • Smart Batery Protect
        • Missing definition for output_state.
      • Smart Battery Sense
      • (Lynx Smart) BMS
        • Missing definition for error, io_status and warnings_alarms.
      • Multi RS
      • VE.Bus
        • Missing definition for ve_bus_error.
      • DC Energy Meter
        • Missing definition for bmv_monitor_mode.
      • Orion XS
    • Not suported. Awaiting final documentation:
      • GX-Device
      • AC Charger
    • Unsupported. Due to lack of support for advertising protocol:
  • Bluetooth connection protocol - Component victron_ble_connect.
    • Supported Devices:
      • Smart Shunt

victron_ble component (Recommended)

To connect to your Victron device you must have two information for each device:

  • mac_address - Bluetooth mac address of device.
  • bindkey - AES encryption key.

Use VictronConnect App v5.93 (or later) released on 2023-08-25.

VictronConnect App Settings page VictronConnect App Product info page VictronConnect App Instant readout encryption data

  1. Open "Settings" of Device.
  2. Open "Product Info" page.
  3. Ensure Instant readout via Bluetooth is enabled.
  4. Bottom of page press SHOW for Instant readout details Encryption data.

When connected to the device via VictronConnect App no Instant readout (Bluetooth advertising) data is generated.

Example ESPHome configuration for victron_ble using SmartShunt and SmartSolar

See victron_ble.yaml for a full example.

esphome:
  name: "victron-ble"

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble

esp32:
  board: esp32dev

logger:
  level: DEBUG

esp32_ble_tracker:

victron_ble:
  - id: MySmartShunt
    mac_address: "MY SMART SHUNT MAC"    
    bindkey: "MY AES ENCRYPTION KEY"
  - id: MySmartSolar
    mac_address: "MY SMART SOLAR MAC"
    bindkey: "MY AES ENCRYPTION KEY"

sensor:
  # MySmartShunt
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Time remaining"
    type: TIME_TO_GO
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Battery voltage"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Starter Battery"
    # AUX_VOLTAGE or MID_VOLTAGE or TEMPERATURE.
    # Depending on configuration of SmartShunt.
    type: AUX_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Current"
    type: BATTERY_CURRENT
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Consumed Ah"
    type: CONSUMED_AH
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "State of charge"
    type: STATE_OF_CHARGE

  # MySmartSolar
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Battery Voltage"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Battery Current"
    type: BATTERY_CURRENT
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Yield Today"
    type: YIELD_TODAY
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "PV Power"
    type: PV_POWER
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Load Current"
    type: LOAD_CURRENT

binary_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Battery has Alarm"
    type: ALARM

  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT is in Fault state"
    type: DEVICE_STATE_FAULT
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT has Error"
    type: CHARGER_ERROR

text_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Battery Alarm reason"
    type: ALARM_REASON

  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT state"
    type: DEVICE_STATE
  - platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT Error reason"
    type: CHARGER_ERROR

victron_ble component configuration

The following settings exist:

  • mac_address - The MAC address of your Victron device.
  • bindkey - The AES encryption key of your Victron device.
  • Automation Triggers:
    • on_message - When any message is recieved.
    • on_battery_monitor_message - When a battery monitor message is recieved.
    • on_solar_charger_message - When a solar charger message is recieved.
    • on_inverter_message - When a inverter message is recieved.
    • on_dcdc_converter_message - When a DC/DC converter message is recieved.
    • on_smart_lithium_message - When a smart Lithium message is recieved.
    • on_inverter_rs_message - When a Inverter RS message is recieved.
    • on_smart_battery_protect_message - When a Smart Battery Protect message is recieved.
    • on_lynx_smart_bms_message - When a Lynx (Smart BMS) message is recieved.
    • on_multi_rs_message - When a Multi RS message is recieved.
    • on_ve_bus_message - When a VE.Bus message is recieved.
    • on_dc_energy_meter_message - When a DC Energy meter message is recieved.
    • on_orion_xs_message - When a Orion XS message is recieved.

Sensor

The following type are supported by the sensor component:

Unit Solar charger Battery monitor Inverter DC/DC converter SmartLithium Inverter RS Smart Battery Protect (Lynx Smart) BMS Multi RS VE.Bus DC Energy Meter Orion XS
ACTIVE_AC_IN X X
ACTIVE_AC_IN_POWER W X X
AC_APPARENT_POWER VA X
AC_CURRENT A X
AC_OUT_POWER W X X X
AC_VOLTAGE V X
ALARM_REASON X X X X
AUX_VOLTAGE V X(1) X(1)
BATTERY_CURRENT A X X X X X X X
BATTERY_VOLTAGE V X X X X X X X X X
BATTERY_POWER W X X X X X X X
CHARGER_ERROR X X X X X
CONSUMED_AH Ah X X
DEVICE_STATE X X X X X X X X
ERROR X X X X
INPUT_VOLTAGE V X X X
LOAD_CURRENT A X
OFF_REASON X X X
OUTPUT_VOLTAGE V X X X
MID_VOLTAGE V X(1)
PV_POWER W X X X
STATE_OF_CHARGE % X X X
TEMPERATURE °C X(1) X X(2) X X(1)
TIME_TO_GO min X X
YIELD_TODAY kWh X X X
BALANCER_STATUS X
BMS_FLAGS X
CELL1 V X
CELL2 V X
CELL3 V X
CELL4 V X
CELL5 V X
CELL6 V X
CELL7 V X
CELL8 V X
OUTPUT_STATE X
WARNING_REASON X
IO_STATUS X
WARNINGS_ALARMS X
ALARM X
BMV_MONITOR_MODE X
OUTPUT_CURRENT X
INPUT_CURRENT X

(1) - Available if device aux port is configured. (2) - Not available on all models. NAN reported if not available.

Binary Sensor

The following type are supported by the binary_sensor component:

Solar charger Battery monitor Inverter DC/DC converter SmartLithium Inverter RS Smart Battery Protect (Lynx Smart) BMS Multi RS VE.Bus DC Energy Meter Orion XS
ALARM X X X X
CHARGER_ERROR X X X X X
DEVICE_STATE_OFF X X X X X X X X
DEVICE_STATE_LOW_POWER ? ? ?
DEVICE_STATE_FAULT X X X X X X X X
DEVICE_STATE_BULK X ? ? ? X
DEVICE_STATE_ABSORPTION X ? ? ? X
DEVICE_STATE_FLOAT X ? ? ? X
DEVICE_STATE_STORAGE ? ? ?
DEVICE_STATE_EQUALIZE_MANUAL X ? ? ?
DEVICE_STATE_INVERTING ? ? ?
DEVICE_STATE_POWER_SUPPLY ? ? ?
DEVICE_STATE_SUSTAIN ? X ?
DEVICE_STATE_STARTING_UP X ? ? ?
DEVICE_STATE_REPEATED_ABSORPTION ? ? ?
DEVICE_STATE_AUTO_EQUALIZE X ? ? ?
DEVICE_STATE_BATTERY_SAFE ? ? ?
DEVICE_STATE_EXTERNAL_CONTROL X ? ? ?

? - Device submits a device state. Not sure if it can enter this stage.

Text Sensor

The following type are supported by the text_sensor component:

Solar charger Battery monitor Inverter DC/DC converter SmartLithium Inverter RS Smart Battery Protect (Lynx Smart) BMS Multi RS VE.Bus DC Energy Meter Orion XS
ACTIVE_AC_IN X X
ALARM_REASON X X X X
CHARGER_ERROR X X X X X
DEVICE_STATE X X X X X X X X
OFF_REASON X X X
ERROR_CODE X
WARNING_REASON X
ALARM X
BALANCER_STATUS X

victron_ble_connect component

Steps

  1. Use a SmartShunt, other devices don't support this yet.
  2. Use VictronConnect v5.42 or newer.
  3. Update the SmartShunt to version v2.31 or later.
  4. Connect to the SmartShunt using VictronConnect, and enable this protocol (screenshot below)
  5. Disconnect VictronConnect from the SmartShunt.
  6. Use victron_scanner to find mac address of your SmartShunt.

The setting to enable this "third party implementation"-protocol

Find the MAC Adress of your Smart Shunt

Use the Victron scanner component to find the MAC address of your Victron Smart Shunt.

esphome:
  name: "victron-scanner"

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble

esp32:
  board: esp32dev

logger:
  level: INFO

esp32_ble_tracker:

victron_scanner:

Check the console of ESP Home to find the message like this:

[I][victron_scanner:044]: FOUND SMART SHUNT 500A/50mV 'My SmartShunt' at AB:CD:EF:01:02:03

Example ESPHome configuration for victron_ble_connect

esphome:
  name: "victron-ble"

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble


esp32_ble:
  io_capability: keyboard_only

ble_client:
- mac_address: <MY VICTRON SMART SHUNT MAC ADDRESS>
  id: victron_smart_shunt_ble_client_id
  on_passkey_request:
    then:
      - ble_client.passkey_reply:
          id: victron_smart_shunt_ble_client_id
          passkey: !secret ble_passkey

sensor:
  - platform: victron_ble_connect
    ble_client_id: victron_smart_shunt_ble_client_id
    state_of_charge: 
      name: "State of Charge"
    voltage: 
      name: "Voltage"
    power: 
      name: "Power Consumption"
    current: 
      name: "Current"
    ah: 
      name: "Consumed Ah"
    starter_battery_voltage: 
      name: "Starter Battery Voltage"
    remaining_time: 
      name: "Remaining Time"

See victron_ble_connect_all.yaml for a full example. Assumption is you are having a secret.yaml in the same folder.

Your support

I don't have access to all Victron devices. Please provide feedback if the component is working and all values are correct and match the reading within the Victron app. Only after I got feedback for all devices I can try to get this merged into ESP Home. Given the size of this component I don't expect this soon or be a quick process.

Missing feedback for the following devices:

  • SmartLithium
    • Missing definition for bms_flags and error.
  • Smart Batery Protect
    • Missing definition for output_state.
  • (Lynx Smart) BMS
    • Missing definition for error, io_status and warnings_alarms.
  • Multi RS
  • VE.Bus
    • Missing definition for ve_bus_error.
  • DC Energy Meter

esphome-victron_ble's People

Contributors

erikthiart avatar fabian-schmidt avatar syssi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-victron_ble's Issues

Enhancement Request-

Would be good to add in a template sensor for shunt Watts. (AxV) into your standard full yaml?
Perhaps something like this?
Note: Requires id's adding to both Amps and Volts sensors.

- platform: template name: "Watts" unit_of_measurement: "W" accuracy_decimals: 1 icon: "mdi:flash" lambda: |- return id(amps).state * id(volts).state;

Smart BatteryProtect : DEVICE_STATE : Unkown device state (249)

Nicely integrated SmartSolar MPPT 75/15 and Smart BatteryProtect 12V/24V 65A.
Thanks for your code!

So far all running fine, except the unknown device state msg.

text_sensor:

  • platform: victron_ble
    victron_ble_id: MySmartBatteryProtect
    name: "BPS Device State"
    type: DEVICE_STATE

the log file states :
...
[W][victron_ble.text_sensor:267]: [F3:61:37:41:62:C0] Unkown device state (249).
[D][text_sensor:064]: 'BPS Device State': Sending state '249'
....

ESPHome version 2023.6.3

Victron Smart BatteryProtect 12V/24V 65A

  • Firmware 2.11
  • Bootload 1.04

Export network output sensor

I have 3 Victron Mptt controllers networked together and the app provides a network output value. Is there a way to parse this to help reduce the message overhead and let Victron do the calculation instead of home assistant?

issues compiling as no member named 'size

Hi

strangewise I can not compile

unfortunately I am a newbe to esphome.

any hints, what am I missing?
thx

Compiling .pioenvs\victron-ble\FrameworkArduino\FunctionalInterrupt.cpp.o
src/esphome/components/victron_ble/victron_ble.cpp: In member function 'void esphome::victron_ble::VictronBle::update()':
src/esphome/components/victron_ble/victron_ble.cpp:22:36: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VictronBleData*)>' has no member named 'size'
     if (this->on_message_callback_.size() > 0) {
                                    ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:28:52: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_BATTERY_MONITOR*)>' has no member named 'size'
     if (this->on_battery_monitor_message_callback_.size() > 0) {
                                                    ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:36:50: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_SOLAR_CHARGER*)>' has no member named 'size'
     if (this->on_solar_charger_message_callback_.size() > 0) {
                                                  ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:43:45: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_INVERTER*)>' has no member named 'size'
     if (this->on_inverter_message_callback_.size() > 0) {
                                             ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:50:51: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_DCDC_CONVERTER*)>' has no member named 'size'
     if (this->on_dcdc_converter_message_callback_.size() > 0) {
                                                   ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:58:50: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_SMART_LITHIUM*)>' has no member named 'size'
     if (this->on_smart_lithium_message_callback_.size() > 0) {
                                                  ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:65:48: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_INVERTER_RS*)>' has no member named 'size'
     if (this->on_inverter_rs_message_callback_.size() > 0) {
                                                ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:72:58: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_SMART_BATTERY_PROTECT*)>' has no member named 'size'
     if (this->on_smart_battery_protect_message_callback_.size() > 0) {
                                                          ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:80:51: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_LYNX_SMART_BMS*)>' has no member named 'size'
     if (this->on_lynx_smart_bms_message_callback_.size() > 0) {
                                                   ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:88:45: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_MULTI_RS*)>' has no member named 'size'
     if (this->on_multi_rs_message_callback_.size() > 0) {
                                             ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:95:43: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_VE_BUS*)>' has no member named 'size'
     if (this->on_ve_bus_message_callback_.size() > 0) {
                                           ^~~~
src/esphome/components/victron_ble/victron_ble.cpp:102:52: error: 'class esphome::CallbackManager<void(const esphome::victron_ble::VICTRON_BLE_RECORD_DC_ENERGY_METER*)>' has no member named 'size'
     if (this->on_dc_energy_meter_message_callback_.size() > 0) {
                                                    ^~~~
*** [.pioenvs\victron-ble\src\esphome\components\victron_ble\victron_ble.cpp.o] Error 1
=========================================================================================== [FAILED] Took 11.55 seconds ===

SmartShunt

Hello
I need followig options for my PV instalation:
amount of charged energy
amount of discharged energy
battery SOC
Is it possible?
p.s sorry for my English

Creating template sensor from the sensors

I was trying to make a template sensor out of some of the sensors here. While it is possible for me to use filters and lambda to return the desired value, that means I will lose the raw data generated by the sensor. The help I need is to create a template sensor out of one of the sensors, but return both the raw data and the templated sensor for use in home assistance. Any help is welcome. I recognised I can do this easily in HA, but I don't want to add additional template to HA. Thank you.

Smart Battery Sense - Request

Hi,
Great integration, thanks.

Any plans to add in the Victron Smart Battery Sense?
I've just fitted one to my van and it's up and running including additional information in the main list.
Shows voltage and temperature.

Thanks

image

BatMon HomeAssistant-Integration

Hi Fabian!

Kurze Frage: Ich bin zufällig auf batmon gestoßen. Leider erfolgt der Connect zum Shunt nur sehr unzuverlässig, was mir aber gut gefallen hat, war die Integration in das Energy Dashboard des Home Assistant.

Wäre es möglich, das in ähnlicher Form in deine Implementierung einzubauen?

https://github.com/fl4p/batmon-ha

SmartBatterySense?

Hello! What about SmartBatterySense?
Following this doc the item exports TEMPERATURE and BATTERY VOLTAGE by Instant readout.
Is it possible to add it?

Request: isolate the Victron BLE access lib from the ESPHOME biding

As this implementation of Victron BLE access seems to be the first one really working, it would be really great if we could use it even outside of the ESPHome project.
For example, being able to use the lib by itself in any ESP32 project would be nice.
The binding to ESPHome could abstract the lib in this way.

Thank you for considering this idea and for this nice work !

Bruno

Feedback for Phoenix inverter with dongle & MPPT

Just to let you know, the following code works partially with a 12/500 Phoenix inverter with dongle as well as with a 75/10 MPPT

AC Current - not sure if that's correct. It's showing 0.2A when inverter is running at about 20% load
AC Power is showing -1VA
AC Voltage is showing -97.8V (I am in a 220V country)
Battery Current is showing "Unknown"
Battery Voltage is correct.

esphome:
  name: victron-ble
  friendly_name: victron-ble

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: ""

ota:
  password: ""

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Victron-Ble Fallback Hotspot"
    password: ""

esp32_ble_tracker:

victron_ble:
  - id: MyInverter
    mac_address: "-"    
    bindkey: "-"
  - id: MyMPPT
    mac_address: "-"
    bindkey: "-"

sensor:
  # MySmartShunt
  - platform: victron_ble
    victron_ble_id: MyInverter
    name: "Battery voltage"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MyInverter
    name: "AC Power"
    type: AC_APPARENT_POWER
  - platform: victron_ble
    victron_ble_id: MyInverter
    name: "AC Current"
    type: AC_CURRENT
  - platform: victron_ble
    victron_ble_id: MyInverter
    name: "AC Voltage"
    type: AC_VOLTAGE

  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "MPPT"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "Battery Current"
    type: BATTERY_CURRENT
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "Yield Today"
    type: YIELD_TODAY
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "PV Power"
    type: PV_POWER
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "Load Current"
    type: LOAD_CURRENT

binary_sensor:
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "MPPT is in Fault state"
    type: DEVICE_STATE_FAULT
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "MPPT has Error"
    type: CHARGER_ERROR

text_sensor:
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "MPPT state"
    type: DEVICE_STATE
  - platform: victron_ble
    victron_ble_id: MyMPPT
    name: "MPPT Error reason"
    type: CHARGER_ERROR

Support for SmartSolar MPPT 75/10

I can connect to my SmartSolar MPPT 75/10 but get random values:

Config:
victron_ble:

  • id: MySmartSolar
    mac_address: "C9:E6:E9:EB:84:C7"
    bindkey: ""

sensor:

  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Battery Voltage"
    type: BATTERY_VOLTAGE
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Battery Current"
    type: BATTERY_CURRENT
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Yield Today"
    type: YIELD_TODAY
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "PV Power"
    type: PV_POWER
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "Load Current"
    type: LOAD_CURRENT
  • platform: internal_temperature
    name: "${upper_devicename} Int Temp"

Log:

[10:49:07][D][victron_ble:320]: [C9:E6:E9:EB:84:C7] Recieved SOLAR_CHARGER message.
[10:49:07][D][sensor:094]: 'Battery Voltage': Sending state -28.80000 V with 2 decimals of accuracy
[10:49:07][D][sensor:094]: 'Battery Current': Sending state -1560.80005 A with 3 decimals of accuracy
[10:49:07][D][sensor:094]: 'Yield Today': Sending state 600.33002 kWh with 2 decimals of accuracy
[10:49:07][D][sensor:094]: 'PV Power': Sending state 47183.00000 W with 0 decimals of accuracy
[10:49:07][D][sensor:094]: 'Load Current': Sending state -36.50000 A with 1 decimals of accuracy
[10:49:07][D][victron_ble:320]: [C9:E6:E9:EB:84:C7] Recieved SOLAR_CHARGER message.
[10:49:07][D][sensor:094]: 'Battery Voltage': Sending state -107.89000 V with 2 decimals of accuracy
[10:49:07][D][sensor:094]: 'Battery Current': Sending state 2246.19995 A with 3 decimals of accuracy
[10:49:07][D][sensor:094]: 'Yield Today': Sending state 178.56999 kWh with 2 decimals of accuracy
[10:49:07][D][sensor:094]: 'PV Power': Sending state 10474.00000 W with 0 decimals of accuracy
[10:49:07][D][sensor:094]: 'Load Current': Sending state -24.60000 A with 1 decimals of accuracy
[10:49:08][D][sensor:094]: 'Greenhouse Signal': Sending state -62.00000 dBm with 0 decimals of accuracy
[10:49:09][D][victron_ble:320]: [C9:E6:E9:EB:84:C7] Recieved SOLAR_CHARGER message.
[10:49:09][D][sensor:094]: 'Battery Voltage': Sending state -117.55000 V with 2 decimals of accuracy
[10:49:09][D][sensor:094]: 'Battery Current': Sending state 2969.90015 A with 3 decimals of accuracy
[10:49:09][D][sensor:094]: 'Yield Today': Sending state 569.57001 kWh with 2 decimals of accuracy
[10:49:09][D][sensor:094]: 'PV Power': Sending state 1961.00000 W with 0 decimals of accuracy
[10:49:09][D][sensor:094]: 'Load Current': Sending state -29.80000 A with 1 decimals of accuracy
[10:49:09][D][victron_ble:320]: [C9:E6:E9:EB:84:C7] Recieved SOLAR_CHARGER message.
[10:49:09][D][sensor:094]: 'Battery Voltage': Sending state -187.90999 V with 2 decimals of accuracy
[10:49:09][D][sensor:094]: 'Battery Current': Sending state 3186.50000 A with 3 decimals of accuracy
[10:49:09][D][sensor:094]: 'Yield Today': Sending state 385.75000 kWh with 2 decimals of accuracy
[10:49:09][D][sensor:094]: 'PV Power': Sending state 46585.00000 W with 0 decimals of accuracy
[10:49:09][D][sensor:094]: 'Load Current': Sending state -42.30000 A with 1 decimals of accuracy
[10:49:09][W][component:232]: Component victron_ble took a long time for an operation (52 ms).
[10:49:09][W][component:233]: Components should block for at most 30 ms.
[10:49:17][D][victron_ble:320]: [C9:E6:E9:EB:84:C7] Recieved SOLAR_CHARGER message.
[10:49:17][D][sensor:094]: 'Battery Voltage': Sending state 153.34999 V with 2 decimals of accuracy
[10:49:17][D][sensor:094]: 'Battery Current': Sending state 2745.19995 A with 3 decimals of accuracy
[10:49:17][D][sensor:094]: 'Yield Today': Sending state 410.34000 kWh with 2 decimals of accuracy
[10:49:17][D][sensor:094]: 'PV Power': Sending state 4543.00000 W with 0 decimals of accuracy
[10:49:17][D][sensor:094]: 'Load Current': Sending state -16.40000 A with 1 decimals of accuracy

Bmv monitor values high

Often the values obtained from the bmv 712 smart are stoned and unrealistic and go out of scale
Screenshot 2024-04-15 alle 14 31 26
Screenshot 2024-04-15 alle 14 31 36

Additional sensors? Switches possible?

Hi Fabian!

As everything is working great, I'd like to ask some questions:

  1. Is it possible to implement additional sensors or is everything, that is being announced via Victron BLE already implemented? I'm wondering, because e. g. the momentary consumption in Watts is not included. I have it implemented in Home Assistant by multiplying the current * 12V, but I assume Victron publishes this info via BLE.
  2. Is you are using an announcement-protocol via BLE I assume Switches are not possible, e. g. for the load-output :)

Thanks a lot for your time and patience!

Value of 'DEVICE_STATE_BULK', 'DEVICE_STATE_FLOAT' and 'DEVICE_STATE_ABSORPTION' doesn't change if SOLAR_CHARGER message recieved.

Hello.
First I like to thank you for this custom component, I really appreciate your work!

Everything else is working fine, but like I mentioned in the title the value of the binary sensors DEVICE_STATE_BULK, DEVICE_STATE_FLOAT and DEVICE_STATE_ABSORPTION doesn't change if a SOLAR_CHARGER message is recieved. However, the value of DEVICE_STATE changes correctly. Also if I visit the web-dashboard of the esp all those sensors have the value 'OFF' although the DEVICE_STATE has e.g. the value 'Float'.

My specs:

  • Solarcharger: Victron SmartSolar MPPT 100/30
  • I am using HomeAssistant to recieve and display the values of the sensor
    • Because I can't connect to my HomeAssistant network from the location via API I'm using the ESPHome MQTT client to send the data back and forth
  • ESPHome 2023.4.3
  • ESP32 (az-delivery-devkit-v4)

My configuration:

...
esp32_ble_tracker:  
victron_ble:
  - id: GartenSolar
    mac_address: !secret mac
    bindkey: !secret bind_key
# Text Sensoren
text_sensor: 
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE"
    type: DEVICE_STATE

sensor:
# Stromstärke Batterie
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Batterie Stromstärke (A)"
    type: BATTERY_CURRENT
# Volt Batterie
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Batterie Spannung (V)"
    type: BATTERY_VOLTAGE
# Watt Batterie
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Batterie Leistung (W)"
    type: BATTERY_POWER
# Fehler Laderegler
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Fehler Laderegler"
    type: CHARGER_ERROR
# Solarzelle Leistung
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Solarzelle Leistung (W)"
    type: PV_POWER
# Solarzelle Generiert Heute
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "Solarzelle Leistung heute (kWh)"
    type: YIELD_TODAY
binary_sensor:
# Konstantstrom BULK  
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_BULK"
    type: DEVICE_STATE_BULK
# Konstantspannung ABSORPTION
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_ABSORPTION"
    type: DEVICE_STATE_ABSORPTION
 # Ladungserhaltung FLOAT
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_FLOAT"
    type: DEVICE_STATE_FLOAT 
  
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_EXTERNAL_CONTROL" 
    type: DEVICE_STATE_EXTERNAL_CONTROL
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_AUTO_EQUALIZE" 
    type: DEVICE_STATE_AUTO_EQUALIZE
  - platform: victron_ble
    victron_ble_id: GartenSolar
    name: "DEVICE_STATE_OFF" 
    type: DEVICE_STATE_OFF 

Thank you very much

Additional values

Would it be possible to add more values such as "panel_voltage" or "yield_total"?
and if so, how can this be implemented?

Panel Voltage (PV Voltage) missing

Hi, first of all thank you for your work, you saved me a lot of hours and effort. It works really well!
There's one thing that is quite important that I think is missing, though:
There's no way (or at least I didn't found) to retrieve the PV Voltage (voltage of the solar panels). There's no such option in sensors, and the SmartSolar Charger is indeed transmitting that value. Could it be possible to integrate it to an upcoming update?Thrank you!

powercylce shunt

Hi,
I do not understand how to powercycle the shunt?

any hint please?

thanks Thomas

AC Charger blue smart ip 22

Hi

any timeline when the blue smart charger ip22 will be supported?
i have a blue smart 24/12 (1) here and need to integrate it

SmartLithium Balancer Status

Hello,

for my SmartLithium Batteries I found the following definition for balancer_status:

0 - unkonwn (need to charge once to 100%)
1 - balanced / ok
2 - balancing
3 - inbalanced

I hope you find this information useful

H3xF2x

BMV-712 Smart

Hi,

First of all, thank you very much for your work!

I can confirm that it works perfectly with the BMV-712
I used the example configuration for the SmartShunt, I just did a copy and paste and all the sensors work perfectly

Thank you again

shunt value for power in watts

Hi

normally Shunt is also providing power in Watt information

did not find this information in ble component for shunt

please check

what did I miss?

thanks t

Multiplus reports sometimes strange wrong values

Hi, some times when switched off the Multiplus (VE.BUS) reports 262.143W instead of 0W for ACTIVE_AC_IN_POWER and AC_OUT_POWER. Also the text_sensor DEVICE_STATE is 255 instead of 'off'.

Other values from the Multiplus like BATTERY_VOLTAGE are correct.

Switching the Multiplus on or to charging only, solves the problem.

Values on the Cerbo GX are correct at any time.

MPPT - Panel Voltage

It would be nice to have a sensor reporting the voltage of the PV panel itself.

Sustain DEVICE_STATE for Multiplus-II using VE.Bus

Recently Victron added support for a Sustain function for the Multiplus-II and it seems the DEVICE_STATE text field does not currently support this.

The device state is 244 as seen in the logs:

[12:18:01][W][victron_ble.text_sensor:297]: [EE:7F:E7:30:EC:43] Unknown device state (244).

In the Victron app I see this as "Sustain".

Thanks for your work on this great project!

Victron Muliplus Compact 12/2000/80 120V VE.Bus

Hello,

I'm trying to integrate my Multiplus Compact through ESP Home to track Wattage, SOC, and Battery Voltage in HA but I keep running into a "Record type 0C message is too short (13)" Error.

[05:13:22][VV][scheduler:032]: set_timeout(name='VictronBle0', timeout=0)

[05:13:22][VV][esp32_ble_tracker:423]: Parse Result:

[05:13:22][VV][esp32_ble_tracker:440]: Address: CB:53:E9:0F:D7:12 (RANDOM)

[05:13:22][VV][esp32_ble_tracker:442]: RSSI: -56

[05:13:22][VV][esp32_ble_tracker:443]: Name: 'VE.Bus Smart HQ213322AJ4'

[05:13:22][VV][esp32_ble_tracker:451]: Ad Flag: 6

[05:13:22][VV][esp32_ble_tracker:457]: Manufacturer data: 10.03.08.27.0C.1C.3F.69.28.CF.7F.C4.CD.6A.A2.D3.FF.85.EB.DB.ED (21)

[05:13:22][VV][esp32_ble_tracker:473]: Adv data: 02.01.06.18.FF.E1.02.10.03.08.27.0C.1C.3F.69.28.CF.7F.C4.CD.6A.A2.D3.FF.85.EB.DB.ED.19.09.56.45.2E.42.75.73.20.53.6D.61.72.74.20.48.51.32.31.33.33.32.32.41.4A.34 (54)

[05:13:22][VV][victron_ble:152]: [CB:53:E9:0F:D7:12] Cryted message: 28.CF.7F.C4.CD.6A.A2.D3.FF.85.EB.DB.ED (13)

[05:13:22][W][victron_ble:271]: [CB:53:E9:0F:D7:12] Record type 0C message is too short (13).

Feedback: Battery Sense and Orion Smart DCDC is working

Victron Battery Sense reports as Battery Monitor and presents BATTERY_VOLTAGE and TEMPERATURE.
Orion Smart DCDC needs a filter on OUTPUT_VOLTAGE since it reports 0x7FFF=32767 when engine is off=Unavalible.
Both are working ok together with a Smartshunt and MPPT on the same ESP32.

See below config for DCDC and Battery Sense:

victron_ble:
  - id: MySmartDcdc
    mac_address: ${smart_dcdc_mac_address}
    bindkey: ${smart_dcdc_encryption_key}
  - id: MySmartBS
    mac_address: ${smart_bs_mac_address}
    bindkey: ${smart_bs_encryption_key}

sensor:
  # MySmartDcdc
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Input Voltage"
    type: INPUT_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Output Voltage"
    type: OUTPUT_VOLTAGE
   # DCDC reports 0x7FFF=32767 when off=Unavalible 
    filters:
      - filter_out: 327.67

  # MySmartBS
  - platform: victron_ble
    victron_ble_id: MySmartBS
    name: "BS voltage"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartBS
    name: "BS temperature"
    type: TEMPERATURE

binary_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC is in Fault state"
    type: DEVICE_STATE_FAULT
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC has Error"
    type: CHARGER_ERROR

text_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC state"
    type: DEVICE_STATE
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Error reason"
    type: CHARGER_ERROR
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Off reason"
    type: OFF_REASON

Not connecting to BLE-devices

Hi Fabian!

Brief question: What do I need to do for the devices to connect?

  1. BLE is enabled in SmartSolar and Shunt
  2. Mac-App connected and MAC/ Key extracted

'''
{7fd30867-507c-9c8f-5f19-e7b0d96d6203}|e289af4fb6c8ed333494297acc0bb637
{7660ef55-97e5-49c3-59cc-5810c2bd7d05}|3af563e56794c0fb9198f541af2f08a9
'''
I assume, the MAC-addresses are e7:b0:d9:6d:62:03 and 58:10:c2:bd:7d:05 and the keys printed above are the AES-keys needed?

ESPhome compiles and boots up... but obviously nothing connects.

'''
INFO Reading configuration /config/esphome/esp-poessl.yaml...
INFO Starting log output from 192.168.1.29 using esphome API
INFO Successfully connected to 192.168.1.29
[16:59:20][I][app:102]: ESPHome version 2023.3.0-dev compiled on Mar 1 2023, 16:38:56
[16:59:20][C][wifi:504]: WiFi:
[16:59:20][C][wifi:362]: Local MAC: 0C:B8:15:CD:8F:F4
[16:59:20][C][wifi:363]: SSID: 'poessl.net'[redacted]
[16:59:20][C][wifi:364]: IP Address: 192.168.1.29
[16:59:20][C][wifi:366]: BSSID: 94:18:65:0A:A6:C5[redacted]
[16:59:20][C][wifi:367]: Hostname: 'esp-poessl'
[16:59:20][C][wifi:369]: Signal strength: -38 dB ▂▄▆█
[16:59:20][C][wifi:373]: Channel: 13
[16:59:20][C][wifi:374]: Subnet: 255.255.255.0
[16:59:20][C][wifi:375]: Gateway: 192.168.1.1
[16:59:20][C][wifi:376]: DNS1: 0.0.0.0
[16:59:20][C][wifi:377]: DNS2: 0.0.0.0
[16:59:20][C][logger:293]: Logger:
[16:59:20][C][logger:294]: Level: DEBUG
[16:59:20][C][logger:295]: Log Baud Rate: 115200
[16:59:20][C][logger:296]: Hardware UART: UART0
[16:59:20][C][victron_ble:014]: Victorn BLE:
[16:59:20][C][victron_ble:015]: Address: E7:B0:D9:6D:62:03
[16:59:20][C][victron_ble:014]: Victorn BLE:
[16:59:20][C][victron_ble:015]: Address: 58:10:C2:BD:7D:05
[16:59:20][C][victron_ble.binary_sensor:010]: Victron Binary Sensor 'Battery has Alarm'
[16:59:20][C][victron_ble.binary_sensor:011]: Type 0
[16:59:20][C][victron_ble.binary_sensor:010]: Victron Binary Sensor 'MPPT is in Fault state'
[16:59:20][C][victron_ble.binary_sensor:011]: Type 4
[16:59:20][C][victron_ble.binary_sensor:010]: Victron Binary Sensor 'MPPT has Error'
[16:59:20][C][victron_ble.binary_sensor:011]: Type 1
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Time remaining'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'duration'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'min'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 0
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 22
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Battery voltage'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'voltage'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'V'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 2
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 9
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Starter Battery'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'voltage'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'V'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 2
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 7
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Current'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'current'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'A'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 3
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 8
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Consumed Ah'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'Ah'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 1
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 11
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'State of charge'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'battery'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: '%'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 1
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 20
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Battery Voltage'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'voltage'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'V'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 2
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 9
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Battery Current'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'current'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'A'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 3
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:battery'
[16:59:20][C][victron_ble.sensor:011]: Type 8
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Yield Today'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'energy'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'kWh'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 2
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:power'
[16:59:20][C][victron_ble.sensor:011]: Type 23
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'PV Power'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'power'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'W'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 0
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:power'
[16:59:20][C][victron_ble.sensor:011]: Type 19
[16:59:20][C][victron_ble.sensor:010]: Victron Sensor 'Load Current'
[16:59:20][C][victron_ble.sensor:010]: Device Class: 'current'
[16:59:20][C][victron_ble.sensor:010]: State Class: 'measurement'
[16:59:20][C][victron_ble.sensor:010]: Unit of Measurement: 'A'
[16:59:20][C][victron_ble.sensor:010]: Accuracy Decimals: 1
[16:59:20][C][victron_ble.sensor:010]: Icon: 'mdi:power'
[16:59:20][C][victron_ble.sensor:011]: Type 15
[16:59:20][C][victron_ble.text_sensor:010]: Victron Text Sensor 'Battery Alarm reason'
[16:59:20][C][victron_ble.text_sensor:011]: Type 2
[16:59:20][C][victron_ble.text_sensor:010]: Victron Text Sensor 'MPPT state'
[16:59:20][C][victron_ble.text_sensor:011]: Type 4
[16:59:20][C][victron_ble.text_sensor:010]: Victron Text Sensor 'MPPT Error reason'
[16:59:20][C][victron_ble.text_sensor:011]: Type 3
[16:59:20][C][esp32_ble:214]: ESP32 BLE:
[16:59:21][C][esp32_ble_tracker:583]: BLE Tracker:
[16:59:21][C][esp32_ble_tracker:584]: Scan Duration: 300 s
[16:59:21][C][esp32_ble_tracker:585]: Scan Interval: 320.0 ms
[16:59:21][C][esp32_ble_tracker:586]: Scan Window: 30.0 ms
[16:59:21][C][esp32_ble_tracker:587]: Scan Type: ACTIVE
[16:59:21][C][esp32_ble_tracker:588]: Continuous Scanning: True
[16:59:21][C][mdns:108]: mDNS:
[16:59:21][C][mdns:109]: Hostname: esp-poessl
[16:59:21][C][ota:093]: Over-The-Air Updates:
[16:59:21][C][ota:094]: Address: 192.168.1.29:3232
[16:59:21][C][api:138]: API Server:
[16:59:21][C][api:139]: Address: 192.168.1.29:6053
[16:59:21][C][api:143]: Using noise encryption: NO
[16:59:32][D][esp32_ble_tracker:238]: Starting scan...
'''

Enhancement Request for someone to add/test support for a small display such as the M5Stack Core

I think this would be a really cool use case for a small display/readout of the battery information for the Victron smart shunt. I found the following project which seems similar enough that it may be possible to add support for the display without too much extra work. I can't test as I don't currently have an M5Stack Core.
https://github.com/koenvervloesem/ESPHome-Heart-Rate-Display

One limitation with the above link would be not being able to run wifi at the same, which I think is acceptable for the use case of just viewing battery information on a display in an rv/camper when on the road. Another esp32 device could be used without a display when requiring wifi and the M5Stack could be powered off to ensure it is not connected to the victron bluetooth.

cannot enable filters on some of the sensors

seems that some sensors cannot be filtered.

image

text_sensor:

  • platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "Battery Alarm reason"
    state_topic: ${device}/shunt/alarm_reason
    type: ALARM_REASON
    filters:

    • throttle_average: 60s
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT state"
    state_topic: ${device}/mppt/state
    type: DEVICE_STATE
    filters:

    • heartbeat: 60s
    • throttle_average: 60s
  • platform: victron_ble
    victron_ble_id: MySmartSolar
    name: "MPPT Error reason"
    state_topic: ${device}/mppt/error_reason
    type: CHARGER_ERROR
    filters:

    • heartbeat: 60s
    • throttle_average: 60s

for other sensors it works correctly:

  • platform: victron_ble
    victron_ble_id: MyCharger
    name: "charger input voltage"
    state_topic: ${device}/charger/input_voltage
    type: INPUT_VOLTAGE
    filters:

    • heartbeat: 60s
    • throttle_average: 60s
  • platform: victron_ble
    victron_ble_id: MyCharger
    name: "charger output voltage"
    state_topic: ${device}/charger/output_voltage
    type: OUTPUT_VOLTAGE
    filters:

    • heartbeat: 60s
    • throttle_average: 60s
  • platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "shunt ETA"
    state_topic: ${device}/shunt/eta
    type: TIME_TO_GO
    filters:

    • heartbeat: 60s
    • throttle_average: 60s
  • platform: victron_ble
    victron_ble_id: MySmartShunt
    name: "shunt Battery voltage"
    state_topic: ${device}/shunt/voltage
    type: BATTERY_VOLTAGE
    filters:

    • heartbeat: 60s
    • throttle_average: 60s

filtering is useful to reduce amount of reported data - load on wifi and mqtt systems.
if not this, then support for "update_interval" would be nice :)

==== operation info
ESPHome 2023.12.9

component works for me on:

  • Orion-Tr Smart DC-DC charger non-isolated
  • MPPT
  • Smart Shunt

all devices work flawlessly but seems that esphome needs more than basic ESP32 for BLE in my config.
works ok on ESP32-S3-WROOM-1-N16R8 module

Fehlende Werte

Hallo,

kann für die mppts noch folgendes aufgenommen

  • yield total
  • yield yesterday

Danke

action ON for shunt? same as battery_monitor?

Hi

which of the actions are refereing to the shunt?
I expected battery Monitor, but do not see a message

    on_battery_monitor_message:
      - logger.log: "Message from Battery Monitor."

    on_inverter_message:
      - logger.log: "Message from Inverter."
    on_dcdc_converter_message:
      - logger.log: "Message from DC/DC Converter."
    on_smart_lithium_message:
      - logger.log: "Message from Smart Lithium."
    on_inverter_rs_message:
      - logger.log: "Message from Inverter RS."
    on_smart_battery_protect_message:
      - logger.log: "Message from Smart Battery Protect."
    on_lynx_smart_bms_message:
      - logger.log: "Message from Lynx Smart BMS."
    on_multi_rs_message:
      - logger.log: "Message from Multi RS."
    on_ve_bus_message:
      - logger.log: "Message from VE.Bus."
    on_dc_energy_meter_message:
      - logger.log: "Message from DC Energy Meter."

What the advantages of victron_ble_connect component ?

Hi

I have a smartshunt using the regular bluetooth connection at the top of you repo, I saw at the bottom of the page I can enable the victron_ble_connect component, what's the advantage of this? Is it worth my swapping.

Thanks
Dan

Slow polling of data.

I have managed to get it connected and integrated but the update frequency over bluetooth is very slow ranging from 1 minute to 10 minutes. Whilst the total consumption seem to be ok doesnt help with live data eg load monitoring which is possible with the victron bluetooth app.
Is it possible to increase polling frequency?

Enhancement request: Toggle BatteryProtect load on/off

I'm guessing this isn't currently possible, but it would be nice to be able to toggle the BatteryProtect loads on/off like is possible in the Victron App or turn on/ off solar charging with the SmartSolar. Thank you for your time and great work!

Smart Battery Sense integration

Hello Fabian,
First of all, thank you very much for the great work. I have a “SmartSolar MPPT 75/15” and a “SmartBatterySense” running. The "SmartSolar" has been running for some time now via "VE.Direct" and an "ESP32" with Homeassiant. Now I would like to put the “SmartBatterySense” into operation. There would probably be no other option than to connect everything via BLE. I already have the “SmartSolar” running successfully via BLE. Could you include the “SmartBatterySense” with its two sensors “Battery Voltage” and “Battery Temperature”?

That would be nice
Harald

Installation

What do I need apart from the Victron product, the Raspberry PI 4 has Bluetooth?
How is this installed on the Home Assistant, is there a step by step guide?

Compatibility - BMV-712

Love your work - this is a great solution for those not wanting to physically wire into their units (I have a camper which I would rather not keep an ESP powered on).

I'm trying to get it going, but not sure on compatibility. I have a BMV-712, which shows up in the app as the screenshots below. It's not on the list explicitly, but (likely wrongly) assumed that given it's compatible with the rest of the Victron BLE gear, that it would be.

bmv712-1
bmv712-2

MAC Address Lookup (OSX)

I had a devil of a time setting this up because the commands on the linked victron python page (which interact with the sqlite database) on OSX return some weird uuid like looking code for "mac address". This code, however, is NOT a mac address and the esphome yaml rejects it.

Instead, based on this insight i found you could run the command:

system_profiler SPBluetoothDataType

Which does list the right style mac address. It would be useful to mention this in the instructions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.