Closed Dinth closed 9 months ago
Hi! Thanks for the detailed logs. There are many errors, but they seem to be from other integrations. From what I can see the mug is indeed detected and is able to sometimes query attributes. However, it seems to fail often and eventually gives up.
I see you're using at least one proxy, do you have just the one or multiple? How close is it to the mug and wifi signal? There are multiple connection errors to your Proxy, perhaps it has a poor wifi signal and cannot properly forward to connection?
bt-proxy-masterbedroom @ 10.10.10.185: Connection error occurred: [Errno 104] Connection reset by peer
At the moment I’ve got two proxies which should work (GL-S10 model) and both are Ethernet/PoE. I have tried putting the mug literally next to masterbedroom proxy without any luck.
Kind regards, Michal Gawronski-Kot @.***
On Thu, 15 Feb 2024 at 00:05, Jesse Sopel @.***> wrote:
Hi! Thanks for the detailed logs. There are many errors, but they seem to be from other integrations. From what I can see the mug is indeed detected and is able to sometimes query attributes. However, it seems to fail often and eventually gives up.
I see you're using at least one proxy, do you have just the one or multiple? How close is it to the mug and wifi signal? There are multiple connection errors to your Proxy, perhaps it has a poor wifi signal and cannot properly forward to connection?
bt-proxy-masterbedroom @ 10.10.10.185: Connection error occurred: [Errno 104] Connection reset by peer
— Reply to this email directly, view it on GitHub https://github.com/sopelj/hass-ember-mug-component/issues/49#issuecomment-1945097807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACMSSV7EZJZ6AS6PTYDQMDYTVGMXAVCNFSM6AAAAABDIMFDISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBVGA4TOOBQG4 . You are receiving this because you authored the thread.Message ID: @.***>
Oh OK, thanks.
I am not familiar with that one. But, googling it does show quite a few issues with packet loss anbd disconnects with that device (eg. this and this), although they are older, so I'm not sure if it is still pertinent, but could be good to look into.
Otherise, perhaps make sure it is using ethernet and the onboard wifi is not used. Also, ensure the settings have the scan type set to active.
If you still have issues, you could try disabling one of them in case the issue is them fighting over the connection, although, only one appears in your log so I don't think that's the issue here.
I have disconnected GL-S10 and now relying on ESP32 BT proxy in Presence sensors. Unfortunately the problem still persists (although with a different error messages):
2024-02-29 09:23:42.268 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Ember Ceramic Mug for ember_mug
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aioesphomeapi/client.py", line 568, in bluetooth_device_connect
await connect_future
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ember_mug/__init__.py", line 114, in async_setup_entry
await mug_coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 278, in async_config_entry_first_refresh
await self._async_refresh(
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ember_mug/coordinator.py", line 96, in _async_update_data
changed = await self.mug.update_initial()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ember_mug/mug.py", line 400, in update_initial
return await self._update_multiple(INITIAL_ATTRS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ember_mug/mug.py", line 411, in _update_multiple
await self._ensure_connection()
File "/usr/local/lib/python3.12/site-packages/ember_mug/mug.py", line 150, in _ensure_connection
client = await establish_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 363, in establish_connection
await client.connect(
File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 300, in connect
connected = await super().connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bleak/__init__.py", line 605, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bleak_esphome/backend/client.py", line 77, in _async_wrap_bluetooth_operation
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bleak_esphome/backend/client.py", line 297, in connect
await self._client.bluetooth_device_connect(
File "/usr/local/lib/python3.12/site-packages/aioesphomeapi/client.py", line 584, in bluetooth_device_connect
not await self._bluetooth_device_disconnect_guard_timeout(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aioesphomeapi/client.py", line 609, in _bluetooth_device_disconnect_guard_timeout
await self.bluetooth_device_disconnect(address, timeout=timeout)
File "/usr/local/lib/python3.12/site-packages/aioesphomeapi/client.py", line 660, in bluetooth_device_disconnect
await self._bluetooth_device_request(
File "/usr/local/lib/python3.12/site-packages/aioesphomeapi/client.py", line 714, in _bluetooth_device_request
[response] = await self._get_connection().send_messages_await_response_complex(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aioesphomeapi/connection.py", line 816, in send_messages_await_response_complex
asyncio.exceptions.CancelledError
Thanks for the update. That is strange. It still seems to be a timeout issue. What kind of proxy are you using? Are you just testing with one or still with multiple? Are you certain the active
option is enabled in scan_parameters
?
Hi. This morning i have tried again and it just worked straight away.
Just one follow-up question please - if i have multiple BT proxies, will Ember Mug connect to any of them (depending on which one has strongest signal) or will it only keep connecting to the one which was closest during the pairing?
Hi. This morning i have tried again and it just worked straight away.
Just one follow-up question please - if i have multiple BT proxies, will Ember Mug connect to any of them (depending on which one has strongest signal) or will it only keep connecting to the one which was closest during the pairing?
Thanks! I appreciate the update and I'm glad it works for you.
In theory it should work with multiple proxies and favour the closest. I have not tested this however. If they are too close and the signal is similar strength however you may get a lot of switching. In this case you might want to separate them or adjust signal strength in the proxy settings. If you notice one is not used, you may need to put the device in pairing mode whilst closest to the other so it does an initial pair. Don't hesitate if you have issues, however this is sort of out of control of this integration and falls to how proxies are handled in Home Assistant.
Description
After setting up the mug, the integration fails to start/connect to the mug.
What I Did
I have installed the integration from HACS, put the mug in a pairing mode, went to devices, chosen the integration, the integration setup window detected my mug's MAC address and i have added that mug to HA.
Logs / Errors
If possible/applicable, please enable logging, reproduce the issue and include any related errors below. This greatly helps with debugging and is much appreciated. (If you aren't sure how to enable it, please see the debugging section in the README)