Restored HA instance and now SmartThings showing failed to setup

I had some issues while trying to update to 10.5 (lovelace would be unreachable) so I had to restore from a back up. When I did this I noticed that the SmartThings integration was failing now with the card error of “Failed to Setup”.

Checking the logs I see:
“Invalid refresh token” when it tries to setup the entry.

I found a few posts with this exact issue and the fix was:

I was seeing “Invalid refresh token” in my HA logs for smartthings at startup (after a rollback). I was able to resolve this without deleting and reinstalling the SmartThings integration.

Open the ST app on your phone
Go to Automations
Tap the Home Assistant automation
Tap done at the bottom
On the next page tap Allow.

In the HomeAssistant UI, restart.

https://community.home-assistant.io/t/smartthings-invalid-refresh-token-steps-to-resolve/169174/4

Everything was peachy before the restored backup

The problem with this is that’s no longer in the App since they redesigned SmartThings. Has anyone found a way around this with the new app?

I’m trying to avoid deleting the integration if possible.

2 Likes

This worked for me. “Automations” was “Routines” in my app.

All the way at the bottom was a category for SmartApps. Clicked on the one i named for Home Assistant, hit done, and it went to the page letting me click allow.

Restarted Home Assistant and everything’s back to normal.

3 Likes

Getting the same Issue with the "invalid refresh token on the HA side. I see “Home Assistant” under SmartApps, but tapping it it just flashes, any ideas?

I have the same issue - I am using my Android phone, I wonder if it is different on iOS?

I had to remove the HA from my Smart Things app then reauthorize Smart things with a new token. Had to re-setup a few devices but it was the only thing that fixed it.

@ice3m Would you mind outlining how you reauthorized SmartThings with a new token? So, my situation is a little unique. I accidentally deleted my token with Samsung, and then created a new one thinking I could simply update it in the HA integration easily. I’m just getting a webhook error when I try and install a new instance of SmartThings in HA. I tried to edit the file ‘/config/.storage/smartthings’ and replaced the ‘instance_id’ with the new token (as the ‘instance_id’ was the exact same length and format as the tokens that Samsung generates). Restarted HA after that and HA had generated and replaced the ‘instance_id’ and ‘webhook_id’ that was there before. It looks like it is using the token I provided on initial setup to generate new ‘instance_id’ and ‘webhook_id’ every time HA starts? I don’t know how to search within linux command line for contents of files, but even if I did, I do not have the original token to search my files to see where it might actually be stored in the HA system files. :frowning:

If anyone else has some ideas, please let me know. It is strange that there is no built in tool included in the integration to add a new token. Help!?

I believe I had to go into the Terminal and delete the smart things file, then it let me enter a new token.

/config/.storage/smartthings

I think this is where it was, there was a smartthings file I renamed. Can’t find the guide I followed for this.

I have this problem after updating core yesterday

Based on what Crosocha stated. The solution is the following:

1.) In your SmartThings app on your phone. At the bottom choose Routines. Then scroll all the way to the bottom to the category for SmartApps. In my case click on the one i named for Home Assistant, hit done, and it will go to a page letting you click allow.

2.) In Home Assistant either Reload the Integration or Restart Home Assistant and everything should be back to normal.

3 Likes

I just restored my HA and had the same issue with Smartthings. I did exactly as Zomar stated and it worked without removing anything or having to setup anything new.
Thank you!

I don`t have this category for SmartApps at the routines tab. Running on android.
For me, it allows me to add a new token, says everything is configured, but Smarthings never shows at Devices menu inside HA. Not sure what else to do.