2024年11月24日星期日 下午4:59:03

Passive BLE Monitor integration(Add Xiami motion sensor 2 (RTCGQ02LM) to home assistant) bindkey

1 年 前
#19987 引用
Step 3b. Configuration in YAML

Alternatively, you can add the configuration in configuration.yaml as explained below. The options are the same as in the UI and are explained in the configuration parameters section below. After adding your initial configuration to your YAML file, or applying a configuration change in YAML, a restart is required to load the new configuration. Depending on the sensor, the sensors should be added to your Home Assistant automatically within a few seconds till 10 minutes.

An example of configuration.yaml with the minimum configuration is:

https://custom-components.github.io/ble_monitor/Installation#step-3b-configuration-in-yaml



ble_monitor:
  bt_interface: 'B8:27:EB:2A:96:FA'
  bt_auto_restart: False
  active_scan: False
  discovery: True
  period: 30
  use_median: False
  decimals: 1
  log_spikes: False
  restore_state: False
  report_unknown: False
  devices:
    # sensor
    - mac: '54:EF:44:C4:82:83'
      name: 'Motion Sensor 8283 (RTCGQ02LM)'
      encryption_key: '4ad82cfd1d1c4796b9869502037dce5d'
      temperature_unit: C
      decimals: 2
      use_median: False
      restore_state: default
      report_unknown: False
    - mac: 'C4:3C:4D:6B:4F:F3'
      name: 'Bedroom'
      temperature_unit: F
    - mac: 'B4:7C:8D:6D:4C:D3'
      reset_timer: 35
    # device tracker
    - mac: 'D4:3C:2D:4A:3C:D5'
      track_device: True
      tracker_scan_interval: 20
      consider_home: 180
    # ibeacon
    - uuid: 'e2c56db5-dffb-48d2-b060-d0f5a71096e0'
      track_device: True
      tracker_scan_interval: 20
      consider_home: 180




0
1 年 前
#19988 引用
as BLE monitor only listen passively to BLE advertisements.

Passive BLE monitor is a passive scanner, so it wont affect battery life (with active scan set to False). It is just listening to BLE advertisements, it does not send anything to your sensors, like is being done with sensors that require a connection.

real example as follow

https://bbs.hassbian.com/thread-13056-1-19.html



ble_monitor:
  bt_interface: '43:45:C0:XX:XX:XX'
  ##n1蓝牙mac
  discovery: True
  active_scan: False
  report_unknown: False
  batt_entities: False
  decimals: 1
  period: 10
  log_spikes: False
  use_median: False
  restore_state: False
  devices:
    - mac: 'A4:C1:38:XX:XX:XX'
      name: '小房温湿度计'
      encryption_key: '6a5b67911507f57047XXXXXXXXXXXXX'    # 加密设备才需要bindkey  32位数字和字母组成(目前仅有LYWSD03MMC加密)
      temperature_unit: C
      decimals: 2
      use_median: False
      restore_state: default
    - mac: '88:0F:10:80:XX:XX'
      name: scales##体重秤1
    - mac: 'A4:C1:38:79:XX:XX'
      name: '客厅温湿度计'
      encryption_key: 'dd9a5e66ca6890541bXXXXXXXXXXX'
      temperature_unit: C
      decimals: 2
      use_median: False
      restore_state: default
    - mac: 'A4:C1:38:2A:XX:XX'
      name: '衣帽间温湿度计'
      encryption_key: '1f0b14ac1df46e863bXXXXXXXXXX'
      temperature_unit: C
      decimals: 2
      use_median: False
      restore_state: default
    - mac: 'C4:7C:8D:65:XX:XX'
      name: '花花草草监测仪'
    - mac: 'E4:AA:EC:34:XX:XX'
      name: '阳台门窗感应器2'
      encryption_key: '3a52aa3cc2cd80f34e9XXXXXXXX'

0
1 年 前
#20089 引用
1
0
1 年 前
#20090 引用
1
0
1 年 前
#20091 引用
passive BLE Monitor

ble_monitor

Note:已集成到 home assistant  core xiaomi BLE integration  20221118 updated

https://github.com/custom-components/ble_monitor


BLE monitor passively monitors BLE sensors (Xiaomi, Qingping, ATC, BlueMaestro, Brifit, Govee, Kegtron, Moat, Inkbird, iNode, Yeelight, RuuviTag, SensorPush, Teltonika, Thermoplus and Thermopro) (by custom-components)

Home Assistant 2022.8 has (improved) support for passive BLE devices directly in Home Assistant.

For each brand, a core BLE integration will be developed, such that maintanance can be divided over more people, using the latest Bluetooth packages (bleak). I'm working together with the Home Assistant devs to move sensors from BLE Monitor to Home Assistant core integrations. During the transition, BLE monitor will still be available, but it is possible that the core HA Bluetooth integrations will not work niceley parallel to BLE monitor. If it is not working together, try to enable active scan in the BLE Monitor. My advise, when all your sensors are available in Home Assistant, make the move. The aim is to have all sensors moved into Home Assistant as core integration.

After the move, BLE monitor will probably be deprecated. If you want to help moving sensors from BLE monitor, feel free to help. Check out the links below.





0
1 年 前
#20092 引用
Error stopping scanner: [org.bluez.Error.Failed] No discovery started

2023-01-21 18:06:47.393 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:x96:FA): Error stopping scanner: [org.bluez.Error.Failed] No discovery started
0
1 年 前
#20093 引用

Bluetooth Integration Fails to Setup/Start Bluetooth Adapter

Failed to start Bluetooth: [org.bluez.Error.InProgress]

The problem

Logger: homeassistant.config_entries
Source: config_entries.py:1089
First occurred: 5:26:55 PM (1 occurrences)
Last logged: 5:26:55 PM

Config entry 'B8:27:EB:2A:96:FA' for bluetooth integration not ready yet: hci0 (B8:27:EB:2A:96:FA): Failed to start Bluetooth: [org.bluez.Error.InProgress] Operation already in progress; Retrying in background


https://github.com/home-assistant/core/issues/78530

a lot of BT devices dead


reason

The Bluetooth integration will detect nearby Bluetooth devices. Discovered devices will show up in the discovered section on the integrations page in the configuration panel.



s

The adapter you have isn't supported
no BT LE capabilities and will be ignored


Please use a supported adapter https://www.home-assistant.io/integrations/bluetooth
0
1 年 前
#20099 引用
Passive BLE Monitor integration集成常见问题集

https://github.com/custom-components/ble_monitor/blob/f5977a9e04f430ca2afe18ea4e927e0884982ee2/faq.md#why-is-this-component-called-passive-and-what-does-it-mean
0
1 年 前
#20140 引用
You'll need to install the new bluetooth_auto_recovery pypi package

https://github.com/home-assistant/core/issues/76544#issuecomment-1221369592


s

https://pypi.org/project/bluetooth-auto-recovery/

Install this via pip (or your favourite package manager):

pip3 install bluetooth-auto-recovery


output

Successfully installed PyRIC-0.1.6.3 bluetooth-auto-recovery-1.0.3 btsocket-0.2.0 usb-devices-0.4.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
0
1 年 前
#20145 引用
Bluetooth scanner has gone quiet for 90s, restarting


2023-01-25 08:27:00.777 INFO (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Bluetooth scanner has gone quiet for 90s, restarting
2023-01-25 08:27:00.783 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Error stopping scanner: [org.bluez.Error.Failed] No discovery started
2023-01-25 08:29:00.782 INFO (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Bluetooth scanner has gone quiet for 90s, restarting
2023-01-25 08:47:30.829 INFO (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Bluetooth scanner has gone quiet for 90s, restarting
2023-01-25 08:47:32.847 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Error stopping scanner: [org.bluez.Error.InProgress] Operation already in progress
2023-01-25 08:49:30.834 INFO (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:xx:xx:cc:xx): Bluetooth scanner has gone quiet for 90s, restarting



0