Skip to content
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

Light strip fails to add #45

Closed
QuantumTheFox opened this issue Sep 14, 2023 · 14 comments
Closed

Light strip fails to add #45

QuantumTheFox opened this issue Sep 14, 2023 · 14 comments

Comments

@QuantumTheFox
Copy link

Hi. I decided to try this project as I have an ELKBLEDOM Strip in my kitchen. I set up Bluetooth on my server (generic-x86) and installed the integration. The integration finds my light strip but when I try to go add it i get an endless spinning circle. image

If i leave the app, I get an unknown error. Nothings shows up in the logs, just a warning saying that this is a custom integration. I'm pretty new to bluetooth Hass devices as i just got the Bluetooth integration working on my server.

@dave-code-ruiz
Copy link
Owner

Use debug log to see more information of posible errors.

In configuration.yaml:

logger:
  default: info
  logs:
    custom_components.elkbledom: debug

Post log results.

but i think it is distance error, move strip beside raspberry for discart this possible issue

@QuantumTheFox
Copy link
Author

QuantumTheFox commented Sep 16, 2023

Alright, now I get these 2 errors. I tried moving my server right next to the strip but still nothing. When I leave it for a while I get a 'Unable to connect to Elkbledom' error.

Error getting status: ELK-BLEDOM - BE:FF:00:00:0A:C9: Failed to connect after 4 attempt(s): TimeoutError
Error getting status: ELK-BLEDOM - BE:FF:00:00:0A:C9: Failed to connect after 4 attempt(s): failed to discover services, device disconnected

@dave-code-ruiz
Copy link
Owner

dave-code-ruiz commented Sep 19, 2023

Hi, The integration does not manage the connections , this error is throws from the bleak library (https://pypi.org/project/bleak/) it is possible to be distance error (now discarted) , or strip is connected to other device, or the strip staying blocked (try turn off, turn on), or something similar, but integration is not the problem

@dave-code-ruiz
Copy link
Owner

@dilpish say :
I had a similar problem with an LED strip when I used weak USB power. I connected it to a more powerful power supply and everything worked out.

Dont use battery and try to use power supply with more amps, post your results

@t0mc1k
Copy link

t0mc1k commented Oct 26, 2023

Power supply sufficient, distance right next to the bluetooth receiver. It doesn't work. I enter the name of the device and click send, then it asks "Did the light blink" and nothing. nothing flashes. adding fails.

@dave-code-ruiz
Copy link
Owner

ok, i think it was possible the same issue but no.
Like i said you in another post:
The integration does not manage the connections , this error is throws from the bleak library (https://pypi.org/project/bleak/) it is possible to be distance error (now discarted) , or strip is connected to other device, or the strip staying blocked (try turn off, turn on), or something similar, but integration is not the problem

@t0mc1k
Copy link

t0mc1k commented Oct 27, 2023

I tried turning it on and off. I also tried powering down, waiting a while and reconnecting. still the same. the distance from bluetooth is about 15cm. the other device is not connecting i have not paired it with any application i have deleted all of them both from ios and android. even after erasing i tried the same procedure to turn off/on, disconnect from the network, etc. the device is found. it connects but when it says to blink it doesn't blink. Video https://www.youtube.com/watch?v=YT1Ll8yoJOY :)

@dave-code-ruiz
Copy link
Owner

dave-code-ruiz commented Oct 27, 2023

Woowww, now i understand what occurs. !!!!
Ok when question for you is , did it blink ?, you need to click the CHECK on the left for confirm blink.
If you dont check it , process is canceled .
Try clicking the check

@t0mc1k
Copy link

t0mc1k commented Oct 27, 2023

I've tried that too, otherwise I wouldn't be writing here. The device is added, but it doesn't work. The control does not work. I'm not stupid to post here without trying all the methods.

@dave-code-ruiz
Copy link
Owner

Ok, add the device, active debug mode, click some controla, turn on , turn off, change color, etc
And then obtain debug log and post it here

@t0mc1k
Copy link

t0mc1k commented Oct 30, 2023

interesting that the brightness control works but the others don't. nor off and on, or changing colors or effects. Power supply is 2a, 5V charger. Led strip is placed next to the server. And in the log I noticed that the signal fluctuates from 71rssi to 121rssi. I don't understand why it does this. I'm guessing it's a bug? Should i get rid of it and buy a better bluetooth controller? But interesting that through the mobile phone app the baud works for me in the next room too. other devices I have via bluetooth humidity and temperature sensors are very far away from the server and they work great.

debug log:
https://file.io/nd7yM7jLI2Hp

@dave-code-ruiz
Copy link
Owner

dave-code-ruiz commented Oct 30, 2023

Ok, i saw all you send, and power supply , bluetooth and rest was correct. no bug. no need better bluetooth, and you can put your strip far away.

I saw too the log file and no ERROR in it, strip connect and no are fails to add. you havent same issue than @DaTrafficCone

Finally your strip model is MELK , i have an issue open about your problem, #11 and you need to send to the strip two init commands , i dont know why , something weird, but work fine:

sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0783
sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404

after that, try to restart strip, add your strip to homeassistant and i think you could work with your strip normally

Try and post results

@t0mc1k
Copy link

t0mc1k commented Nov 1, 2023

Hey, boss. I'm sorry I'm only writing now, I've had a lot of work to do. I tried your tip. but without success. I can't write this data according to the gatttol. I tried restarting, turning off/on strip and etc. it won't let me write.

root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0783 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0783 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0783 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0783 Characteristic Write Request failed: Attribute can't be written root@T0mc0-HA:~# sudo gatttool -b BE:16:F8:1D:D6:66 --char-write-req -a 0x0009 -n 7e0404 Characteristic Write Request failed: Attribute can't be written

@dave-code-ruiz
Copy link
Owner

There are only one connection to led strip, if HA is connected to strip, gatttool not work.

1- You need to delete HA integration with elkbledom strip.
2- restart strip
3- send commands with gatttool, first 7e0783 and second 7e0404 in this order.

Finally connect HA integration again

good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants