8000 esp32_ble_tracker & ble_rssi with Blue Charm Beacon BC04P reports inaccurate RSSI · Issue #6648 · esphome/issues · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

esp32_ble_tracker & ble_rssi with Blue Charm Beacon BC04P reports inaccurate RSSI #6648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sugarpines opened this issue Jan 5, 2025 · 1 comment
Labels

Comments

@sugarpines
Copy link
sugarpines commented Jan 5, 2025

The problem

ESPHome ble_rssi reports RSSI that is too high for Blue Charm Beacon BC04P.

Note from log below that RSSI is between -35 & -44 with beacon ~1 meter away.

The "Measured Power" for the beacon is -59, indicating that the RSSI should be -59 at 1 meter distance.

Blue Charm's KBeaconPro app (on iPhone) reports much lower RSSI from the same distance of ~1 meter, ranging between -60 & -72.
image

Details of the beacon are at: https://bluecharmbeacons.com/quick-start-guide-bc04p-ibeacon-ble-multibeacon/

Which version of ESPHome has the issue?

2024.12.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2025.1.0

What platform are you using?

ESP32

Board

esp32-c3-devkitm-1

Component causing the issue

ble_rssi

YAML Config

substitutions:
  device_name: tp
  device_friendly_name: "Test Platform"
  api_encryption_key: !secret tp_api_encryption_key
  ota_password: !secret tp_ota_password
  ap_password: !secret tp_ap_password
  mac_addr: !secret tp_mac_addr

esphome:
  name: '${device_name}'
  friendly_name: '${device_friendly_name}'

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# enable logging
logger:

api:
  encryption:
    key: '${api_encryption_key}'
  # Turn off BLE tracking when wifi is connecting     
  # https://esphome.io/components/esp32_ble_tracker.html#use-on-single-core-chips
  on_client_connected:
    - esp32_ble_tracker.start_scan:
       continuous: true
  on_client_disconnected:
    - esp32_ble_tracker.stop_scan:

# enable over the air update
ota:
  - platform: esphome
    password: '${ota_password}'

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: '${device_friendly_name} Fallback Hotspot'
    password: '${ap_password}'
    
esp32_ble_tracker:
  scan_parameters:
    continuous: false  # https://esphome.io/components/esp32_ble_tracker.html#use-on-single-core-chips
    duration: 1min
    active: true  # needs to be true to get attr 0x2080 (battery)
  on_ble_service_data_advertise:
    - mac_address: '${mac_addr}'
      service_uuid: '2080'
      then:
        - lambda: 'id(beacon_1_battery).publish_state(x[0]);'    

binary_sensor:
  - platform: ble_presence
    name: "Beacon 1 Presence"
    id: beacon_1_presence
    mac_address: '${mac_addr}'

sensor:
  - platform: ble_rssi
    name: "Beacon 1 RSSI"
    id: beacon_1_rssi
    mac_address: '${mac_addr}'

  - platform: template
    name: "Beacon 1 Battery"
    id: beacon_1_battery
    icon: 'mdi:battery'
    unit_of_measurement: '%'
    device_class: "Battery"

Anything in the logs that might be useful for us?

