Unknown error on SmartThings integration

I am attempting to enable the HA integration for Samsung SmartThings and when I enter my token I get a message saying Unknown error has occurred. Can someone help me with that. I am using nabu casa for the https requirement. Any idea what I can do to fix it?

See below for log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 37, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 69, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 228, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 124, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 162, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 47, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 90, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 96, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 139, in _async_handle_step
    result = await getattr(flow, method)(user_input)  # type: Dict
  File "/usr/src/homeassistant/homeassistant/components/smartthings/config_flow.py", line 90, in async_step_user
    await setup_smartapp_endpoint(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 219, in setup_smartapp_endpoint
    hass, DOMAIN, "SmartApp", config[CONF_WEBHOOK_ID], smartapp_webhook
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 33, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

Guys anyone have any idea, this is the last component that I need to finalize my HA config but just cannot get past that error :frowning:

Try the following:

pip install hass_smartthings_remove
hass_smartthings_remove <PERSONAL_ACCESS_TOKEN>

Then go back to the integrations and try adding it again.

Source: https://github.com/andrewsayre/hass-smartthings-remove

I actually got this working in the end, no idea how really but after a couple more retries, nabu finally picked it up

I’m having this same problem and have been for a couple of weeks now. I used to have the SmartThings integration setup and running perfectly fine, then switched host operating systems and haven’t been able to get it working again since, even after swapping back to the original OS I was using.

I am currently running Hass.io on Docker with an intel-nuc as my host machine and getting the exact same error that the OP posted above.

I’ve tried running the hass_smartthings_remove program someone posted. Added in the generated webhook into the smartthings file under .storage. Tried every combination of config I could thing of but nothing seems to work.

Someone please help!

I’ve got the same issue… Did you ever get it working again?

Yeah I finally got it to work. Took several different tries on complete reloads of the whole docker setup but eventually it just worked with no explanation. Not sure what triggered it to work, but it finally did.

Also having an issue. I upgraded to python 3.7 and it stopped working, have been trying to re-add it and just getting errors.