『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: riceball

自制开源ESPHome通用蓝牙网关(ESP32)

  [复制链接]

0

主题

4

帖子

40

积分

新手上路

Rank: 1

积分
40
金钱
36
HASS币
0
发表于 2022-5-18 19:43:33 | 显示全部楼层
感谢分享,做了一个,用的是d1 r32,安装顺利没有任何问题,C3下单了,封城了不知道啥时候能送来。用起来挺好的,就是觉得每次重启HA之后蓝牙网关同步不太顺利,要拿到主机那里去识别一下就连上了,先观察几天,研究一下
回复

使用道具 举报

26

主题

357

帖子

2978

积分

金牌会员

Rank: 6Rank: 6

积分
2978
金钱
2621
HASS币
10
发表于 2022-5-18 20:02:39 | 显示全部楼层
riceball 发表于 2022-5-18 07:20
还是得查日志阿, 蓝牙没开?

2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor entry (config entry): <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: domain {}
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] Bluetooth interface is disabled
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is ['disable']
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': True, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] Spawning HCIdump thread
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: Init
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] 0 encryptors mac:key pairs loaded
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] sensor whitelist: []
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] 0 sensor whitelist item(s) loaded
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] 0 device tracker(s) being monitored
2022-05-17 17:50:25 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:50:25 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:50:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Starting binary sensor entry startup
2022-05-17 17:50:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialization
2022-05-17 17:50:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialized
2022-05-17 17:50:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary sensor entry setup finished
2022-05-17 17:50:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary entities updater loop started!

2022-05-17 17:50:43 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Starting device tracker entry startup
2022-05-17 17:50:43 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialization
2022-05-17 17:50:43 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialized
2022-05-17 17:50:43 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device Tracker entry setup finished
2022-05-17 17:50:43 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device tracker updater loop started!

2022-05-17 17:51:43 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 17:51:46 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Starting measuring sensor entry startup
2022-05-17 17:51:46 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialization
2022-05-17 17:51:46 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialized
2022-05-17 17:51:46 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Measuring sensor entry setup finished

2022-05-17 17:51:52 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop started!



2022-05-17 17:52:26 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: None
2022-05-17 17:52:26 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (before): {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': True, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}

2022-05-17 17:53:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:53:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:53:14 DEBUG (Thread-3) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:53:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:53:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:53:14 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 17:53:14 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)

2022-05-17 17:53:19 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)

2022-05-17 17:54:14 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 17:54:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:54:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:54:14 DEBUG (Thread-3) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:54:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:54:14 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:54:14 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)

2022-05-17 17:54:19 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)

2022-05-17 17:55:05 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: None
2022-05-17 17:55:05 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (before): {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': True, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (after): {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] _create_entry: {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] async_unload_entry: <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joining
2022-05-17 17:55:11 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:55:11 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Run finished
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joined
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] BLE monitor stopped
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor entry (config entry): <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: domain {}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] Bluetooth interface is disabled
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is ['disable']
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] Spawning HCIdump thread
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: Init
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] 0 encryptors mac:key pairs loaded
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] sensor whitelist: []
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] 0 sensor whitelist item(s) loaded
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor] 0 device tracker(s) being monitored
2022-05-17 17:55:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Starting device tracker entry startup
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialization
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialized
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device Tracker entry setup finished
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Starting binary sensor entry startup
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialization
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialized
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary sensor entry setup finished
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Starting measuring sensor entry startup
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialization
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialized
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Measuring sensor entry setup finished
2022-05-17 17:55:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device tracker updater loop started!
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary entities updater loop started!
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop started!
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Entities updater loop stopped
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop stopped
2022-05-17 17:55:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Entities updater loop stopped

