Smartthings issue - since yesterday

yesterday HA locked up so i de-powered and restarted HA, it came back up ok but since then smartthings are not getting seen in HA:
‘’’’
Logger: homeassistant.config_entries
Source: components/smartthings/init.py:121
First occurred: 13:22:59 (1 occurrences)
Last logged: 13:22:59
“”
Error setting up entry Home for smartthings
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/usr/src/homeassistant/homeassistant/components/smartthings/init.py”, line 121, in async_setup_entry
token = await api.generate_tokens(
File “/usr/local/lib/python3.9/site-packages/pysmartthings/smartthings.py”, line 209, in generate_tokens
result = await self._service.generate_tokens(
File “/usr/local/lib/python3.9/site-packages/pysmartthings/api.py”, line 424, in generate_tokens
raise APIInvalidGrant(data.get(“error_description”))
pysmartthings.errors.APIInvalidGrant: Invalid refresh token: 0a942401-8b35-4c0e-8157-88f8eaa538c4

Logs:
2022-01-02 13:22:46 ERROR (MainThread) [snitun.client.client_peer] Challenge/Response error with SniTun server (0 bytes read on a total of 32 expected bytes)

2022-01-02 13:22:46 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server

2022-01-02 13:22:58 ERROR (MainThread) [snitun.client.client_peer] Challenge/Response error with SniTun server (0 bytes read on a total of 32 expected bytes)

2022-01-02 13:22:58 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server

2022-01-02 13:22:59 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home for smartthings

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 313, in async_setup

result = await component.async_setup_entry(hass, self) # type: ignore

File “/usr/src/homeassistant/homeassistant/components/smartthings/init.py”, line 121, in async_setup_entry

token = await api.generate_tokens(

File “/usr/local/lib/python3.9/site-packages/pysmartthings/smartthings.py”, line 209, in generate_tokens

result = await self._service.generate_tokens(

File “/usr/local/lib/python3.9/site-packages/pysmartthings/api.py”, line 424, in generate_tokens

raise APIInvalidGrant(data.get(“error_description”))

pysmartthings.errors.APIInvalidGrant: Invalid refresh token: 0a942401-8b35-4c0e-8157-88f8eaa538c4

2022-01-02 13:23:56 WARNING (SyncWorker_0) [homeassistant.components.ring] Error fetching Ring history data for device 3ce1a1afecef: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))
‘’’’
Hope someone can assist as most of my equipment is through smartthings and none of it is connecting to HA.

Its saying your login token is invalid. Unfortunately that usually ends in me removing my integration and re-adding it because the integration has no manual way to reset auth. (really needs to be a feature request)

Yes that means you may have to probably fix one or more entity names once you do that.

1 Like

Thanks Nathan, that fixed it for me just a load of work putting all the sensors back in, renaming, and putting icons back but it is all done now, as you say that could be a real pain if it keeps happening and would be a simple script fix (for a clever scripter) that would re-connect the account. Thanks again

I found this thread SmartThings Invalid Refresh Token: Steps to resolve - #4 by jn3va3 which works!

Hopefully might save others some time.