BM6 Battery Monitor ESPHome

Continuing the discussion from BM2 battery monitoring using ble tracker component:

I recently bought a Sealey BT2020 Battery Monitor. This was described as a BM6 in a BLE sniffer. After much digging I found this post and an ESPHome configuration that just worked! Couldn’t find any reference to it on the forum.

Reverse engineering the BM6 BLE battery monitor | tarball.ca

bm6-battery-monitor/ESPHome/bm6.yaml at main · JeffWDH/bm6-battery-monitor

Oh, good to know! I wonder how many other names the BM6 goes by. I’ve added a note on that blog post with the fact it’s also known as the Sealey BT2020. Thanks!

1 Like

There are lots on Amazon that look identical, but I decided to pay a little more for a brand name.

Now, im working on integration for BM6 Rafciq/BM6: Home Assistant integration for Battery Monitor BM6

In few days I publish first version.

1 Like

I published an integration for Battery Monitor BM6. Have fun!

2 Likes

This looks really great. My issue is BT coverage in the Garage :frowning:

@baz123 You only need a Bluetooth proxy. Small ESP32 board like “ESP32-C3 Super Mini”, power adapter, this page Ready-Made Projects — ESPHome, PC, USB cable and few minutes.

Not played with Bluetooth proxy before, Had a ESP32 so installed it.

First question - ESPHome offers to adopt the device, Is this something to do? One problem with leaving as is, is that there is no way of seeing if it is online or not.

Your integration.

For the installation, worth adding to it that, once the Custom Repository is added to HACS, you then need to download the Repository via the 3 dots. Took me a little while to work out why I could not add it as an integration.

When trying to add the integration, I am getting a ‘No BM6 found’ response. The proxy is close to the Sealy BM6 device.

[edit]
I have switched off the old device so the BM6 is not connected to anything else.

[edit2]
Interestingly, iBeacon seems to be picking it up

[edit 3]
@Rafciq I adopted it in ESPHomeBuilder and added VERY_VERBOSE logging.

The Proxy can see it and is proxying the data

[14:39:15][VV][esp32_ble_tracker:450]: Parse Result:
[14:39:15][VV][esp32_ble_tracker:469]:   Address: 50:54:7B:85:xx:xx (PUBLIC)
[14:39:15][VV][esp32_ble_tracker:472]:   RSSI: -75
[14:39:15][VV][esp32_ble_tracker:473]:   Name: 'BM6'
[14:39:15][VV][esp32_ble_tracker:475]:   TX Power: 2
[14:39:15][VV][esp32_ble_tracker:481]:   Ad Flag: 6
[14:39:15][VV][esp32_ble_tracker:484]:   Service UUID: 0xFFF0
[14:39:15][VV][esp32_ble_tracker:495]:   Manufacturer ID: 0x6DBD, data: 34.BC.FB.5B.43.F5.C2.B3.B8.38.12.F5.E0.06 (14)
[14:39:15][VV][esp32_ble_tracker:505]:   Adv data: 02.01.06.03.02.F0.FF.11.FF.BD.6D.34.BC.FB.5B.43.F5.C2.B3.B8.38.12.F5.E0.06.04.09.42.4D.36.05.12.06.00.0C.00.02.0A.00 (39)
[14:39:18][V][bluetooth_proxy:058]: Proxying raw packet from 50:54:7B:85:xx:xx, length 39. RSSI: -75 dB

Hi, @baz123

First question - ESPHome offers to adopt the device, Is this something to do? One problem with leaving as is, is that there is no way of seeing if it is online or not.

I have no knowledge on this subject. When I find time, I will read and try to answer something.

For the installation, worth adding to it that, once the Custom Repository is added to HACS, you then need to download the Repository via the 3 dots. Took me a little while to work out why I could not add it as an integration.

I’m waiting for my integration to be added to HACS, then it will be easier to use. Unfortunately, it’s been a month now.

When trying to add the integration, I am getting a ‘No BM6 found’ response. The proxy is close to the Sealy BM6 device.
[edit]
I have switched off the old device so the BM6 is not connected to anything else.
[edit2]
Interestingly, iBeacon seems to be picking it up

  1. Please upload a picture of your BM6 here.
  2. What firmware version do you have?
  3. Do you have the BM6 app disabled on your phone when you try to add the BM6 to HA?
  4. Does your HA see and work with BT proxy?

Hi @Rafciq (apologies for delay)

I adopted the proxy with ESPHome (decided I could always go back) and then added in the logging to get the details.

The BM6 is a Sealy model Sealey Battery Monitor Sensor & Vehicle Finder - BT2020, Blue : Amazon.co.uk: Automotive

