Home Assistant Community

Smartthings Integration Error - Unable to setup the SmartApp. Please try again


I recently attempted to setup the new Smartthings Integration, however upon entering the access token I receive the error ‘Unable to setup the SmartApp. Please try again.’ I have tried multiple times with different tokens and permission scopes.

Is this a known error? If it helps, I used a Samsung account for login to the Smartthings IDE.




I am having the same issue all my set up appears correct. Would appreciate any advice. Thanks in advance.


Yes, Me too…


I think I found the issue - my base_url did not have the ‘https://’ prefix, one of the requirements detailed in the config. I found the suggestion here - https://github.com/home-assistant/home-assistant/issues/20978.

Hope this helps.


My base URL was already with HTTPS and this thing was working before. Any clue in how to fix this?
The smartapp still on Smarthings app and I cannot delete it anymore. I don’t know how because from the app is impossible.

Thu Mar 14 2019 17:12:29 GMT-0300 (Argentina Standard Time)
Error processing webhook 2c4e834439134b8e63f5811d82cd680a0bf6417987be4cf959ed1b12b0c9a4ea
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/webhook/__init__.py", line 85, in async_handle_webhook
    response = await webhook['handler'](hass, webhook_id, request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/smartthings/smartapp.py", line 335, in smartapp_webhook
    result = await manager.handle_request(data, request.headers)
  File "/usr/local/lib/python3.7/site-packages/pysmartapp/smartapp.py", line 173, in handle_request
    raise SmartAppNotRegisteredError(req.installed_app_id)
pysmartapp.errors.SmartAppNotRegisteredError: SmartApp handler for installed app 'd1d6004e-1c5c-444f-b5f9-e6725c94f7e0' was not found.

Thu Mar 14 2019 17:12:19 GMT-0300 (Argentina Standard Time)
API error setting up the SmartApp: {'requestId': '0C62B642-C8EE-4004-8DF7-2ED42686F8F9', 'error': {'code': 'UnexpectedError', 'message': 'A non-recoverable error condition occurred.', 'details': []}}
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/smartthings/config_flow.py", line 87, in async_step_user
    await app.refresh()  # load all attributes
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/app.py", line 355, in refresh
    data = await self._api.get_app(self._app_id)
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 164, in get_app
    return await self.get(API_APP.format(app_id=app_id))
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 370, in get
    return await self.request('get', self._api_base + resource, params)
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 365, in request
pysmartthings.errors.APIResponseError: 500, message='Internal Server Error'

Could you solved it?


Here is the scoop!

how the integration works

The hass_smartthings_remove utility can be run from any PC or VM. I built a linux VM to setup the python3 and PIP environment to execute the utility and it worked great. (I had an ubuntu template VM ready to go from a different project so setting up the VM took about 20 seconds)


Thanks for the answer. Sadly I have hass.io then I guess the problem cannot be solved. Well I will use the older solution that basically it works as a charm and does not have any BIG issue like this nee plugin.


I got the utility to cleanup ST to work just fine.

I am still trying to get things working in Hass.io… I will update if I find success…


Thank you very much. I will wait for that solution. Let me know if you need more information for debugging purposes.


Will it work if I remove the webhook?


I have just been running the utility on a linux machine to clear the orphaned app from SF. the token on the HA side is not the issue.


What are your thought then?


@Javier_Dst I got it working… below is the config I used for the http section in configuration.yaml. I had to generate a Long-Lived Access Token from a user profile and insert it in so that SmartThings could auth to HA then I rebooted HA. I then installed the Home Assistant app in the SmartThings mobile client. once that installed I clicked on the link in HA to validate I could see all of my devices from SmartThings in HA… Woo Hoo!!

api_password: (Long-Lived Access Token)
base_url: https://ha.insert_your_domain.org:8123
server_port: 8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

Once I could see everything I tested by adding a couple cards to HA and tested them out. Success!!

1 Like

Trying… I will let you know ASAP.


IT WORKED! So the problem is:

The missing port
The kind of password (LONG LIFE)

Thank you very much!


:+1: Awesome!!


I successfully used the utility to clean up the existing smartapp and add it again to get things working:


Looking for some direction on how to resolve the issue I’m having with the Smartthings Component. A bit of background. I had successfully integrated the Smartthings component and all was working well. I decided to remove the Smartthings component to simplify my configuration and to perform some testing. After completing some testing I wanted to reinstall the Smartthings component and now am unable to complete the installation. And unfortunately I didn’t take a snapshot of the working configuration.

Raspberry Pi 3B+
Hass.io v0.90.1
Smartthings Classic Android App V2.17.0 Build 448328

1.) From Home Assistant > Configuration > Intergration > Smartthings > Enter Personal Access Token
2.) Generate a new token from the Smartthings
3.) Enter new token into the Home Assistant dialog box and select > Submit
4.) New Dialog Box opens “Install Smart App” with instructions to install the Home Assistant SmartApp
in at least one location and click submit.
5.) Open the Smartthing Classic app and perform the following > Automation > SmartApps > Add a
SmartApp > My Apps > Select the existing Home Assistant App > Configuration > Done > Allow >
receive a confirmation that is was “successfully installed”
6.) Return to Home Assistant dialog box “Install Smart App” and click > Submit.
7.) New dialog box with the following message
“Please ensure you have installed and authorized Home Assistant SmartApp and try again.”

I’ve completed this sequence multiple time with the same results. I’ve attempted to locate a method to remove the Home Assistant app from the Smartthings Classic app and haven’t been successful.

I attempted the solution suggested by cdrom1028 without success. So I’m reaching out for any additional ideas or directions for resources that I can investigate for a solutions.

Thanks in advance for any input.


Hi, I have the same problem, I used the removal tool, reinstalled, nothing. Then again the removal tool, modified the http section as per the suggestion by @cdrom1028 but nothing works. It says the app was successfully installed but I can’t see any device in HA.

So I did the tests in the documentation
( curl -X POST https://{BASE_URL}/api/webhook/{WEBHOOK_ID} -H “Content-Type: application/json; charset=utf-8” -d …etc etc) and all worked fine, I did get the expected result.

I’m lost I don’t know what else to do.
Been trying to solve this for a week now!
Anyone? any ideas?
Tks in advance