lkempf / casambi-bt-hass

28 stars 11 forks source link

Connection setup to Casambi network fails #34

Closed fschwarz86 closed 6 months ago

fschwarz86 commented 1 year ago

Describe the bug My Casambi network is automatically discovered, but when trying to setup the connection, the spinner keeps spinning forever and nothing else happens.

To Reproduce Steps to reproduce the behavior:

  1. Wait for the network to be discovered automatically.
  2. Click on "Configure".
  3. Enter the network password.
  4. Get hypnotised by the spinner.

Versions

Logs 2023-05-21 15:39:24.643 INFO (MainThread) [CasambiBt._casambi] Trying to connect to casambi network 63:CA:83:AC:XX:XX... 2023-05-21 15:39:24.646 INFO (MainThread) [CasambiBt._keystore] Loading keys... 2023-05-21 15:39:24.656 INFO (MainThread) [CasambiBt._keystore] Loaded 1 keys. 2023-05-21 15:39:24.657 INFO (MainThread) [CasambiBt._network] Loading session... 2023-05-21 15:39:24.660 INFO (MainThread) [CasambiBt._network] Loading unit type cache... 2023-05-21 15:39:24.663 INFO (MainThread) [CasambiBt._network] Getting network id... 2023-05-21 15:39:24.789 INFO (MainThread) [CasambiBt._network] Got network id TYqXXXXXwKrArqkOQVtXcw1QOgdLIjkU. 2023-05-21 15:39:24.790 INFO (MainThread) [CasambiBt._network] Updating network... 2023-05-21 15:39:24.794 INFO (MainThread) [CasambiBt._network] Loaded cached network. Revision: 35 2023-05-21 15:39:24.821 DEBUG (MainThread) [CasambiBt._network] Network: {"status":"UPTODATE","revision":35.0,"role":1} 2023-05-21 15:39:24.822 INFO (MainThread) [CasambiBt._keystore] Key with id 10 already exists. Skipping... 2023-05-21 15:39:24.823 INFO (MainThread) [CasambiBt._network] Fetching unit type for id 6660... 2023-05-21 15:39:24.823 INFO (MainThread) [CasambiBt._network] Using cached type. 2023-05-21 15:39:24.823 INFO (MainThread) [CasambiBt._network] Saving type cache... 2023-05-21 15:39:24.830 INFO (MainThread) [CasambiBt._network] Network updated. 2023-05-21 15:39:24.831 INFO (MainThread) [CasambiBt._client] Connection to 63:CA:83:AC:XX:XX

lkempf commented 1 year ago

I think this is an issue with your bluetooth adapter and I can't help you with that. I have the same behavior when I use my laptop to connect to the network. Do you have access to a supported bluetooth dongle (https://www.home-assistant.io/integrations/bluetooth/#known-working-high-performance-adapters)? If it still isn't working with that please reopen the issue.

fschwarz86 commented 1 year ago

I'm using a Raspberry Pi 4B (CYW43455) built-in adapter which is listed as "KNOWN WORKING HIGH-PERFORMANCE ADAPTERS", thus re-opening this issue.

lkempf commented 9 months ago

I have a new theory. Someone else had the same issue and for him the problem was that the bluetooth adapter was near enough to discover Casambi but not near enough to establish a connection. Did you try to decrease the distance between the Casambi network controller and your Rasberry Pi?

fschwarz86 commented 8 months ago

Unfortunately, it's infeasible in my setting to move the adapter closer to the Casambi device. :(

fschwarz86 commented 6 months ago

I bought a USB BT stick and an external antenna and was able to successfully connect to my Casambi device. Yey! :)