home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.05k stars 29.72k forks source link

Qingping devices not showing up with bluetooth proxy #112502

Closed simplenotezy closed 4 weeks ago

simplenotezy commented 6 months ago

The problem

My Qingping Air Monitor Lite cannot be added to HomeAssistant.

I have installed a Bluetooth Proxy on an ESP-32, and then adopted it via ESPHome. I notice an iBeacon integration - so the proxy seems to be working. I can also verify from logs everything seems good.

However, when I try to add the Qingping integration I get the following error message: "No devices found on the network"

I have tried (although I don't think this should be needed) to add the Bluetooth integration, but it reports: "No unconfigured Bluetooth adapters found. There are 0 ignored adapters.".

From what I can understand from similar integrations, like the Xiaomi BLE, after installing the ESP Bluetooth Proxy you should be able go go ahead and install the integration without further configuration (https://youtu.be/CjpPdwK_ttg?t=705).

So I believe something is off with the Qingping integration and using Bluetooth proxies - or further documentation is needed.

I do notice my Qingping are broadcasting on the Wi-Fi network.

What version of Home Assistant Core has the issue?

core-2024.2.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Qingping

Link to integration documentation on our website

https://www.home-assistant.io/integrations/qingping/

Diagnostics information

INFO ESPHome 2024.2.2
INFO Reading configuration /config/esphome/esp32-bluetooth-proxy-e5c390.yaml...
INFO Starting log output from 192.168.39.149 using esphome API
INFO Successfully connected to esp32-bluetooth-proxy-e5c390 @ 192.168.39.149 in 0.057s
INFO Successful handshake with esp32-bluetooth-proxy-e5c390 @ 192.168.39.149 in 0.146s
[14:32:52][I][app:102]: ESPHome version 2024.2.2 compiled on Mar  6 2024, 13:56:49
[14:32:52][I][app:104]: Project esphome.bluetooth-proxy version 1.0
[14:32:52][C][wifi:577]: WiFi:
[14:32:52][C][wifi:409]:   Local MAC: D8:BC:38:E5:C3:90
[14:32:52][C][wifi:414]:   SSID: [redacted]
[14:32:52][C][wifi:415]:   IP Address: 192.168.39.149
[14:32:52][C][wifi:417]:   BSSID: [redacted]
[14:32:52][C][wifi:418]:   Hostname: 'esp32-bluetooth-proxy-e5c390'
[14:32:52][C][wifi:420]:   Signal strength: -38 dB ▂▄▆█
[14:32:52][C][wifi:424]:   Channel: 6
[14:32:52][C][wifi:425]:   Subnet: 255.255.255.0
[14:32:52][C][wifi:426]:   Gateway: 192.168.39.1
[14:32:52][C][wifi:427]:   DNS1: 192.168.39.1
[14:32:52][C][wifi:428]:   DNS2: 0.0.0.0
[14:32:52][C][logger:447]: Logger:
[14:32:52][C][logger:448]:   Level: DEBUG
[14:32:52][C][logger:449]:   Log Baud Rate: 115200
[14:32:52][C][logger:451]:   Hardware UART: UART0
[14:32:52][C][bluetooth_proxy:088]: Bluetooth Proxy:
[14:32:52][C][bluetooth_proxy:089]:   Active: YES
[14:32:52][C][safe_mode.button:022]: Safe Mode Button 'Safe Mode Boot'
[14:32:52][C][safe_mode.button:022]:   Icon: 'mdi:restart-alert'
[14:32:52][C][esp32_ble:374]: ESP32 BLE:
[14:32:52][C][esp32_ble:376]:   MAC address: D8:BC:38:E5:C3:92
[14:32:52][C][esp32_ble:377]:   IO Capability: none
[14:32:52][C][esp32_ble_tracker:645]: BLE Tracker:
[14:32:52][C][esp32_ble_tracker:646]:   Scan Duration: 300 s
[14:32:52][C][esp32_ble_tracker:647]:   Scan Interval: 320.0 ms
[14:32:52][C][esp32_ble_tracker:648]:   Scan Window: 30.0 ms
[14:32:52][C][esp32_ble_tracker:649]:   Scan Type: ACTIVE
[14:32:52][C][esp32_ble_tracker:650]:   Continuous Scanning: True
[14:32:52][C][mdns:115]: mDNS:
[14:32:52][C][mdns:116]:   Hostname: esp32-bluetooth-proxy-e5c390
[14:32:52][C][ota:096]: Over-The-Air Updates:
[14:32:52][C][ota:097]:   Address: esp32-bluetooth-proxy-e5c390.local:3232
[14:32:52][C][ota:103]:   OTA version: 2.
[14:32:52][C][api:139]: API Server:
[14:32:52][C][api:140]:   Address: esp32-bluetooth-proxy-e5c390.local:6053
[14:32:52][C][api:142]:   Using noise encryption: YES
[14:32:52][C][improv_serial:032]: Improv Serial:

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @bdraco, @skgsergio, mind taking a look at this issue as it has been labeled with an integration (qingping) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `qingping` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign qingping` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


qingping documentation qingping source (message by IssueLinks)

simplenotezy commented 6 months ago

I found the ble_monitor which claims not to support esp bluetooth proxies. I am not sure if it's not working because it's the same with qingping; if it is, perhaps it should be listed in the documentation.

And if that's the case, I would love some guidance in the right direction. Should I purchase a BLE dongle and insert into my HomeAssistant Blue? Or would the ESP Gateway method for Bluetooth work? Thanks in advance!

simplenotezy commented 6 months ago

Since QingPing is a HomeKit compatible device, it should be possible to use an Bluetooth Proxy as described here: https://www.home-assistant.io/integrations/homekit_controller/#prerequisites

In the meantime I have successfully added the device to my Apple HomeKit via the iOS app, but I'd love it to get into HA, so I can automate stuff.

simplenotezy commented 6 months ago

By the way, not sure if it's relevant but this is my ESP-Home configuration:

substitutions:
  name: esp32-bluetooth-proxy-e5c390
  friendly_name: Bluetooth Proxy e5c390
packages:
  esphome.bluetooth-proxy: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: [redacted]

bluetooth_proxy:
  active: true

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

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

The ESP is flashed through cable directly to the HA Blue.

If I enable logging I do see that it detects various BLE devices - a lot of the devices are without name (only MAC adresses) though; so not sure if one of these could be the Qingping.

derpuma commented 5 months ago

I have the same problem. Running my home assistant in a proxmox VM and ESP32 BT proxy. Not able to get any value out of the air monitor light. I am able to pair the Airmonitor via passive Qingping integration, but every value is zero, so seems like there is no communication between the esp32 proxy and QPAMonitor at all.

simplenotezy commented 5 months ago

Thanks for sharing @derpuma - I have ordered a regular bluetooth dongle to see if using that changes anything

thibaud-sanchez commented 5 months ago

I’ve two esphome ble proxies and an usb dongle but still have the message « no devices found » instantly  :(

simplenotezy commented 5 months ago

@bdraco or @skgsergio - can you help out here?

thibaud-sanchez commented 5 months ago

I finally handled them by using the xiaomi ble integration

simplenotezy commented 5 months ago

@thibaud-sanchez interesting. can you share some details?

simplenotezy commented 4 months ago

I bought a HA verified Bluetooth adapter but it still says "No Bluetooth devices found" when adding qingping. I reset my airmonitor lite but same issue.

image image

mariomaz87 commented 4 months ago

Since QingPing is a HomeKit compatible device, it should be possible to use an Bluetooth Proxy as described here: https://www.home-assistant.io/integrations/homekit_controller/#prerequisites

In the meantime I have successfully added the device to my Apple HomeKit via the iOS app, but I'd love it to get into HA, so I can automate stuff.

If you add it using HK integration, have you found a way to modify the settings of the device? It does not show up in Qingping application on iOS, but it's the only way I know to change settings like the screensaver or auto turn off of the display.

jonalbr commented 2 months ago

Qingping is only advertising via Bluetooth if not configured as HomeKit device. To use this integration you need to reset your device and than choose in the Qingping app the "not HomeKit" variant during config. Not sure how it's named. It's than not connected via WiFi. Using both Bluetooth and WiFi (HomeKit) is not supported.

simplenotezy commented 2 months ago

@jonalbr I already tried resetting. By the way, the devices I tried to pair were completely new devices, never paired with HomeKit

simplenotezy commented 2 months ago

@jonalbr what's interesting here is that it doesnt even seem to search. as soon as you click "add qingping" it just says "no devices found".

thanks for helping out by the way

simplenotezy commented 4 weeks ago

@jonalbr Do you have some extra guidance on how to reset the QIngPing device and have it not choose WiFI during config?

simplenotezy commented 4 weeks ago

Update, I finally managed to get it working. All you have to do is press the concave bar on the top left corner for 8 seconds untill a WiFi icon appears. Then it will show up in HomeAssistant.

IMG_1947

image
simplenotezy commented 4 weeks ago

Hmm - I do have some issues still though.

I finally managed to pair it with HomeAssistant by holding the left button on the top for 8 seconds until a WiFi icon appears. Then it's found and added to HA. However, the WiFi icon will stay on the QingPing device. If you touch the top lever the WiFi icon will then disappear, and then the connection with HA will be lost.

jonalbr commented 4 weeks ago

Hi, nice to hear! Maybe this is helpful for someone else, as I needed to additionally factory reset the device:

Reset Factory Settings: Press and hold the concave bar on the top and the power button on the back of the product for at least 8 seconds until product reboots.

simplenotezy commented 4 weeks ago

After pairing it a second time, it seemed to work. Did a factory reset on both afterwards, and paired them using their QingPing+ app: https://apps.apple.com/dk/app/qingping/id1344636968 and updated the firmware.

Now they are both in the QingPing+ app, but also in HomeAssistant