Passive BLE Monitor integration

@jump396 I think it’s better to create a github issue, I don’t see why this can happen (yet), so I need to look into this, probably with some help from you to debug things. Can you create an issue on github, and can you also post a log on github, with logging in HA at debug level.

logger:
  default: warn
  logs:
    custom_components.ble_monitor: debug

ok @Ernst, I will do it as soon as possible, thanks

Hi! :smiley:

A quick question about MI flora attributes.
I’m trying to use the attribute “limits” in automations, but can’t figure out how.

limits

I tested setting up a template sensor, but it returns “none”

plant_1_min_moisture:
  friendly_name: plant 1 min_moisture
  value_template: '{{ state_attr("plant.plant_1", "min_moisture") }}'

Any ideas?

@brade I’ve been running this on my Surface Pro 3 via a VirtualBox VM and only just discovered that my Bluetooth and this plugin seem to be the root cause of my CPU load issues. My HA install was running really slow with constant load between 50-90% CPU. After disabling almost everything the last thing I tried was removing my bluetooth device (virtually) and this plugin and BINGO - CPU dropped back down to 13%.

I’m not sure if there’s a bug? The BLE devices I was using was these (6 of them though only about 3 were in range) plus also had the Xiaomi night lights (v2 with BLE and motion sensors): Xiaomi Mijia BLE Temperature and Humidity Sensor - Home Assistant.

But hey just searching Google I found the above link and looks like there is native support without needing this Passive BLE Monitor integration? I need to try it out!

Hi,

Great to see the oral-b toothbrush 7000 is supported now. Any change of other series to be suppored soon?

Thanks,
Koen

Hello,
After reading the documentation, I understand that the passive/active scan option is defined at the integration level. Isn’t it possible to define this option at the device level in order to actively poll the devices with a very low transmission rate, while keeping the passive listening option for devices that send updates 20x / min ? I don’t want to increase the power consumption of all my bluetooth sensors just for one slow sensor.

1 Like


Has anyone had this sort of behavior with this integration? I am using the Govee H5178 Indoor/Outdoor Thermometer Hygrometer. The device screen reads the correct values for everything (I’ve compared them with realtime data from our local airport weather station). However, for the outdoor humidity sensor, HA is showing these sporadic jumps in the data. The device screen is not experiencing this behavior so I’ve ruled out a possible sensor flaw. I speculate this must be something wrong with how the data is being processed by HA. Anyone have any advice?

I am using the LYWSD03MMC sensor and I have a question about sensor readings. Usually, you get updates only every 10 minutes or more. But the device internally can measure much more frequently and also store the measurements. Is it possible that BLE monitor sometimes polls the device actively and retrieves the data stored in the sensor? I think the sensor can store several days of sensor data, and then the accuracy of the history could be much higher in homeassistant if it is retrieved from time to time…

@Koen22 Regarding additional toothbrushes, if you want your toothbrush to be added, we need some data to look into it. The FAQ gives instructions how to get this data.

@mat44150 You request makes sense, I have added a new issue for this. But I have to look into this, as I’m not sure if this is possible with the aioblescan package we use in BLE monitor.

@jeliot Can you collect some data with a hcidump to futher investigate this? Please create an issue on github, where you can add this hcidump. Instructions on how to create a HCIdump can be found in the second part of this FAQ article

@salzrat You can use ATC firmware, in which you can set the broadcasting interval to whatever you want. GitHub - pvvx/ATC_MiThermometer: Custom firmware for the Xiaomi Thermometers and Telink Flasher via USB to Serial converter

2 Likes

Release notes 7.3.8

This release has quite some improvements. I would like to thank @dmamontov, who took care of some of these big changes.

New sensors

New features

  • track devices based on the Beacon UUID (instead of the MAC address). This allows you to track devices that have a non-fixed, rotating MAC address. (@dmamontov)
  • Added the option to disable the Bluetooth interface at all (see explanation at the end of the release notes) (@Ernst)
  • Add support for BLE advertisements with multiple manufacturer specific data packets in one advertisement (@Ernst)

