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

Exception is thrown and fails to connect to Mr. Steam gecko controller. #99

Open
toxikman opened this issue Mar 9, 2024 · 6 comments
Open

Comments

@toxikman
Copy link

toxikman commented Mar 9, 2024

Version of the custom_component

Geck integration: Version 0.1.9
Home assistant: Version 2024.2.5

Describe the bug

  1. While trying to connect to a Mr. Steam gecko controller, it times out (see screenshot).
  2. A python exception is output to the HA log.
Screenshot 2024-03-09 at 12 55 13 PM

Debug log

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 354, in _connect
self.accessors[GeckoConstants.KEY_PACK_CONFIG_ID].value,
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PackConfID'
2024-03-09 12:49:36.012 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump
await self.async_connect(self._spa_identifier, self._spa_address)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect
return await self.async_connect_to_spa(spa_descriptors[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa
await self._spa.connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 354, in _connect
self.accessors[GeckoConstants.KEY_PACK_CONFIG_ID].value,
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PackConfID'
@fwuehr
Copy link

fwuehr commented Mar 19, 2024

I am facing the same issue since I upgraded home assistant to the latest version. Seems to be a general issue with the newer HA versions 😕 @gazoodle can you confirm this ?

@fwuehr
Copy link

fwuehr commented Mar 25, 2024

Issue seems to be resolved after update to 2024.3.3

@dannyb2100
Copy link

I have been having this issue and cannot see why.
If you're still having this error.

Here's a simple way to auto-restart the service, after it gets into a failure loop.
(It doesn't solve the issue of it failing, but does keep the spa connected)

alias: Restart Integration on Error
description: Automatically restarts an integration when a specific error occurs.
trigger:
  - platform: event
    event_type: system_log_event
    event_data:
      logger: "geckolib.async_spa"
      level: "ERROR"
      message: Cannot set value, protocol retry count exceeded
action:
  - service: button.press
    target:
      entity_id: button.spaname_reconnect
    data: {}

Just replace the entity_id with yours.

@toxikman
Copy link
Author

Still not working with the latest Home Assistant 2024.4.4:

Error setting up entry My Steamer for gecko
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/gecko/__init__.py", line 85, in async_setup_entry
    if not await spaman.wait_for_facade():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 360, in wait_for_facade
    await asyncio.sleep(GeckoConstants.ASYNCIO_SLEEP_TIMEOUT_FOR_YIELD)
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 665, in sleep
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError
Exception during spa connection
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
    await self._connect()
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 354, in _connect
    self.accessors[GeckoConstants.KEY_PACK_CONFIG_ID].value,
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PackConfID'
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump
    await self.async_connect(self._spa_identifier, self._spa_address)
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect
    return await self.async_connect_to_spa(spa_descriptors[0])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa
    await self._spa.connect()
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
    await self._connect()
  File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 354, in _connect
    self.accessors[GeckoConstants.KEY_PACK_CONFIG_ID].value,
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PackConfID'

@toxikman
Copy link
Author

#99 (comment)
This is unrelated. The exception I reported is happening on Setup, not just a normal routine connection issue.

@toxikman
Copy link
Author

Still not working with HA 2024.7.2. Hangs forever after selecting "My Steamer" in the setup dialog, then getting slightly different WARNINGS in the HA log:

2024-07-17 12:11:42.075 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('geckolib.driver.packs.mrsteam',) in /usr/local/lib/python3.12/site-packages/geckolib/async_spa.py, line 270: GeckoPack = importlib.import_module(pack_module_name).GeckoPack inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump
await self.async_connect(self._spa_identifier, self._spa_address)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect
return await self.async_connect_to_spa(spa_descriptors[0])
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa
await self._spa.connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 270, in _connect
GeckoPack = importlib.import_module(pack_module_name).GeckoPack
2024-07-17 12:11:42.082 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('geckolib.driver.packs.mrsteam-cfg-3',) in /usr/local/lib/python3.12/site-packages/geckolib/async_spa.py, line 289: GeckoConfigStruct = importlib.import_module( inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump
await self.async_connect(self._spa_identifier, self._spa_address)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect
return await self.async_connect_to_spa(spa_descriptors[0])
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa
await self._spa.connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 289, in _connect
GeckoConfigStruct = importlib.import_module(
2024-07-17 12:11:42.086 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('geckolib.driver.packs.mrsteam-log-3',) in /usr/local/lib/python3.12/site-packages/geckolib/async_spa.py, line 309: GeckoLogStruct = importlib.import_module(log_module_name).GeckoLogStruct inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump
await self.async_connect(self._spa_identifier, self._spa_address)
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect
return await self.async_connect_to_spa(spa_descriptors[0])
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa
await self._spa.connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 309, in _connect
GeckoLogStruct = importlib.import_module(log_module_name).GeckoLogStruct
2024-07-17 12:11:45.927 ERROR (MainThread) [geckolib.async_spa] Exception during spa connection
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect
await self._connect()
File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 354, in _connect
self.accessors[GeckoConstants.KEY_PACK_CONFIG_ID].value,
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PackConfID'

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

3 participants