2022-05-17 17:56:11 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 17:56:11 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 17:56:11 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 17:56:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:56:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:56:11 DEBUG (Thread-18) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:56:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:56:11 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:57:12 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 17:57:12 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 17:57:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:57:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:57:12 DEBUG (Thread-18) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:57:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:57:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:57:12 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 17:58:12 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 17:58:12 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 17:58:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:58:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:58:12 DEBUG (Thread-18) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:58:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:58:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:58:12 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 17:59:12 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 17:59:12 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 17:59:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:59:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 17:59:12 DEBUG (Thread-18) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 17:59:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:59:12 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:59:12 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 17:59:56 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: None
2022-05-17 17:59:56 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (before): {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 17:59:57 WARNING (MainThread) [androidtv.adb_manager.adb_manager_async] Couldn't connect to 192.168.2.78:5555.  OSError: Connect call failed ('192.168.2.78', 5555)
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (after): {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] _create_entry: {'bt_interface': [], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] async_unload_entry: <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joining
2022-05-17 17:59:59 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 17:59:59 DEBUG (Thread-18) [custom_components.ble_monitor] HCIdump thread: Run finished
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joined
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] BLE monitor stopped
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor entry (config entry): <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: domain {}
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] Bluetooth interface is disabled
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is ['disable']
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] Spawning HCIdump thread
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: Init
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] 0 encryptors mac:key pairs loaded
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] sensor whitelist: []
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] 0 sensor whitelist item(s) loaded
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor] 0 device tracker(s) being monitored
2022-05-17 17:59:59 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Starting device tracker entry startup
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialization
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialized
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device Tracker entry setup finished
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Starting binary sensor entry startup
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialization
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialized
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary sensor entry setup finished
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Starting measuring sensor entry startup
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialization
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialized
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Measuring sensor entry setup finished
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device tracker updater loop started!
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary entities updater loop started!
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop started!
2022-05-17 17:59:59 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Entities updater loop stopped
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop stopped
2022-05-17 17:59:59 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Entities updater loop stopped
2022-05-17 18:00:42 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: None
2022-05-17 18:00:42 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (before): {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 18:01:00 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:01:00 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:01:00 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 18:01:00 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:01:00 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:01:00 DEBUG (Thread-38) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:01:00 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:01:00 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:01:17 WARNING (MainThread) [androidtv.adb_manager.adb_manager_async] Couldn't connect to 192.168.2.78:5555.  OSError: Connect call failed ('192.168.2.78', 5555)
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (after): {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] _create_entry: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': '--Devices--'}
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] async_unload_entry: <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joining
2022-05-17 18:01:32 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:01:32 DEBUG (Thread-38) [custom_components.ble_monitor] HCIdump thread: Run finished
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: joined
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] BLE monitor stopped
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor entry (config entry): <homeassistant.config_entries.ConfigEntry object at 0x7f6b4fbc6700>
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: domain {}
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] Bluetooth interface is disabled
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is ['disable']
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'bt_interface': ['disable'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 1, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [], 'is_flow': True, 'hci_interface': ['disable']}
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] Spawning HCIdump thread
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: Init
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] 0 encryptors mac:key pairs loaded
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] sensor whitelist: []
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] 0 sensor whitelist item(s) loaded
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor] 0 device tracker(s) being monitored
2022-05-17 18:01:32 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:01:32 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Starting device tracker entry startup
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialization
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialized
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device Tracker entry setup finished
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Starting binary sensor entry startup
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialization
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialized
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary sensor entry setup finished
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Starting measuring sensor entry startup
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialization
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialized
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Measuring sensor entry setup finished
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device tracker updater loop started!
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary entities updater loop started!
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop started!
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Entities updater loop stopped
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop stopped
2022-05-17 18:01:32 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Entities updater loop stopped
2022-05-17 18:02:33 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:02:33 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:02:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:02:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:02:33 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:02:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:02:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:02:33 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 18:03:33 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:03:33 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:03:33 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 18:03:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:03:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:03:33 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:03:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:03:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop

2022-05-17 18:04:33 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:04:33 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:04:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:04:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:04:33 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:04:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:04:33 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:04:33 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 18:05:34 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:05:34 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:05:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:05:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:05:34 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:05:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:05:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:05:34 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 18:06:34 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:06:34 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:06:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:06:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:06:34 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:06:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:06:34 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:06:34 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

2022-05-17 18:07:35 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:07:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:07:35 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 18:07:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:07:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:07:35 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:07:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:07:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop

2022-05-17 18:08:35 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:08:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:08:35 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 18:08:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:08:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:08:35 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:08:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:08:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop

2022-05-17 18:09:35 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:09:35 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:09:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:09:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:09:35 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:09:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:09:35 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:09:35 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)
2022-05-17 18:10:36 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2022-05-17 18:10:36 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 BLE advertisements processed for 0 binary sensor device(s)
2022-05-17 18:10:36 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2022-05-17 18:10:36 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2022-05-17 18:10:36 DEBUG (Thread-45) [custom_components.ble_monitor] 0 HCI events processed for previous period
2022-05-17 18:10:36 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: Run
2022-05-17 18:10:36 DEBUG (Thread-45) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2022-05-17 18:10:36 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 BLE advertisements processed for 0 sensor device(s)

回复

使用道具 举报

26

主题

357

帖子

2978

积分

金牌会员

Rank: 6Rank: 6

积分
2978
金钱
2621
HASS币
10
发表于 2022-5-18 20:05:02 | 显示全部楼层
riceball 发表于 2022-5-18 07:20
还是得查日志阿, 蓝牙没开?

我在集成里就不显示自制蓝牙网关,也不显示原来主机上的usb蓝牙适配器。
回复

使用道具 举报

19

主题

290

帖子

1510

积分

论坛技术达人

积分
1510
金钱
1205
HASS币
130
 楼主| 发表于 2022-5-19 06:30:10 | 显示全部楼层
shavn1984 发表于 2022-5-18 20:02
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor en ...
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] Bluetooth interface is disabled
2022-05-17 17:50:25 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is ['disable']


你这个是ble_monitor的日志,不是esphome网关的日志, 如果要自动发现没有加密的设备,必须要在集成启用自动发现配置. 否则你得自己加上设备的MAC地址,如果是加密的,还要有加密Key.

另外 input_boolean.settings_ble_gateway 实体设置为"on"没有?

执行 `esphome logs bluegateway.yaml --device /dev/ttyUSB0` 查看 蓝牙网关日志. 远程查看可以用 ESPHome addon, 建一个同名的空配置即可.
回复

使用道具 举报

19

主题

290

帖子

1510

积分

论坛技术达人

积分
1510
金钱
1205
HASS币
130
 楼主| 发表于 2022-5-19 06:37:54 | 显示全部楼层
nucleic_acid 发表于 2022-5-18 19:43
感谢分享,做了一个,用的是d1 r32,安装顺利没有任何问题,C3下单了,封城了不知道啥时候能送来。用起来挺 ...

留意下日志, 更新了文档,加上如何查看 ESPHome 日志
回复

使用道具 举报

0

主题

4

帖子

40

积分

新手上路

Rank: 1

积分
40
金钱
36
HASS币
0
发表于 2022-5-19 12:10:07 | 显示全部楼层
本帖最后由 nucleic_acid 于 2022-5-19 13:18 编辑
riceball 发表于 2022-5-19 06:37
留意下日志, 更新了文档,加上如何查看 ESPHome 日志

刚才看了你之前的帖子

使用Passive BLE Monitor集成代替蓝牙网关直接接入HA
https://bbs.hassbian.com/thread-16148-1-1.html
发现重启后恢复状态没有勾选,勾了之后就好了,非常完美

下面的内容是之前发的,就不删了

=================================================================================

[11:13:44][C][logger:274]: Logger:
[11:13:44][C][logger:275]:   Level: DEBUG
[11:13:44][C][logger:276]:   Log Baud Rate: 115200
[11:13:44][C][logger:277]:   Hardware UART: UART0
[11:13:44][C][ble_gateway:055]: BLE Gateway: Discovery NO, 0 device(s) configured:
[11:13:44][C][version.text_sensor:021]: Version Text Sensor 'blegateway1 ESPHome Version'
[11:13:44][C][version.text_sensor:021]:   Icon: 'mdi:new-box'
[11:13:44][C][esp32_ble_tracker:712]: BLE Tracker:
[11:13:44][C][esp32_ble_tracker:713]:   Scan Duration: 300 s
[11:13:44][C][esp32_ble_tracker:714]:   Scan Interval: 320.0 ms
[11:13:44][C][esp32_ble_tracker:715]:   Scan Window: 30.0 ms
[11:13:44][C][esp32_ble_tracker:716]:   Scan Type: ACTIVE
[11:13:44][C][mdns:084]: mDNS:
[11:13:44][C][mdns:085]:   Hostname: blegateway1
[11:13:44][C][ota:085]: Over-The-Air Updates:
[11:13:44][C][ota:086]:   Address: blegateway1.local:3232
[11:13:44][C][ota:089]:   Using Password.
[11:13:44][C][api:138]: API Server:
[11:13:44][C][api:139]:   Address: blegateway1.local:6053
[11:13:44][C][api:143]:   Using noise encryption: NO
[11:13:44][C][wifi_info:009]: WifiInfo IPAddress 'blegateway1 IP address'
[11:13:44][C][wifi_signal.sensor:009]: WiFi Signal 'blegateway1 WiFi Signal Sensor'
[11:13:44][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[11:13:44][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[11:13:44][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[11:13:44][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[11:13:44][C][homeassistant.text_sensor:023]: Homeassistant Text Sensor 'ble_gateway_devices'
[11:13:44][C][homeassistant.text_sensor:024]:   Entity ID: 'binary_sensor.ble_gateway'
[11:13:44][C][homeassistant.text_sensor:026]:   Attribute: 'devices'
[11:13:58][D][sensor:125]: 'blegateway1 WiFi Signal Sensor': Sending state -43.00000 dBm with 0 decimals of accuracy
这是HA重启之后的日志,ESP32上没有任何蓝牙设备,如果HA附近没有蓝牙设备连上去,等很久也不会同步,ESP32一直显示在扫描
然后我将蓝牙设备拿到HA附近,检测到设备后,会自动同步连上的设备到ESP32

[11:32:01][D][homeassistant.text_sensor:015]: 'binary_sensor.ble_gateway::devices': Got attribute state 'C37F254D462D'
[11:32:01][D][text_sensor:067]: 'ble_gateway_devices': Sending state 'C37F254D462D'
[11:32:01][D][ble_gateway:079]: set_devices: (3C37F254D462D)
重新载入后就可以看到有新发现的设备添加进去了
[11:40:31][C][ble_gateway:055]: BLE Gateway: Discovery NO, 1 device(s) configured:
[11:40:31][C][ble_gateway:057]:   MAC address: C3:7F:25:4D:46:2D
HA上原来是有好几个已发现的实体的,我认为ESP32应该是自动同步已发现实体的MAC地址,但是现在的情况是自动同步新发现的MAC(也不是不可以接受),已发现但未连接到HA的设备不会同步到ESP32,最难受的是HA重启之后,ESP32里的MAC就清空了,HA要重新连接蓝牙设备,才能再次下发MAC到ESP32。
如果楼主使用没问题的话,我这不知道是哪里出了问题,还需要在研究一下,或者等C3的板子来了再试试看。





回复

使用道具 举报

26

主题

357

帖子

2978

积分

金牌会员

Rank: 6Rank: 6

积分
2978
金钱
2621
HASS币
10
发表于 2022-5-19 16:21:16 | 显示全部楼层
本帖最后由 shavn1984 于 2022-5-19 16:26 编辑
riceball 发表于 2022-5-19 06:30
你这个是ble_monitor的日志,不是esphome网关的日志, 如果要自动发现没有加密的设备,必须要在集成启用自 ...

QQ图片20220519160110.png
感觉问题还是在ble moniotr集成上。我之前自动扫描加入过几个设备,小米电水壶、小米温湿度2刷了ATC固件、小米体脂秤2.  自从上次手动删除这些设备后就再也扫描不到了。尝试过升级ha,重新安装ble集成和降级版本,手动删除core.config_entries里的实体都不行。。而且每次我去掉"不适用蓝牙适配器"钩选项提交后,再次打开依然钩上了。现在不管是勾选不勾选都扫描不到设备,即用ha蓝牙适配器和esp32网关都不行,,ha ble debug日志就是之前发的。

ha版本2022.5.4    群晖nas docker版本
ble moniotr版本8.6.5

在群晖下可以使用这些命令,可以扫描设备
root@shavnnas:~# hcitool lescan
LE Scan ...
A4:C1:38:FF:37A (unknown)
00:09:B0:BB:1A:4A (unknown)
A4:C1:38:FF:37A ATC_FF37DA
^Croot@shavnnas:~# hcitool dev
Devices:
        hci0        00:19:86:00:3B:FC


看官方安装步骤,需要授权。但是不知道怎么弄,之前也没操作过这块就可以自动扫描设备Step 0. Grant permissions for Python to have rootless access to the HCI interface
This is usually only needed for alternative installations of Home Assistant that only install Home Assistant core. Also, for alternative installations, please note that BlueZ package must be installed on the system, but its bluetooth daemon service can be stopped and disabled, if you are sure of such a need.
  • to grant access:
       sudo setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f \`which python3\``

  • to verify:
       sudo getcap `readlink -f \`which python3\``



input_boolean.settings_ble_gateway 实体也设置为"on"


以下是esphome log:

INFO Reading configuration /config/esphome-web-084270.yaml...WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.INFO Starting log output from esphome-web-084270.local using esphome APIINFO Successfully connected to esphome-web-084270.local[08:09:22][I][app:102]: ESPHome version 2022.4.0 compiled on May 17 2022, 12:15:25[08:09:22][C][wifi:491]: WiFi:[08:09:22][C][wifi:353]:   Local MAC: 84:0D:8E:08:42:70[08:09:22][C][wifi:354]:   SSID: 'shavn'[redacted][08:09:22][C][wifi:355]:   IP Address: 192.168.2.104[08:09:22][C][wifi:357]:   BSSID: F0:9F:C2:F4:B1:21[redacted][08:09:22][C][wifi:358]:   Hostname: 'esphome-web-084270'[08:09:22][C][wifi:360]:   Signal strength: -42 dB ▂▄▆█[08:09:22][C][wifi:364]:   Channel: 1[08:09:22][C][wifi:365]:   Subnet: 255.255.255.0[08:09:22][C][wifi:366]:   Gateway: 192.168.2.1[08:09:22][C][wifi:367]:   DNS1: 192.168.2.1[08:09:22][C][wifi:368]:   DNS2: 0.0.0.0[08:09:22][C][logger:233]: Logger:[08:09:22][C][logger:234]:   Level: DEBUG[08:09:22][C][logger:235]:   Log Baud Rate: 115200[08:09:22][C][logger:236]:   Hardware UART: UART0[08:09:22][C][ble_gateway:055]: BLE Gateway: Discovery NO, 0 device(s) configured:[08:09:22][C][esp32_ble_tracker:712]: BLE Tracker:[08:09:22][C][esp32_ble_tracker:713]:   Scan Duration: 300 s[08:09:22][C][esp32_ble_tracker:714]:   Scan Interval: 320.0 ms[08:09:22][C][esp32_ble_tracker:715]:   Scan Window: 30.0 ms[08:09:22][C][esp32_ble_tracker:716]:   Scan Type: ACTIVE[08:09:22][C][web_server:129]: Web Server:[08:09:22][C][web_server:130]:   Address: esphome-web-084270.local:80[08:09:22][C][mdns:084]: mDNS:[08:09:22][C][mdns:085]:   Hostname: esphome-web-084270[08:09:22][C][ota:085]: Over-The-Air Updates:[08:09:23][C][ota:086]:   Address: esphome-web-084270.local:3232[08:09:23][C][ota:089]:   Using Password.[08:09:23][C][api:138]: API Server:[08:09:23][C][api:139]:   Address: esphome-web-084270.local:6053[08:09:23][C][api:143]:   Using noise encryption: NO[08:09:23][C][homeassistant.text_sensor:023]: Homeassistant Text Sensor 'ble_gateway_devices'[08:09:23][C][homeassistant.text_sensor:024]:   Entity ID: 'binary_sensor.ble_gateway'[08:09:23][C][homeassistant.text_sensor:026]:   Attribute: 'devices'




[td]
Time
level
Tag
Message
16:10:42[D][esp32_ble_tracker:217]Starting scan...
16:10:42[D][esp32_ble_tracker:726]Found device 00:E3:5F:3A:06:08 RSSI=-40
16:10:42[D][esp32_ble_tracker:747]  Address Type: RANDOM
16:10:45[D][esp32_ble_tracker:726]Found device 72:C4:9D:A6:22:1C RSSI=-67
16:10:45[D][esp32_ble_tracker:747]  Address Type: RANDOM
16:10:45[D][esp32_ble_tracker:751]  TX Power: 2
16:10:46[D][esp32_ble_tracker:726]Found device EC:4D:3E:868:6C RSSI=-61
16:10:46[D][esp32_ble_tracker:747]  Address Type: PUBLIC
16:11:13[D][esp32_ble_tracker:726]Found device 72:8D:B5:5B:1D:4D RSSI=-73
16:11:13[D][esp32_ble_tracker:747]  Address Type: RANDOM
16:11:13[D][esp32_ble_tracker:751]  TX Power: 2
16:11:33[D][esp32_ble_tracker:726]Found device B8:7C:6F:32:95F RSSI=-90
16:11:33[D][esp32_ble_tracker:747]  Address Type: PUBLIC
16:11:33[D][esp32_ble_tracker:749]  Name: 'MiKettle'
看日志esp32网关应该是扫描到设备了

Don't use Bluetooth adapter
th adapterDon't use Bluetooth adapterDDon't use Bluetooth adapteron't use Bluetooth adapter

回复

使用道具 举报

19

主题

290

帖子

1510

积分

论坛技术达人

积分
1510
金钱
1205
HASS币
130
 楼主| 发表于 2022-5-19 18:02:37 | 显示全部楼层
本帖最后由 riceball 于 2022-5-19 18:11 编辑
shavn1984 发表于 2022-5-19 16:21
感觉问题还是在ble moniotr集成上。我之前自动扫描加入过几个设备,小米电水壶、小米温湿度2刷了ATC固件 ...

很明显  HA主机上没有找到蓝牙适配器, 也可能是实体硬件没有传递到 docker 中.

我也是 [email protected] 今天升级的, 刚看了看蓝牙设备正常上报数据.

看上去是像ble_monitor没有激活
回复

使用道具 举报

26

主题

357

帖子

2978

积分

金牌会员

Rank: 6Rank: 6

积分
2978
金钱
2621
HASS币
10
发表于 2022-5-19 20:08:29 | 显示全部楼层
riceball 发表于 2022-5-19 18:02
很明显  HA主机上没有找到蓝牙适配器, 也可能是实体硬件没有传递到 docker 中.

我也是 [email protected] 今天 ...

这还需要激活? 删除重装集成也没用,是不是有哪里没删干净?
回复

使用道具 举报

19

主题

290

帖子

1510

积分

论坛技术达人

积分
1510
金钱
1205
HASS币
130
 楼主| 发表于 2022-5-19 20:37:50 | 显示全部楼层
shavn1984 发表于 2022-5-19 20:08
这还需要激活? 删除重装集成也没用,是不是有哪里没删干净?

我的意思是HA上找不到蓝牙适配器硬件, 所以 bt_interface 是 disable 的(没激活的)

你是在 docker 容器里执行的 hcitool ,还是在主机上执行的?

另外如果只用 ESPHome 蓝牙网关(主机上没有蓝牙适配器), 那就要手动在ble_monitor上添加设备,没法自动发现的.
我看你ble_monitor上一个已知的设备都没有.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-22 09:42 , Processed in 0.061982 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表