Smartthings - "Unknown error occurred" during initial setup

I am having a huge headache with the SmartThings integration. I got a new Pi4 and decided to start my setup from scratch. After getting all of the initial config the way I wanted it, I decided to get SmartThings connected back up again. But, I keep getting an “unknown error” trying to set up SmartThings again.

45%20PM

I have run the hass_smarthings_remove utility and the Smart App appears to be gone from my ST app. But, this hasn’t had any impact on the “unknown error”. I am using Nabu Casa for remote access.

The following error is in the logs:

Error handling request
4:54 PM components/smartthings/smartapp.py (ERROR)

Error handling request
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 40, in real_ip_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 73, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 136, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 122, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 163, in post
return await super().post(request, flow_id)
File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 48, 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 89, 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 132, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
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 237, in setup_smartapp_endpoint
hass, config[CONF_WEBHOOK_ID]
TypeError: async_create_cloudhook() takes 2 positional arguments but 3 were given

Any thoughts?

1 Like

As soon as I posted this I found the solution: Samsung Smartthings Integration · Issue #28475 · home-assistant/core · GitHub

The Nabu Casa webhook is not being automatically included in the /config/.storage/smartthings config file in some cases.

By following this, I was able to get it working again.

so my file looks like the below.
the cloudhook_url is the one that i find in the front end, under:

  • config
  • home assistant cloud
  • webhooks
  • click on “manage” for the smartthings one listed.
  • copy that full URL and paste it in there

{
“data”: {
“cloudhook_url”: “https://hooks.nabu.casa/xxxxx=”,
“instance_id”: “2ac219ab-b7f3-xxx-xxx-xxx”,
“webhook_id”: “xxxx”
},
“key”: “smartthings”,
“version”: 1
}

3 Likes

Thank you SOOOOO MUCH. This was indeed the solution for me as well.

2 Likes

Thank you, this was the problem for me too. Might add that it was not possible to install the “smart app” in the new smartthings app, had to use the classic app to install the smart app.

1 Like

Thanks, yes, you have to use the classic app. The new app won’t let you get to “My Apps” to add the HA app.

OK so I’m new to all this I installed Home Assistant as a virtual machine cannot get the smart things app to work I keep getting unknown error has occurred don’t know where to find the files that you’re talking about to make the changes any help would be greatly appreciated.

I’m also trying to get this to work for the first time. (Just bought my first Pi today.)

I’m in the File Editor, and I can access the config folder, but I don’t have a .storage folder.

Are you able to see any dot files? If not then you may need to enable show hidden files.

Hello
I am new to Home Assistant and am also getting the Error above.
I have a Nabu Casa setup and connected, configured the webhook and generated a Token from ST
When I enter the Token I get Unknown error occured as well.

I see I am supposed to edit the ST config in the .storage but I also do not have that folder that i can locate.
I see people suggesting I turn on Hidden files but do not see anywhere obvious I can do that.

Using Pi4 latest image.

Thanks

For those struggling to find it - use the STUDIO CODE SERVER ADD ON and it simplifies to find the file there with the search bar at the top (once you open the Addd ON)