No idea :slight_smile:. How do I find out?

I’ve never used the App. I have diasbled my previous version that got the data directly (as discussed above)

How would I know?

The device has now appeared and it works :+1:

Couple of questions,

  1. I don’t understand the difference between the 3 calculation options.
  2. Does the integration guess the ‘Battery Type’ or is that just the default value?
  3. What is Stan and Tension (might be a language thing :slight_smile: )

Final point of note - the integration is detecting the OBD2 ANCEL device plugged in. Could the Battery state be got from that?

  1. I don’t understand the difference between the 3 calculation options.

Available calculation algorithms:

  • Calculated by BM6 Device → BM6 calculate the ‘State’ of battery it’s own method (I don’t known what), this integration only get sate value with one of this value: “Ok”, “Low Voltage” and “Charging”.
  • Calculated using State of Charge/Discharge (SoC/SoD)
  • Calculated using Charge/Discharge Voltage Range (CVR/DVR)
    Those two calculation above are based on voltage measure by BM6 and ranges defined in GitHub - Rafciq/BM6: Home Assistant integration for Battery Monitor BM6. The difference between the (SoC/SoD) and (CVR/DVR) ranges is in the standard for determining the battery discharge/charge state. Those calculation support more state’s than first GitHub - Rafciq/BM6: Home Assistant integration for Battery Monitor BM6
  1. Does the integration guess the ‘Battery Type’ or is that just the default value?

Not, integration doesn’t guess type of battery. You have to choose right type of used battery. This settings is base of calculation algorithm if you use (SoC/SoD) or (CVR/DVR).

  1. What is Stan and Tension (might be a language thing :slight_smile: )

This is translation bug. I working on it. ‘Stan’ should by ‘State’ and ‘Tension’ should be ‘Voltage’ in English.

Final point of note - the integration is detecting the OBD2 ANCEL device plugged in. Could the Battery state be got from that?

BM6 integration only works with BM6 device.

1 Like

I’m also seeing regular dropouts and unavailable states. It is as if the integration is expecting data more often than the device is sending it.

Same here, it work at first when configuring, I can see values and them 2 minutes later goes offline to never get back up again.

Seems to be conflicting with ELKBLEDOM integration for bluetooth lightstrips, it does detect it, I had to ignore it.

That integration need more work.

@baz123 The integration queries the BM6 device at intervals that you set during configuration. If there are unavailable states, it means that the integration tried to read, and the device was not available or visible.

Do you perhaps have the BM6 app running on your phone or something else that reads from the BM6 at the same time?

I will try to verify this.

Just wanted to say that I have @Rafciq 's BM6 monitor up and running successfully. Thank you!

In terms of the bluetooth proxy did just install it plan jane or did you have to config anything? Would you share your proxy config?

Little bit of extra:

substitutions:
  name: "bt-proxy"
  friendly_name: BT-Proxy

packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic.yaml@main

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    sdkconfig_options:
      # @grigi found in testing that these options resulted in better responsiveness.
      # BLE 4.2 is supported by ALL ESP32 boards that have bluetooth, the original and derivatives.
      CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
      # Also enable this on any derivative boards (S2, C3 etc) but not the original ESP32.
      CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
      # Extend the watchdog timeout, so the device reboots if the device appears locked up for over 10 seconds.
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"

esp32_ble_tracker:
  scan_parameters:
    # Don't auto start BLE scanning, we control it in the `api` block's automation.
    continuous: False
    
    active: True  # send scan-request packets to gather more info, like device name for some devices.

    interval: 320ms  # default 320ms - how long to spend on each advert channel
    window:   300ms  # default 30ms - how long to actually "listen" in each interval. Reduce this if device is unstable.
    # If the device cannot keep up or becomes unstable, reduce the "window" setting. This may be
    # required if your device is controlling other sensors or doing PWM for lights etc.

mopeka_ble:

bluetooth_proxy:
  active: true  # allows outbound connections from HA to devices.

# Enable logging
logger:
  baud_rate: 0  # disable serial uart logging

# Enable Home Assistant API
api:
  encryption:
    key: !sectret api_password

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  on_connect:
    - esp32_ble_tracker.start_scan:
        continuous: true
  on_disconnect:
    - esp32_ble_tracker.stop_scan:

button:
  - platform: restart
    name: "${friendly_name} Restart"
1 Like

@Rafciq I have this up and running. I am using the Closed by the BM6 device config. Things seem to be working fine other than the status. It shows unknown. Anyway to fix this? Also can the text be correct to English?
Thanks so much for your hard work on this. I’m going to be adding a few more monitors for my other vehicles.