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

UUID With errors #17

Closed
martusi61 opened this issue Mar 19, 2023 · 10 comments
Closed

UUID With errors #17

martusi61 opened this issue Mar 19, 2023 · 10 comments

Comments

@martusi61
Copy link

martusi61 commented Mar 19, 2023

I recently bought a bluetooth adapter like UDUP EP-B3536 and a led strip of the type supported in Lotus Lanterne app. The adapter is regularly seen in my Home Assistant supervisrd on Debian 11, and in fact I added it in the Devices section and service, but after installing your elkbledom software via Hacs, i tried to add the led strip both like "ElkBLEDOM" sia come "Led-Ble" senza successo. In the first case I get an "Unknown error occurred" after entering the nane and the address in the format BE:89:E0:03:D0:09 because the strip is not automatically detected, in the second it tells me that it hasn't found anything. My UUIDs are as follows:

        "0000110e-0000-1000-8000-00805f9b34fb",
        "0000110a-0000-1000-8000-00805f9b34fb",
        "00001200-0000-1000-8000-00805f9b34fb",
        "0000110b-0000-1000-8000-00805f9b34fb",
        "00001108-0000-1000-8000-00805f9b34fb",
        "0000110c-0000-1000-8000-00805f9b34fb",
        "00001800-0000-1000-8000-00805f9b34fb",
        "00001801-0000-1000-8000-00805f9b34fb",
        "0000180a-0000-1000-8000-00805f9b34fb",
        "00001112-0000-1000-8000-00805f9b34fb"

I took them from the diagnostic file of the Devices and services section, which also shows the correct recognition of the Bluetooth, I attach it below. What am I missing? Where is wrong?
config_entry-bluetooth-aa74d345fb9124bd52c2c667ebbda5f8.txt

@martusi61 martusi61 changed the title UUID Missing UUID With errors Mar 19, 2023
@dave-code-ruiz
Copy link
Owner

Ok, in short, your led strip is not supported, i think "Unknown error occurred" is when integration try to turn on and turn off led strip to test it.

I can create support code for your led strip, but i need some information, you can see information i need in:

#8
#11

More important is to know your commands to turn on, turn off, change color.., in my case i try it with:

sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0004f00001ff00ef # POWER ON
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e000503ff000000ef # RED
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0005030000ff00ef # BLUE
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e00050300ff0000ef # GREEN
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0004000000ff00ef # POWER OFF

@dave-code-ruiz
Copy link
Owner

When you answer me, i need device discover information that show in debug logs:

In configuration.yaml:

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

@martusi61
Copy link
Author

Thanks for the reply. I added debug and retried your software, below is the log result:

Logger: aiohttp.server
Source: custom_components/elkbledom/elkbledom.py:119
Integration: ElkBLEDOM (documentation, issues)
First occurred: 14:25:21 (1 occurrences)
Last logged: 14:25:21

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 67, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/elkbledom/config_flow.py", line 160, in async_step_manual
return await self.async_step_validate()
File "/config/custom_components/elkbledom/config_flow.py", line 138, in async_step_validate
error = await self.toggle_light()
File "/config/custom_components/elkbledom/config_flow.py", line 172, in toggle_light
self._instance = BLEDOMInstance(self.mac, False, self.hass)
File "/config/custom_components/elkbledom/elkbledom.py", line 119, in init
raise ConfigEntryNotReady(f"Couldn't find a nearby device with address: {address}")
homeassistant.exceptions.ConfigEntryNotReady: Couldn't find a nearby device with address: BE:89:E0:03:D0:09

@dave-code-ruiz
Copy link
Owner

Before trying the integration, you must be sure that the connection exists, works and is available. The error you get is because it cannot find the Bluetooth device, this may be distance, it is already connected to another device or for other reasons.
you can use gatttool for do testing before use integration:

https://github.com/dave-code-ruiz/elkbledom/#supported-strips

@martusi61
Copy link
Author

The led strip is about 5 meters within the same room, but i tried to connect with gatttool and i get this error. However, it must be said that even from smartphones pairing is not done, however the strip works well with its all "Lotus Lantern"
Screenshot 2023-03-20 15 35 48~3

@martusi61
Copy link
Author

I also tried with "gatttool -t random -b BE:89:E0:03:D0:09 -I", but it doesn't change anything, but sometimes it also gives me the error: "Software caused connection abort (103)"

@dave-code-ruiz
Copy link
Owner

dave-code-ruiz commented Mar 21, 2023

If you received "connection refused" meaning the led strip not accept you conection probably there are other conection active.
My integration connects and loses conection in a few seconds for keep free conection.
It is possible too you used wrong Mac Address
Sorry i cannt help you, you need to investigate that first

@dave-code-ruiz
Copy link
Owner

it can help you:

You can scan BT device with BTScan.py in my repository exec: sudo python3 BTScan.py

@martusi61
Copy link
Author

The mac address is correct and I have no other apps connected to the led strip, I even turned off the bluetooth of the only device that uses it, but you said right, I'll have to investigate. Thanks, we'll see you soon.

@dave-code-ruiz
Copy link
Owner

ok, close the issue, when you discover problem and need it , i reopen it

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

2 participants