Smartthings Integration Broken (again)?

I think one thing that’s happening is that we need to fetch the account linking first, and if you’re offline at that moment I think SmartThings does not boot. If that info could be retrieved at launch, it should just work continuously

I dont think that is a practical solution keeping watch and restarting home assistant when you are having intermittent internet outage. Smartthings is the only internet based integration that i have installed that doesn’t automatically reconnect once internet is back online without having to manually reload or restart home assistant.

But like said, in general it should just do that once you have the account linking set up, which it did not in your current logs.

I have seen another issue which reports the same, so I have to investigate this again

Thanks @joostlek for looking into this

Hello, after Updating to the new Version i cant install Smartthings. Everytime i try i get a Error 500. Tryd to delete old cache, old smartthings files, extern url is reachable so i dont know what to do

SmartThings for you guys working on new Patch? Wondering that there is no someone else with that Problem

I am having the same since the update to 2025.5.5. I hope they can fix the issue.

I am not sure what issue you exactly have, please be more descriptive :slight_smile:

Is one of they ways to solve this constant Smartthings crashing/disconnecting is just a simple automation that watches any of the smartthing devices and if/when it become “unavailable” you restart the Smartthings integration?

Like this:

alias: Restart Smarthings
description: ""
triggers:
  - trigger: state
    entity_id: switch.flood_light
    to: unavailable
conditions: []
actions:
  - action: homeassistant.reload_config_entry
    metadata: {}
    data:
      entry_id: 6751e40b2946531acd1a29ae3
mode: single

Would that work or will that cause other issue with Smartthings?

My integration is crashing almost daily now.

I’d rather try to debug what is going on here. Can you enable debug logs?

For everyone who downloaded the custom SmartThings integration via HACS: delete it and install SmartThings (not HACS, and not custom) from the official Home Assistant store. The custom integration no longer works and forces you to log in every 24 hours. I spent two weeks trying to figure out the issue — oh man!

not sure if this will help… but here’s what I experienced and how I resolved it:

This worked. Only I used the custom smartthings integration controlling my TV and Soundbar. I hope there will be another integration which provides the same functions.

I’m also finding that the Smartthings integration doesn’t recover after an internet outage. At 3:41am this morning my internet went down briefly (Starlink dish rebooted for an update) and this is what I found in the Smartthings logs:

2025-09-05 03:42:02.068 ERROR (MainThread) [pysmartthings] Connection error occurred while subscribing to events
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 527, in subscribe
    await self._internal_subscribe(session, subscription_url)
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 439, in _internal_subscribe
    async for event in event_source:
    ...<49 lines>...
                break
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 157, in __anext__
    async for line_in_bytes in self._response.content:
    ...<21 lines>...
            self._process_field(line, '')
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 52, in __anext__
    rv = await self.read_func()
         ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 352, in readline
    return await self.readuntil()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 386, in readuntil
    await self._wait("readuntil")
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 347, in _wait
    await waiter
aiohttp.client_exceptions.SocketTimeoutError: Timeout on reading data from socket
2025-09-05 03:42:06.631 ERROR (MainThread) [pysmartthings] Error occurred while subscribing to events
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/resolver.py", line 117, in resolve
    resp = await self._resolver.getaddrinfo(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
aiodns.error.DNSError: (3, 'DNS server returned general failure')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1532, in _create_direct_connection
    hosts = await self._resolve_host(host, port, traces=traces)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1123, in _resolve_host
    await future
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1179, in _resolve_host_with_throttle
    addrs = await self._resolver.resolve(host, port, family=self._family)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp_asyncmdnsresolver/_impl.py", line 140, in resolve
    return await super().resolve(host, port, family)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/resolver.py", line 126, in resolve
    raise OSError(None, msg) from exc
OSError: [Errno None] DNS server returned general failure

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 127, in _request
    response = await self.session.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 770, in _request
    resp = await handler(req)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 725, in _connect_and_send_request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        req, traces=traces, timeout=real_timeout
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 642, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1209, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1538, in _create_direct_connection
    raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host api.smartthings.com:443 ssl:default [DNS server returned general failure]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 519, in subscribe
    subscription = await self.create_subscription(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        location_id, installed_app_id
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 409, in create_subscription
    resp = await self._post(
           ^^^^^^^^^^^^^^^^^
    ...<17 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 167, in _post
    return await self._request(METH_POST, uri, data=data, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/pysmartthings/smartthings.py", line 139, in _request
    raise SmartThingsConnectionError(msg) from exception
pysmartthings.exceptions.SmartThingsConnectionError: Error occurred while connecting to SmartThings
025-09-05 03:42:11.171 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry My home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 751, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 118, in async_setup_entry
    implementation = await async_get_config_entry_implementation(hass, entry)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 581, in async_get_config_entry_implementation
    raise ValueError("Implementation not available")
ValueError: Implementation not available

Even now several hours later there are no further log entries and the integration is still errored with the “unable to set up”.

total noob to Home assistant but I am seeing the same issue. SmartThings integration has failed in the devices list a bunch in the last week as I am configuring/rebooting/messing around.

I am going to try the script that was posted above to at least restart the service automatically.

Since I implemented the Smarthings restart automation script… My Smartthings issues have gone away… Not sure why the author of the integration hasn’t implemented this simple fix.

I was having a similar issue with Tuya. But restarting that integration on an internet outage cause Tuya to force a “re-auth” so I turned that off… But Smartthings seems to expect constant reconnect.

Should this also report Smart Tag trackers location?
When I added the integration it does find the tags, but there are no sensors with it.

Sadly to me also doesnt work well. For a while hour maybe 2 works fine and then just dropped refreshing application. If i run smartthings on my phone app and go back to main side when u can choose your tv you know and i select tv and running tv part of smartthings app then suddenly refreshing again HA where tv is be… i was so happy when this api key worked well (have no grandfather api:) ) and i tried refreshing api key daily so i was sooo happy when i heard its working with new versions, but sadly it doesnt work well still.

Same issue here.