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

Smartthing Integration is not working anymore with 2025.1.0 #134609

Open
rolschu1960 opened this issue Jan 4, 2025 · 11 comments
Open

Smartthing Integration is not working anymore with 2025.1.0 #134609

rolschu1960 opened this issue Jan 4, 2025 · 11 comments

Comments

@rolschu1960
Copy link

The problem

Not sure where to place this issue. The Smartthing Integration is not working anymore with 2025.1.0. Integration is not loading anymore. Moving back to 2024.12. all fine

What version of Home Assistant Core has the issue?

core-2025.1.0

What was the last working version of Home Assistant Core?

core-2024.12.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Smartthings

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@rrooggiieerr
Copy link
Contributor

Are you using the official SmartThings integration or one of the many custom integrations?

Also, at least some logging should be helpful if you like this to be solved

@rolschu1960
Copy link
Author

rolschu1960 commented Jan 4, 2025 via email

@Maotechh
Copy link

Maotechh commented Jan 4, 2025

Same issue

@scruffyOrc
Copy link

Have you tried removing and reinstalling the integration? Mine stopped as well, I fixed it by doing removing and reinstalling the integration...the reason it wasn't working, based on the logs, was due to the Personal Access Token getting into a bad state. The two systems (HA and SmartThings) were out of sync and you have fix that to get it working again.

@ice3m
Copy link

ice3m commented Jan 4, 2025

Sounds like you just borked yourself like I did, looks like Samsung is deprecating the use of Personal Access Tokens. If you have an existing one you're "grandfathered" in according to them, but Home Assistant just went south on me so I had to restore a backup which forces a new Smart Things PAT. Now I'm getting Too Many Requests Constantly, and they say the new PATs are only good for 24 hours..... So you need a new one every day. They say there's an OAuth method that needs to be used instead, but god I hope the SmartThings HA team is looking at this, 70% of my sensors and automations are SmartThings linked....

https://community.smartthings.com/t/changes-to-personal-access-tokens-pat/292019

The did this in like 30 days over Christmas, they really hate their users...

@scruffyOrc
Copy link

scruffyOrc commented Jan 4, 2025

@ice3m
Well that sucks...guess I'll be broken again in 24 hours.

@Roving-Ronin
Copy link
Contributor

Updated and got the same issue. Assume this (below) is the logs that Devs are after?


Logger: homeassistant.util.loop
Source: util/loop.py:77
First occurred: 5:15:01 pm (1 occurrences)
Last logged: 5:15:01 pm

Detected blocking call to import_module with args ('custom_components.smartthings',) in /usr/src/homeassistant/homeassistant/loader.py, line 1075: ComponentProtocol, importlib.import_module(self.pkg_path) 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 "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 227, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component component = await integration.async_get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in async_get_component comp = self._get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path)

@rrooggiieerr
Copy link
Contributor

@Roving-Ronin looks like you're not using the SmartThings integration that comes with HA Core but a custom version. There are about 5 different custom version floating around, which one are you using? Direct your issue there

@Arise
Copy link

Arise commented Jan 5, 2025

I can see the following error in my logs:

Logger: homeassistant.setup
Source: setup.py:334
First occurred: 5:30:13 PM (1 occurrences)
Last logged: 5:30:13 PM

Setup failed for custom integration 'smartthings': Unable to import component: cannot import name 'ELECTRIC_POTENTIAL_VOLT' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1015, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._get_component, True
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/smartthings/__init__.py", line 28, in <module>
    from .config_flow import SmartThingsFlowHandler  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthings/config_flow.py", line 14, in <module>
    from .const import (
    ...<8 lines>...
    )
  File "/config/custom_components/smartthings/const.py", line 5, in <module>
    from homeassistant.const import (
    ...<5 lines>...
    )
ImportError: cannot import name 'ELECTRIC_POTENTIAL_VOLT' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1035, in async_get_component
    self._component_future.result()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in async_get_component
    comp = self._get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/smartthings/__init__.py", line 28, in <module>
    from .config_flow import SmartThingsFlowHandler  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthings/config_flow.py", line 14, in <module>
    from .const import (
    ...<8 lines>...
    )
  File "/config/custom_components/smartthings/const.py", line 5, in <module>
    from homeassistant.const import (
    ...<5 lines>...
    )
ImportError: cannot import name 'ELECTRIC_POTENTIAL_VOLT' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

@rrooggiieerr
Copy link
Contributor

@Arise that message comes from a custom integration, not from a HA Core integration. Please direct your issue to the author of the custom integration

@home-assistant
Copy link

home-assistant bot commented Jan 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants