Unable to connect LYWSD03MMC
See original GitHub issueI have HA running on Raspberry Pi OS and want to connect to LYWSD03MMC devices. It seems somehow it can’t connect:
2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] Starting 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] Spawning HCIdump thread(s). 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] HCIdump thread: Init 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] HCIdump thread: Init finished 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] Starting HCIdump thread for hci0 2020-06-11 12:44:48 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: Run 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] HCIdump threads count = 1 2020-06-11 12:44:48 INFO (SyncWorker_12) [custom_components.mitemp_bt.sensor] Attention! Option report_unknown is enabled, be ready for a huge output… 2020-06-11 12:44:48 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: Connection 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] 1 encryptors mac:key pairs loaded. 2020-06-11 12:44:48 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] 0 whitelist item(s) loaded. 2020-06-11 12:44:48 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: Connected 2020-06-11 12:44:48 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: start main event_loop 2020-06-11 12:44:49 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] update_ble called 2020-06-11 12:44:50 DEBUG (SyncWorker_12) [custom_components.mitemp_bt.sensor] First run, skip parsing. 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] update_ble called 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Discovering Bluetooth LE devices 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Time to analyze… 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Getting data from HCIdump thread 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] HCIdump thread: joining 2020-06-11 12:45:51 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: main event_loop stopped, finishing 2020-06-11 12:45:51 DEBUG (Thread-2) [custom_components.mitemp_bt.sensor] HCIdump thread: Run finished 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] HCIdump thread: joined 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Spawning HCIdump thread(s). 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] HCIdump thread: Init 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] HCIdump thread: Init finished 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Starting HCIdump thread for hci0 2020-06-11 12:45:51 DEBUG (Thread-18) [custom_components.mitemp_bt.sensor] HCIdump thread: Run 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] HCIdump threads count = 1 2020-06-11 12:45:51 DEBUG (Thread-18) [custom_components.mitemp_bt.sensor] HCIdump thread: Connection 2020-06-11 12:45:51 DEBUG (Thread-18) [custom_components.mitemp_bt.sensor] HCIdump thread: Connected 2020-06-11 12:45:51 DEBUG (Thread-18) [custom_components.mitemp_bt.sensor] HCIdump thread: start main event_loop 2020-06-11 12:45:51 DEBUG (SyncWorker_10) [custom_components.mitemp_bt.sensor] Finished. Parsed: 1315 hci events, 0 xiaomi devices.
Configuration:
sensor:
- platform: mitemp_bt
rounding: True
decimals: 1
period: 60
log_spikes: False
use_median: False
active_scan: False
hci_interface: 0
batt_entities: False
encryptors:
'A4:C1:38:E1:xx:xx': '39D7A24A719D7F65556B30CC70EAxxxx'
report_unknown: True`
In the hcitrace.txt file is see the sensor showing up many times:
HCI Event: LE Meta Event (0x3e) plen 33 #18 [hci0] 1.766815 LE Advertising Report (0x02) Num reports: 1 Event type: Connectable undirected - ADV_IND (0x00) Address type: Public (0x00) Address: A4:C1:38:E1:xx:xx(Telink Semiconductor (Taipei) Co. Ltd.) Data length: 21 Flags: 0x06 LE General Discoverable Mode BR/EDR Not Supported Service Data (UUID 0xfe95): 30585b050141dde138c1a4280100`
Python:
/usr/bin/python3.7 = cap_net_admin,cap_net_raw+eip`
System:
arch | armv7l dev | false docker | false hassio | false installation_type | Home Assistant Core in a Python Virtual Environment os_name | Linux os_version | 4.19.118-v7l+ python_version | 3.7.3 timezone | Europe/Brussels version | 0.110.6 virtualenv | true
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:17
That most likely explains it, SSD turn out to be interfering with the Bluetooth signal (I had the same issue). The FAQ gives a few hints to solve this.
What you can try is using a long cable for your SSD or using an external Bluetooth adapter, preferable with an USB extension cable. Main goal is to get the SSD as far away as possible compared to the Bluetooth radio.
Yes I did: don’t recall exactly when but should have been around the same time. How can I avoid it?