Open Magalex2x14 opened 2 years ago
The case described above refers to a YAML-configured integration
Just to understand. in first instance, both hci interfaces are not available
2022-04-07 17:11:14 ERROR (MainThread) [custom_components.ble_monitor] Bluetooth interface hci1 is not available
2022-04-07 17:11:14 ERROR (MainThread) [custom_components.ble_monitor] Bluetooth interface hci0 is not available
But, as it has been set up in YAML, it just ignores this fact, and configures hci0
and hci1
anyway
2022-04-07 17:11:14 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'hci_interface': [1, 0], 'bt_auto_restart': True, 'active_scan': False, 'discovery': False, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': True, 'report_unknown': False, 'devices': [{'mac': 'XX:XX:XX:XX:XX:XX', 'name': 'Température salon', 'encryption_key': '8b903cb68eb7dc12db481d2396467ccd', 'temperature_unit': '°C', 'decimals': 2, 'use_median': False, 'restore_state': True, 'report_unknown': False, 'consider_home': 180, 'track_device': False, 'tracker_scan_interval': 20, 'reset_timer': 35}, {'mac': 'XX:XX:XX:XX:XX:XX', 'name': 'Température entrée', 'encryption_key': '82cf0c1e3e539c7a3845da6127019d19', 'temperature_unit': '°C', 'decimals': 2, 'use_median': False, 'restore_state': True, 'report_unknown': False, 'consider_home': 180, 'track_device': False, 'tracker_scan_interval': 20, 'reset_timer': 35}], 'batt_entities': True, 'bt_interface': [], 'is_flow': False, 'ids_from_name': True}
It than just starts to connect to the hci interfaces, and it even is able to connect.
2022-04-07 17:11:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: connected to hci0
In the end it fails, as it doesn't support LE capabilities.
question What I don't understand yet is why it is saying in the begin that the hci interface is unavailable, while later on, it is able to connect to it.
possible solution Modify the code that it doesn't setup hci0 and hci1, if it is "unavailable" (like is done in UI mode).
What happened?
Log from issue #815 highlighted a bug - integration keeps trying to collect data from unavailable (or not LE) interfaces. Next will be a slightly cleaned up log (the original is here).
Sensor type
No response
Relevant log output