core: LED BLE does not connects on Home Assistant but connects on ESPHome
The problem
(This is an update version of the stale https://github.com/home-assistant/core/issues/93671)
I am trying to connect a LED BLE device. For this, I configured an ESP32 dev board to work as a Bluetooth proxy.
The ESP32 part seems to be working as expected, it reports the devices.
Running the Add LED BLE integration part on Home assistant, I see the LED listed there, and I can trigger a connection.
When triggered, I see in the debug logs that the a connection is done successful:
21:56:05][I][bluetooth_proxy:278]: [0] [78:9C:E7:0D:33:4D] Connecting v3 with cache
[21:56:05][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[21:56:05][I][esp32_ble_client:069]: [0] [78:9C:E7:0D:33:4D] 0x00 Attempting BLE connection
[21:56:06][I][esp32_ble_client:149]: [0] [78:9C:E7:0D:33:4D] Connected
[21:56:06][D][esp32_ble_tracker:266]: Starting scan...
But Home assistant fails
The log I see in HA is :
/usr/local/lib/python3.11/site-packages/led_ble/led_ble.py:347: FutureWarning: This method will be removed future version, use the services property instead. resolved = self._resolve_characteristics(await client.get_services())
21:56:06 – (ADVERTENCIA) components/led_ble/config_flow.py
in “All logs”
2023-12-08 21:52:53.452 WARNING (MainThread) [led_ble.led_ble] LEDBLE-0D334D: Device unexpectedly disconnected; RSSI: None
2023-12-08 21:56:06.023 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/site-packages/led_ble/led_ble.py:347: FutureWarning: This method will be removed future version, use the services property instead.
What version of Home Assistant Core has the issue?
core-2023.12.0
What was the last working version of Home Assistant Core?
No idea
What type of installation are you running?
Home Assistant OS
Integration causing the issue
LED BLE
Link to integration documentation on our website
https://www.home-assistant.io/integrations/led_ble/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I have tried to do some reverse engineering to this BLE device sniffing the BT logs on my Android device while using the recommended app (https://play.google.com/store/apps/details?id=com.ledlamp) and I got some codes for it.
For example, this is the turn off code : 7eff0400ffffffffef
Then I connected my laptop directly to the device and tried to send those commands directly to the given FFE1 characteristic and it works as expected, I could turn it off, on, change some colors that I had sniffed before:
After some research I am 95% sure those codes are the same as the ones listed here https://github.com/kquinsland/JACKYLED-BLE-RGB-LED-Strip-controller/blob/master/Magic_numbers.md
And being used here with Java in https://github.com/kquinsland/JACKYLED-BLE-RGB-LED-Strip-controller/blob/master/files/src/main/java/com/karlquinsland/android/btleled/ControllerDriverClass.java
Maybe that can help for something?
Is there some way I can help with this? I have done 0 python but with some guidance I can try to implemented stuff if needed.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (1 by maintainers)
Hi Guys,
I found this working using https://github.com/dave-code-ruiz/elkbledom integration.