-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
LED BLE does not connects on Home Assistant but connects on ESPHome #105338
Comments
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) led_ble documentation |
Have exactly the same issue. Recognized by ESP32 (Bluetooth board proxy) but LED BLE 0Dxxxx fails to connect |
I have cloned home assistant core and blindly trying to debug what is happening. There I get this error trace when the connection problem happens:
what I can update there is that the |
the |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
As far as I can tell these lights are not supported by https://github.com/Danielhiversen/flux_led/blob/master/flux_led/protocol.py i.e. there are no protocols defined which start If this is true then I expect that because these devices name themselves If that is true, then the manifest file would need to be update to exclude these devices. https://developers.home-assistant.io/docs/creating_integration_manifest/#bluetooth I don't see a mechanism to exclude devices though. |
Ah, it looks like it's possible to exclude unsupported devices here: My device name is I don't know how that differs from the supported device names, but perhaps the Are there any example device names from working LEDBLE devices? |
.. and the reason it fails to connect is because (on my device at least) the write characteristic is |
I have th.e same LEDBLE-01-9201 but for some reason it flailed to connect to Home Assistant . I guess it has something to do with the device ID? `Logger: led_ble.led_ble LEDBLE-01-9807: Device unexpectedly disconnected; RSSI: None` |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
@bdraco Maybe this helps to fix the problem. IDK. I ended up creating a virtual light. on my esp32.ymal
common/bluetooth-virtual-light.yaml
bluetooth-virtual-light.h// #include <esphome.h>
#include <vector>
namespace SSDBluetoothVirtualLight {
const char* logTag = "ssd_virtual_bluetooth_light";
const std::vector<uint8_t> turnOffArray = {126, 255, 4, 0, 255, 255, 255, 255, 239};
const std::vector<uint8_t> turnOnArray = {126, 255, 4, 1, 255, 255, 255, 255, 239};
const std::vector<uint8_t> noColorArray = {126, 255, 5, 3, 0, 0, 0, 255, 239};
float red = 0;
float green = 0;
float blue = 0;
std::vector<uint8_t> getCreateColorUpdateArray()
{
uint8_t convertedRed = static_cast<uint8_t>(red * 255);
uint8_t convertedGreen = static_cast<uint8_t>(green * 255);
uint8_t convertedBlue = static_cast<uint8_t>(blue * 255);
return {126, 255, 5, 3, convertedRed, convertedGreen, convertedBlue, 255, 239};
}
void updateRed(float value){
red = value;
}
void updateGreen(float value){
green = value;
}
void updateBlue(float value){
blue = value;
}
}
|
Is this Problem actually fix? |
The problem
(This is an update version of the stale #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:
But Home assistant fails
The log I see in HA is :
in "All logs"
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.
The text was updated successfully, but these errors were encountered: