lkempf / casambi-bt-hass

32 stars 12 forks source link

Re-Install Casambi BT integration #68

Closed WITSGUNBR closed 8 months ago

WITSGUNBR commented 8 months ago

Describe the bug Wonderfull integration that worked very stable. But... I unfortunately disconnected the Casambi module making the integration not working anymore. Believing it had to do with the Bluetooth adapter or the integration itself I started to re-install everything. I de-installed the HACS part, re-installed everything with restarts in between. Created a new Casambi networks multiple times, but I am not able to connect to the Casambi Network since. It gives a Failed to Connect warning almost directly after pressing the submit button

One thing I noticed is that if I select the Casambi Bluetooth in the discovered integrations list I still find the old bluetooth MAC address pre-entered. Changing this to the new address and adding the password gives an almost instant 'Failed to Connect warning'. This feels like still some configurations from the previous network are somewhere stored. Is there a way to manually delete the integration and start from scratch?

Choosing to install the integration again, and selecting 'Setup another instance of Casambi Bluetooth' does not pre-load the old network ID, but still gives the failure to connect warning without searching for the network.

Thanks for your time!

Screenshot 2024-02-28 at 15 02 09

Versions

lkempf commented 8 months ago

Glad to hear that everything worked well for you until now.

The integration caches network information in the .storage folder in the HA configuration directory. You can safely delete the casambi-bt folder there. However it would also be helpful if you could enable debug logging for the integration in HA and share the log of a failed connection attempt. This would allow me to investigate why the cached information isn't replaced automatically.

WITSGUNBR commented 8 months ago

Thanks for offering your support.

I continued trying to connect and somehow solved the issue by switching from the external bluetooth dongle to the RPI internal bluetooth. The exact steps I cannot republish. After connecting with the integration I could disable the internal bluetooth and change to the external dongle. This worked for 1 hour, but then suddenly It got disconnected and did not connect again.

If I try to re-configure the integration manually, the original (1st) bluetooth MAC address is pre-filled. Changing to the new correct address doesn't work. It directly gives the message 'Failed to Connect', and the original MAC address is pre-filled again i.s.o. the correct new address.

I started a debug log and try to connect twice. Hope it gives you something useful. I will try your option to delete the folder at a later time. If it works I will let you know! Thanks.

Debug log: 2024-02-28 19:34:08.916 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration bosch_shc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-02-28 19:34:08.917 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration alarmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-02-28 19:34:08.917 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration casambi_bt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-02-28 19:34:08.917 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-02-28 19:34:26.154 WARNING (MainThread) [zigpy.application] Zigbee channel 20 utilization is 85.82%! 2024-02-28 19:34:26.155 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc. 2024-02-28 19:34:26.764 WARNING (MainThread) [zigpy.ota.provider] Salus: Couldn't download 'https://eu.salusconnect.io/demo/default/status/firmware': 500/Internal Server Error 2024-02-28 19:34:26.999 ERROR (MainThread) [pyhap.characteristic] SecuritySystemCurrentState: value=0 is an invalid value. 2024-02-28 19:34:26.999 ERROR (MainThread) [pyhap.characteristic] SecuritySystemTargetState: value=0 is an invalid value. 2024-02-28 19:36:41.362 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.dinner_table_blob, light.kitchen_workplace are missing or not currently available

WITSGUNBR commented 8 months ago

To come back to my issue;

Removing the Casambi BT folder from the .storage folder seemed to be the trick. I found three folders with the name of the MAC addresses from the (old) networks. I believe the integration tried to connect the old network i.s.o. the new one.

Thanks for the help.