esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
293 stars 36 forks source link

Generic ESP32 proxy not working with Mi Flora #3689

Open TB-SE opened 2 years ago

TB-SE commented 2 years ago

Home Assistant: 2022.10.1 Supervisor: 2022.09.1 Operating System: 9.0 Frontend: 20221006.0

Current ESP32 yaml config:

substitutions:
  name: "esp32-bluetooth-proxy"

esphome:
  name: ${name}
  name_add_mac_suffix: false

esp32:
  board: esp32dev
  framework:
    type: arduino

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
logger:

ota:
  safe_mode: true
  reboot_timeout: 10min
  num_attempts: 5
  password: !secret ota_password_esp32_bluetooth_proxy

improv_serial:
captive_portal:

esp32_ble_tracker:
  scan_parameters:
    interval: 320ms
    window: 320ms
    continuous: true
    active: true

bluetooth_proxy:
  active: true

button:
- platform: safe_mode
  name: Safe Mode Boot
  entity_category: diagnostic

My main and for the moment only goal (I have no other BT devices), was to connect my Mi Flora sensors through the proxy instead of a BT-adapter. Using my adapter (ZEXMTE BT-505) and the Xiaomi BLE integration works almost flawlessly, but I can't get them to update properly or being "discovered" by the proxy. As I mentioned, removing them doesn't seem to get them rediscovered (even after a system reboot). Not sure tho if the discovering issue has to do with the proxy or my Home Assistant setup.

Some of the individual sensors (light, temperature, moisture, conductivity and battery) update sometimes when I restart Home Assistant, but never after that. Below is a copy of my proxys log when (!) it kinda works after a system reboot. Has anyone had the same experience?

INFO Reading configuration /config/esphome/esp32-bluetooth-proxy.yaml...
INFO Starting log output from esp32-bluetooth-proxy.local using esphome API
INFO Successfully connected to esp32-bluetooth-proxy.local
[13:50:57][I][app:102]: ESPHome version 2022.9.4 compiled on Oct  9 2022, 13:46:02
[13:50:57][C][wifi:502]: WiFi:
[13:50:57][C][wifi:360]:   Local MAC: 78:21:84:7C:A8:6C
[13:50:57][C][wifi:361]:   SSID: 'TB_MW_1303'[redacted]
[13:50:57][C][wifi:362]:   IP Address: 192.168.50.10
[13:50:57][C][wifi:364]:   BSSID: 24:4B:FE:30:62:E0[redacted]
[13:50:57][C][wifi:365]:   Hostname: 'esp32-bluetooth-proxy'
[13:50:57][C][wifi:367]:   Signal strength: -58 dB ▂▄▆█
[13:50:57][C][wifi:371]:   Channel: 8
[13:50:57][C][wifi:372]:   Subnet: 255.255.255.0
[13:50:57][C][wifi:373]:   Gateway: 192.168.50.1
[13:50:57][C][wifi:374]:   DNS1: 192.168.50.1
[13:50:57][C][wifi:375]:   DNS2: 0.0.0.0
[13:50:58][C][logger:275]: Logger:
[13:51:08][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:46:1f
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0xFE95
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0x10  end_handle: 0x22
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0001, handle 0x12, properties 0x18
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 6C53DB25-47A1-45FE-A022-7C92FB334FD4, handle 0x29, properties 0x2
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:51:16][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:51:16][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:51:16][I][esp32_ble_client.service:057]:  characteristic 0x1A12, handle 0x41, properties 0x2
[13:51:16][I][bluetooth_proxy:206]: [c4:7c:8d:6d:46:1f] Disconnecting.
[13:51:23][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:46:06
[13:51:24][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:51:24][D][esp32_ble_tracker:264]: Starting scan...
[13:51:24][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:46:06
[13:51:27][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:51:27][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:51:27][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:51:27][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x0014, handle 0x1f, properties 0x2
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:51:27][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:51:27][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:51:27][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:51:27][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x1A01, handle 0x35, properties 0x1a
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:51:27][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:51:27][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:51:27][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:51:27][I][bluetooth_proxy:206]: [c4:7c:8d:6d:46:06] Disconnecting.
[13:51:39][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:45:f2
[13:51:42][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:51:42][D][esp32_ble_tracker:264]: Starting scan...
[13:51:42][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:45:f2
[13:51:44][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:51:44][D][esp32_ble_tracker:264]: Starting scan...
[13:51:45][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:45:f2
[13:51:47][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:51:47][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:51:47][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:51:47][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x0014, handle 0x1f, properties 0x2
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:51:47][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:51:47][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:51:47][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:51:47][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A01, handle 0x35, properties 0x1a
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:51:47][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:51:47][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:51:47][I][esp32_ble_client.service:057]:  characteristic 0x1A12, handle 0x41, properties 0x2
[13:51:47][D][esp32_ble_tracker:264]: Starting scan...
[13:51:48][I][bluetooth_proxy:206]: [c4:7c:8d:6d:45:f2] Disconnecting.
[13:51:58][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:36:70
[13:52:08][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:52:08][D][esp32_ble_tracker:264]: Starting scan...
[13:52:09][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:36:70
[13:52:23][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:36:70
[13:52:24][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:52:24][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:52:24][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:52:24][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:52:24][I][esp32_ble_client:143]:   start_handle: 0x10  end_handle: 0x22
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0001, handle 0x12, properties 0x18
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x0014, handle 0x1f, properties 0x2
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:52:24][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:52:24][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:52:24][I][esp32_ble_client.service:057]:  characteristic 6C53DB25-47A1-45FE-A022-7C92FB334FD4, handle 0x29, properties 0x2
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:52:25][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:52:25][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A01, handle 0x35, properties 0x1a
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:52:25][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:52:25][I][esp32_ble_client.service:057]:  characteristic 0x1A12, handle 0x41, properties 0x2
[13:52:25][D][esp32_ble_tracker:264]: Starting scan...
[13:52:25][I][bluetooth_proxy:206]: [c4:7c:8d:6d:36:70] Disconnecting.
[13:52:42][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:4d:fd
[13:52:48][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:52:48][D][esp32_ble_tracker:264]: Starting scan...
[13:52:48][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:4d:fd
[13:52:50][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:52:50][D][esp32_ble_tracker:264]: Starting scan...
[13:52:50][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:4d:fd
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0xFE95
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0x10  end_handle: 0x22
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x0001, handle 0x12, properties 0x18
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x0014, handle 0x1f, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 6C53DB25-47A1-45FE-A022-7C92FB334FD4, handle 0x29, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1A01, handle 0x35, properties 0x1a
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:53:04][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:53:04][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:53:04][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:53:04][I][bluetooth_proxy:206]: [c4:7c:8d:6d:4d:fd] Disconnecting.
[13:53:16][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:4f:5f
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0xFE95
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0x10  end_handle: 0x22
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0001, handle 0x12, properties 0x18
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 6C53DB25-47A1-45FE-A022-7C92FB334FD4, handle 0x29, properties 0x2
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A01, handle 0x35, properties 0x1a
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A02, handle 0x38, properties 0x2
[13:53:20][I][esp32_ble_client:142]: Service UUID: 0x1206
[13:53:20][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:53:20][I][esp32_ble_client.service:057]:  characteristic 0x1A12, handle 0x41, properties 0x2
[13:53:20][D][esp32_ble_tracker:264]: Starting scan...
[13:53:21][I][bluetooth_proxy:206]: [c4:7c:8d:6d:4f:5f] Disconnecting.
[13:54:03][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:36:72
[13:54:06][W][esp32_ble_client:089]: connect to 00:00:00:00:00:00 failed, status=133
[13:54:06][D][esp32_ble_tracker:264]: Starting scan...
[13:54:06][I][esp32_ble_client:058]: Attempting BLE connection to c4:7c:8d:6d:36:72
[13:54:10][I][esp32_ble_client:142]: Service UUID: 0x1800
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0x1  end_handle: 0x9
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x2A00, handle 0x3, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x2A01, handle 0x5, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x2A02, handle 0x7, properties 0xa
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x2A04, handle 0x9, properties 0x2
[13:54:10][I][esp32_ble_client:142]: Service UUID: 0x1801
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0xc  end_handle: 0xf
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x2A05, handle 0xe, properties 0x22
[13:54:10][I][esp32_ble_client:142]: Service UUID: 0xFE95
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0x10  end_handle: 0x22
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0001, handle 0x12, properties 0x18
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0002, handle 0x15, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0004, handle 0x17, properties 0x12
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0007, handle 0x19, properties 0x8
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0010, handle 0x1b, properties 0x8
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0013, handle 0x1d, properties 0xa
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x0014, handle 0x1f, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x1001, handle 0x21, properties 0x10
[13:54:10][I][esp32_ble_client:142]: Service UUID: 0xFEF5
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0x23  end_handle: 0x30
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 8082CAA8-41A6-4021-91C6-56F9B954CC34, handle 0x25, properties 0xa
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 724249F0-5EC3-4B5F-8804-42345AF08651, handle 0x27, properties 0xa
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 6C53DB25-47A1-45FE-A022-7C92FB334FD4, handle 0x29, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 9D84B9A3-000C-49D8-9183-855B673FDA31, handle 0x2b, properties 0xa
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 457871E8-D516-4CA1-9116-57D0B17B9CB2, handle 0x2d, properties 0xe
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 5F78DF94-798C-46F5-990A-B3EB6A065C88, handle 0x2f, properties 0x12
[13:54:10][I][esp32_ble_client:142]: Service UUID: 0x1204
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0x31  end_handle: 0x39
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x1A00, handle 0x33, properties 0xa
[13:54:10][I][esp32_ble_client:143]:   start_handle: 0x3a  end_handle: 0x42
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x1A11, handle 0x3c, properties 0x2
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x1A10, handle 0x3e, properties 0x1a
[13:54:10][I][esp32_ble_client.service:057]:  characteristic 0x1A12, handle 0x41, properties 0x2
[13:54:10][D][esp32_ble_tracker:264]: Starting scan...
[13:54:11][I][bluetooth_proxy:206]: [c4:7c:8d:6d:36:72] Disconnecting.
TB-SE commented 2 years ago

Just to be clear, the proxy is nowhere near any type of electronic interference, like my router of anything else that could cause issues with BT or WiFi.

I've also used the following original parameters in the yaml config, the results are basically the same.

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true
nagyrobi commented 2 years ago

Try decreasing interval to, say, 550ms.

TB-SE commented 2 years ago

Try decreasing interval to, say, 550ms.

Mmmm, not sure. Initially it seemed to have helped a bit, but after a while I basically got the same result. I've been running this new config for 4h.

Some of them have all of their sensors exposed and some have only a few, or non at all. The most problematic seems to be the battery sensors, it's pretty much 50/50.

probot-esphome[bot] commented 2 years ago

Hey there @jesserockz, mind taking a look at this issue as it has been labeled with an integration (bluetooth_proxy) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

DAVIZINH0 commented 1 year ago

Hello- I have some diferente miflora sensors (HHCCJCY01). tHE older works fine with esphome bluetooth proxy (firmware version of the miflora 3.3.5). But some news with firmware version 3.3.6, not works. not detected. The home assistant detect its by integrations, but not detect devices and entitys. If i setup de yaml with platform: xiaomi_hhccjcy01, not working too

any idea or any test i can do? thanks a lot

TB-SE commented 1 year ago

Everything now seems to work as intended for me, except for the fact that my Mi flora batteries started to drain really fast. Any tips/settings anyone wants to recommend?