INFO ESPHome 2024.12.2
INFO Reading configuration /config/esphome/tp.yaml...
INFO Starting log output from 192.168.7.199 using esphome API
INFO Successfully connected to tp @ 192.168.7.199 in 0.112s
INFO Successful handshake with tp @ 192.168.7.199 in 0.082s
[12:12:02][I][app:100]: ESPHome version 2024.12.2 compiled on Jan  5 2025, 11:47:12
[12:12:02][C][wifi:600]: WiFi:
[12:12:02][C][wifi:428]:   Local MAC: [redacted]
[12:12:02][C][wifi:433]:   SSID: [redacted]
[12:12:02][C][wifi:436]:   IP Address: 192.168.7.199
[12:12:02][C][wifi:440]:   BSSID: [redacted]
[12:12:02][C][wifi:441]:   Hostname: 'tp'
[12:12:02][C][wifi:443]:   Signal strength: -24 dB ▂▄▆█
[12:12:02][C][wifi:447]:   Channel: 1
[12:12:02][C][wifi:448]:   Subnet: 255.255.255.0
[12:12:02][C][wifi:449]:   Gateway: 192.168.7.1
[12:12:02][C][wifi:450]:   DNS1: 192.168.7.1
[12:12:02][C][wifi:451]:   DNS2: 0.0.0.0
[12:12:02][C][logger:185]: Logger:
[12:12:02][C][logger:186]:   Level: DEBUG
[12:12:02][C][logger:188]:   Log Baud Rate: 115200
[12:12:02][C][logger:189]:   Hardware UART: USB_CDC
[12:12:03][C][template.sensor:022]: Template Sensor 'Beacon 1 Battery'
[12:12:03][C][template.sensor:022]:   Device Class: 'battery'
[12:12:03][C][template.sensor:022]:   State Class: ''
[12:12:03][C][template.sensor:022]:   Unit of Measurement: '%'
[12:12:03][C][template.sensor:022]:   Accuracy Decimals: 1
[12:12:03][C][template.sensor:022]:   Icon: 'mdi:battery'
[12:12:03][C][template.sensor:023]:   Update Interval: 60.0s
[12:12:03][C][ble_presence:011]: BLE Presence 'Beacon 1 Presence'
[12:12:03][C][ble_rssi:011]: BLE RSSI Sensor 'Beacon 1 RSSI'
[12:12:03][C][ble_rssi:011]:   Device Class: 'signal_strength'
[12:12:03][C][ble_rssi:011]:   State Class: 'measurement'
[12:12:03][C][ble_rssi:011]:   Unit of Measurement: 'dBm'
[12:12:03][C][ble_rssi:011]:   Accuracy Decimals: 0
[12:12:03][C][esp32_ble:418]: ESP32 BLE:
[12:12:03][C][esp32_ble:420]:   MAC address: [redacted]
[12:12:03][C][esp32_ble:421]:   IO Capability: none
[12:12:03][C][esp32_ble_tracker:661]: BLE Tracker:
[12:12:03][C][esp32_ble_tracker:662]:   Scan Duration: 60 s
[12:12:03][C][esphome.ota:073]: Over-The-Air updates:
[12:12:03][C][esphome.ota:074]:   Address: tp.local:3232
[12:12:03][C][esphome.ota:075]:   Version: 2
[12:12:03][C][esphome.ota:078]:   Password configured
[12:12:03][C][safe_mode:018]: Safe Mode:
[12:12:03][C][safe_mode:020]:   Boot considered successful after 60 seconds
[12:12:03][C][safe_mode:021]:   Invoke after 10 boot attempts
[12:12:03][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[12:12:03][C][api:140]: API Server:
[12:12:03][C][api:141]:   Address: tp.local:6053
[12:12:03][C][api:143]:   Using noise encryption: YES
[12:12:06][D][binary_sensor:036]: 'Beacon 1 Presence': Sending state ON
[12:12:06][D][sensor:094]: 'Beacon 1 RSSI': Sending state -43.00000 dBm with 0 decimals of accuracy
[12:12:06][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:12:11][D][sensor:094]: 'Beacon 1 RSSI': Sending state -43.00000 dBm with 0 decimals of accuracy
[12:12:11][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:12:20][D][sensor:094]: 'Beacon 1 RSSI': Sending state -40.00000 dBm with 0 decimals of accuracy
[12:12:20][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:12:34][D][sensor:094]: 'Beacon 1 RSSI': Sending state -40.00000 dBm with 0 decimals of accuracy
[12:12:34][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:12:58][D][sensor:094]: 'Beacon 1 RSSI': Sending state -45.00000 dBm with 0 decimals of accuracy
[12:12:58][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:13:02][D][esp32_ble_tracker:273]: Starting scan...
[12:13:11][D][sensor:094]: 'Beacon 1 RSSI': Sending state -38.00000 dBm with 0 decimals of accuracy
[12:13:11][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:13:40][D][sensor:094]: 'Beacon 1 RSSI': Sending state -35.00000 dBm with 0 decimals of accuracy
[12:13:40][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:14:02][D][esp32_ble_tracker:273]: Starting scan...
[12:14:51][D][sensor:094]: 'Beacon 1 RSSI': Sending state -44.00000 dBm with 0 decimals of accuracy
[12:14:51][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy
[12:15:02][D][esp32_ble_tracker:273]: Starting scan...
[12:15:28][D][sensor:094]: 'Beacon 1 RSSI': Sending state -44.00000 dBm with 0 decimals of accuracy
[12:15:28][D][sensor:094]: 'Beacon 1 Battery': Sending state 105.00000 % with 1 decimals of accuracy

Additional information

No response

Copy link
github-actions bot commented May 6, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
0