Bug fixes

  • Fix for not being able to change BT adapter after restoring settings on a new machine (#656) (@Ernst)

New translations

Disabling the Bluetooth interface
Disabling the BT adapter can be useful when using ESPHome BLE gateway to forward the BLE messages to BLE monitor and you don’t want to use Bluetooth adapter from your HA machine.

In the UI, you can select “Don’t use Bluetooth adapter” to disable the use of the Bluetooth adapter.

In YAML, you can do this with the following:

ble_monitor:
  bt_interface: "disable"
3 Likes

The iBeacon tracking is amazing. Thank you!

I got myself an inode energey meter which was found straight away on my RPi4
So thank you @Ernst. Great job

OffTopic: Anyone knows how to physically connect the energy meter to the electricty meter. I have no manuals about the physics and hte location of the photosensor

Edit: found it myself

Edit2: I have now 2 Entities

image

I am not sure what the difference is and what to make of the values.

Ok. I figure that the iNode Energy Meter cant be added straight to the dashboard due to missing “state_class”, so i create a template sensor and adjusted the “constant” value

template:
  - sensor:
      - name: "Hausstrom"        
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing        
        state:  "{{ states('sensor.ble_energy_d0f0184412e1') | float | multiply(0.1) | round(1) }}"

It would be great, if the iNODE Energy Meter implentation would recieve a state_class and also if constant can be configured.

thx

After the newest update, my RPi4 is picking up an iBeacon device and I cannot figure out what device it is. It has a temp and humidity sensor that both report negative values, but I have no iBeacon devices that have both a temp and humidity sensor. Is there an easy way I can narrow down what the device is?

You can check the MAC address of the device, which can be seen via integrations, ble monitor, devices and select your iBeacon device. There are apps like Bluetooth BLE scan that can sniff the ble macs being around, look for the same mac. It might give you a clue which one it is.

I also see negative temperature, so this might be just a bug.

@PX80 I remember that you can change the constant that is used to calculate these numbers in the iNode app. See this quote from github

Just for the record, at any time you can calibrate the sensor readings (sensor internal memory) to match the current reading of the actual energy meter (e.g. instead of 0.677 kWh → 9597.2 kWh).

There is an app for this purpose at iNode EM (I use Chrome for Android).

Btw the energy sensor had a sensor class measurement

Hello @Ernst: as mentioned the app is not realiable ( and required BT 4.0 dongle ) and a out of the box experience is anyway the best experience :smiley:
so i wonder if its a big hurdle to make this configurable. i’ve opened an issue on your github in regards to the state_class as well. many thanks for your effort and great job

Ok, I’m pulling my hair out and I’m sure it’s something I’m overlooking or not understanding completely. I’m new to this.

Setup:

  • Latest version of Passive BLE monitor. Bluetooth adapter is disabled, “Discover device and sensors automatically” is enabled.
  • Using an ESPHome device along with the BLE monitor addon for sending the BLE packets.
  • Two Inkbird IBS-TH2 devices that I’m trying to track temps on.

ESPHome seems to be seeing the devices and sending the packets, as I see something like this regularly in the device logs on ESPHome:

[14:42:10][D][ble_gateway:063]: [49:42:08:00:6D:F2] Packet 043E2302010000F26D00084249170201060302F0FF04097370730AFFE5F7A81300D7726406AC

However, I’m not seeing any devices being added under Passive BLE Monitor in Configuration → Devices and Services. It’s just blank. I’ve tried both adding the MAC addresses to Passive BLE Monitor, and not adding them. No difference.

What am I doing wrong?

Relevant ESPHome config:

external_components:
  - source: github://myhomeiot/esphome-components

esp32_ble_tracker:

ble_gateway:
  devices:
    - mac_address: 49:42:08:00:6D:F2
    - mac_address: 49:42:08:00:56:2F
  on_ble_advertise:
    then:
      homeassistant.event:
        event: esphome.on_ble_advertise
        data:
          packet: !lambda return packet;

HA automation, which is being triggered regularly per the Logbook:

- alias: ESPHome BLE Advertise
  mode: queued
  trigger:
    - platform: event
      event_type: esphome.on_ble_advertise
  action:
    - service: ble_monitor.parse_data
      data:
        packet: "{{ trigger.event.data.packet }}"

Thanks in advance…

1 Like

Is it possible to turn off the iBeacon detection?

After I upgraded from 7.2 to 7.3.8 the PI3 I am using for BLE detection is running at 60 - 70% cpu and is unresponsive. I see several iBeacon advertisements that must be from neighbours and these are updating every few seconds. Even when I exclude these from the recorder the system hangs after an hour or so because it runs out of memory.

Downgrading to 7.2 resolves these issues

At the moment, you can achieve this by turning off discovery in the BLE monitor settings and click on submit, so that discovery is turned off. Reopen the options again and delete the iBeacon MAC addresses from the devices pull down menu, by selecting one, and click on submit. In the new window, scroll down to the bottom, there should be an option to delete the device. Select this option and click on submit. Redo this for every MAC you want to delete. It won’t be added anymore after that, since you turned off discovery. However, note that if you buy a new device, you will have to add the MAC manually, or turn on discovery for a short while.