Closed skarchmit closed 2 years ago
If you restart home assistant and try again... it will say wait while ember mug is being set up... then throws the message. After trying again, it just goes back to the first one all of the time without a waiting period
That's very strange. Is this before or after it loads the mug? What version of home assistant are you on? This integration is not yet compatible with 2022.8. Blinking blue is good, that means the mug is in pairing mode.
I'm on 2022.8 currently, that probably explains why.
It is before it loads the mug
Yeah, can you try updating to version 0.3.0 and trying again? It should work with Home Assistant 2022.8 as long as you don't have the new Bluetooth Integration enabled.
I deleted/disabled the bluetooth integration under integrations. I then tried to install the ember integration and still get the same error 'Config flow could not be loaded: undefined'. I am on HA 2022.8.
That's really strange. Did you restart home assistant after deleting the Bluetooth integration? Do you have any other integrations that use Bluetooth? Eg. Switch it, MiFlora, etc. Do you have any errors in your logs from this integration?
Yes I tried restarting HA after deleting the bluetooth integration. The only Bluetooth device i have is the ember mug hence why i deleted the bt integration as per you advice. I am now on 2022.8.1 in which I see that bleak has been bumped to bleak to 0.15.1.
See error logs below: Logger: homeassistant.util.package Source: util/package.py:98 First occurred: 7:11:45 AM (3 occurrences) Last logged: 7:11:52 AM
Unable to install package bleak==0.14.1: ERROR: Cannot install bleak==0.14.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Logger: aiohttp.server Source: requirements.py:267 First occurred: 7:11:52 AM (1 occurrences) Last logged: 7:11:52 AM
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, 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 60, 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 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 145, in post return await super().post(request) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 70, in post result = await self._flow_mgr.async_init( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 222, in async_init flow, result = await task File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 240, in _async_init flow = await self.async_create_flow(handler, context=context, data=data) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 791, in async_create_flow await async_process_deps_reqs(self.hass, self._hass_config, integration) File "/usr/src/homeassistant/homeassistant/setup.py", line 362, in async_process_deps_reqs await requirements.async_get_integration_with_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 49, in async_get_integration_with_requirements return await manager.async_get_integration_with_requirements(domain) File "/usr/src/homeassistant/homeassistant/requirements.py", line 168, in async_get_integration_with_requirements await self._async_process_integration(integration, done) File "/usr/src/homeassistant/homeassistant/requirements.py", line 183, in _async_process_integration await self.async_process_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 236, in async_process_requirements await self._async_process_requirements(name, missing) File "/usr/src/homeassistant/homeassistant/requirements.py", line 267, in _async_process_requirements raise RequirementsNotFound(name, list(failures)) homeassistant.requirements.RequirementsNotFound: Requirements for ember_mug not found: ['bleak==0.14.1'].
I removed the bleak requirement from version 0.3. So you shouldn't have that error anymore. Is the integration up to date?
Okay I finally added v0.3 via HACS and deleted the bt integration. The mug doesn't stay connected and all the entities become unavailable. I get the following errors in my logs.
Logger: custom_components.ember_mug Source: custom_components/ember_mug/init.py:134 Integration: Ember Mug (documentation, issues) First occurred: 4:06:54 PM (40 occurrences) Last logged: 4:42:53 PM
An unexpected error occurred during loop
Logger: custom_components.ember_mug.mug Source: custom_components/ember_mug/mug.py:382 Integration: Ember Mug (documentation, issues) First occurred: 4:06:49 PM (49 occurrences) Last logged: 4:42:48 PM
Failed to get mug ID Invalid base64-encoded string: number of data characters (1) cannot be 1 more than a multiple of 4 Failed to connect to XXXXXXXXXXXXXXXXXXXXX after 10 tries. Will try again in 2min
@rybackisback That's very strange. It can't seem to decode the ID of your mug. Are you using an Ember Mug 2 or do you have another model?
Would it be possible to enable debugging for my integration and send me the result please? You can see how here: https://www.home-assistant.io/integrations/logger/ For example something like:
logger:
default: error # Or whatever you want
logs:
custom_components.ember_mug: debug
custom_components.ember_mug.mug: debug
custom_components.ember_mug.mug.api: debug
(I think you need to restart after changing the logging settings for them to take effect)
They will only show up under "Show Full Log" I think
Thanks!
Yes I have the ember mug 2. It worked perfectly prior to upgrading HA to 2022.8. So not sure what is it with decoding the ID.
I enabled the logger as below. logger: default: error # Or whatever you want logs: custom_components.ember_mug: debug custom_components.ember_mug.mug: debug custom_components.ember_mug.mug.api: debug
See logs below for embermug:
This error originated from a custom integration.
Logger: custom_components.ember_mug Source: custom_components/ember_mug/init.py:134 Integration: Ember Mug (documentation, issues) First occurred: 4:56:24 PM (58 occurrences) Last logged: 5:13:11 PM
An unexpected error occurred during loop
This error originated from a custom integration.
Logger: custom_components.ember_mug.mug Source: custom_components/ember_mug/mug.py:382 Integration: Ember Mug (documentation, issues) First occurred: 4:56:19 PM (58 occurrences) Last logged: 5:13:06 PM
Failed to get mug ID Invalid base64-encoded string: number of data characters (1) cannot be 1 more than a multiple of 4
Thank you very much. I'm surprised it doesn't give any more information in debug mode. I'll see what I can do to reproduce this.
@rybackisback If you look just under the list of errors/warnings in the logs you should have a button that says "Load Full Logs" in there you should have much more detailed information. For example I have:
2022-08-10 07:27:22.992 INFO (MainThread) [custom_components.ember_mug.mug] Connected to **:**:**:**
2022-08-10 07:27:23.742 INFO (MainThread) [custom_components.ember_mug.mug] Try to subscribe to Push Events
2022-08-10 07:27:24.126 DEBUG (MainThread) [custom_components.ember_mug] { ... }
2022-08-10 07:27:25.296 DEBUG (MainThread) [custom_components.ember_mug.mug] Current temp None
2022-08-10 07:27:25.684 DEBUG (MainThread) [custom_components.ember_mug.mug] Target temp None
2022-08-10 07:27:26.079 DEBUG (MainThread) [custom_components.ember_mug.mug] Temperature unit from mug: bytearray(b'\x01')
2022-08-10 07:27:26.465 DEBUG (MainThread) [custom_components.ember_mug.mug] Battery is at 100.0. On base: True
2022-08-10 07:27:29.586 DEBUG (MainThread) [custom_components.ember_mug] {'mug_id': 'c', 'serial_number': 'B***********', 'last_read_time': datetime.datetime(2022, 8, 10, 11, 27, 29, 586366, tzinfo=datetime.timezone.utc), 'sw_version': '372', 'mug_name': 'EMBER', 'model': 'Ember Ceramic Mug'}
2022-08-10 07:27:29.586 DEBUG (MainThread) [custom_components.ember_mug] Finished fetching Ember Mug data in 0.000 seconds (success: True)
@sopelj thanks for the guidance. see full logs below.
2022-08-10 16:55:29.974 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ember_mug 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
2022-08-10 16:55:39.805 INFO (MainThread) [custom_components.ember_mug] Ember Mug Ember Ceramic Mug Setup
2022-08-10 16:55:39.805 DEBUG (MainThread) [custom_components.ember_mug] Start running Ember Ceramic Mug
2022-08-10 16:55:39.805 DEBUG (MainThread) [custom_components.ember_mug] {'mug_id': None, 'serial_number': None, 'last_read_time': datetime.datetime(2022, 8, 10, 6, 55, 39, 805886, tzinfo=datetime.timezone.utc), 'sw_version': '', 'mug_name': None, 'model': 'Ember Ceramic Mug'}
2022-08-10 16:55:39.805 DEBUG (MainThread) [custom_components.ember_mug] Finished fetching Ember Ceramic Mug data in 0.000 seconds (success: True)
2022-08-10 16:55:39.821 INFO (MainThread) [custom_components.ember_mug] Starting mug loop XXXXXXXXXXXXX
2022-08-10 16:55:43.453 DEBUG (MainThread) [custom_components.ember_mug.mug] Init: [org.bluez.Error.Failed] Software caused connection abort on attempt 1. waiting 30sec
2022-08-10 16:56:18.523 INFO (MainThread) [custom_components.ember_mug.mug] Connected to XXXXXXXXXXXXX
2022-08-10 16:56:19.290 WARNING (MainThread) [custom_components.ember_mug.mug] Failed to get mug ID Invalid base64-encoded string: number of data characters (1) cannot be 1 more than a multiple of 4
2022-08-10 16:56:19.292 INFO (MainThread) [custom_components.ember_mug.mug] Try to subscribe to Push Events
2022-08-10 16:56:19.680 DEBUG (MainThread) [custom_components.ember_mug] {'00001530-1212-efde-1523-785feabcd123': {'handle': 52, 'description': 'Device Firmware Update Service', 'characteristic': {'00001534-1212-efde-1523-785feabcd123': {'handle': 58, 'props': ['read']}, '00001531-1212-efde-1523-785feabcd123': {'handle': 55, 'props': ['write', 'notify']}, '00001532-1212-efde-1523-785feabcd123': {'handle': 53, 'props': ['write-without-response']}}}, 'fc543622-236c-4c94-8fa9-944a3e5353fa': {'handle': 12, 'description': 'Unknown', 'characteristic': {'fc540013-236c-4c94-8fa9-944a3e5353fa': {'handle': 49, 'props': ['notify']}, 'fc540014-236c-4c94-8fa9-944a3e5353fa': {'handle': 47, 'props': ['read', 'write']}, 'fc540012-236c-4c94-8fa9-944a3e5353fa': {'handle': 44, 'props': ['notify']}, 'fc540011-236c-4c94-8fa9-944a3e5353fa': {'handle': 41, 'props': ['read', 'write']}, 'fc540010-236c-4c94-8fa9-944a3e5353fa': {'handle': 39, 'props': ['read', 'write']}, 'fc54000f-236c-4c94-8fa9-944a3e5353fa': {'handle': 37, 'props': ['read', 'write']}, 'fc54000e-236c-4c94-8fa9-944a3e5353fa': {'handle': 35, 'props': ['read']}, 'fc54000d-236c-4c94-8fa9-944a3e5353fa': {'handle': 33, 'props': ['read']}, 'fc54000c-236c-4c94-8fa9-944a3e5353fa': {'handle': 31, 'props': ['read']}, 'fc54000a-236c-4c94-8fa9-944a3e5353fa': {'handle': 29, 'props': ['write']}, 'fc540008-236c-4c94-8fa9-944a3e5353fa': {'handle': 27, 'props': ['read']}, 'fc540007-236c-4c94-8fa9-944a3e5353fa': {'handle': 25, 'props': ['read']}, 'fc540006-236c-4c94-8fa9-944a3e5353fa': {'handle': 23, 'props': ['read', 'write']}, 'fc540005-236c-4c94-8fa9-944a3e5353fa': {'handle': 21, 'props': ['read']}, 'fc540004-236c-4c94-8fa9-944a3e5353fa': {'handle': 19, 'props': ['read', 'write']}, 'fc540003-236c-4c94-8fa9-944a3e5353fa': {'handle': 17, 'props': ['read', 'write']}, 'fc540002-236c-4c94-8fa9-944a3e5353fa': {'handle': 15, 'props': ['read']}, 'fc540001-236c-4c94-8fa9-944a3e5353fa': {'handle': 13, 'props': ['read', 'write']}}}, '00001801-0000-1000-8000-00805f9b34fb': {'handle': 8, 'description': 'Generic Attribute Profile', 'characteristic': {'00002a05-0000-1000-8000-00805f9b34fb': {'handle': 9, 'props': ['indicate']}}}}
2022-08-10 16:56:21.045 DEBUG (MainThread) [custom_components.ember_mug.mug] Current temp None
2022-08-10 16:56:21.434 DEBUG (MainThread) [custom_components.ember_mug.mug] Target temp None
2022-08-10 16:56:21.825 DEBUG (MainThread) [custom_components.ember_mug.mug] Temperature unit from mug: bytearray(b'\x01')
2022-08-10 16:56:22.215 DEBUG (MainThread) [custom_components.ember_mug.mug] Battery is at 10.0. On base: False
2022-08-10 16:56:24.165 ERROR (MainThread) [custom_components.ember_mug] An unexpected error occurred during loop
2022-08-10 20:35:27.508 ERROR (MainThread) [custom_components.ember_mug] An unexpected error occurred during loop
@rybackisback Thank you very much for the full log. It seems to be an issue with one of the values. Its one of the more nebulous ones, that I'm not certain I'm correctly decoding. I quickly patched it so that it won't crash the loop. If you can try updating to version 0.3.1 and restarting that would be much appreciated.
@sopelj its fixed finally. Thanks for your help. Look forward to trying the new version to work along with the new BT integration when released!
@rybackisback Awesome! I'm glad! Thanks for trying and responding. Much appreciated.
Yeah, I'm currently testing to see if I can migrate this to the new integration. It's not super well documented yet and the mug is a bit peculiar, so we'll see. But I'll update as soon as I can. :)
I'm just getting
Config flow could not be loaded: undefined
when I try to set it up.My ember mug is blinking blue.