core
core copied to clipboard
Smartthings + Home Assistant Cloud: could not validate webhook
The problem
My Smartthings integration has been running just fine up until today when it stopped. I deleted the integration and wanted to re-add it, but am getting an error I've never seen before. Basically with Home Assistant Cloud setting up Smartthings has always been smooth experience.
- I'm clicking 'Add Integration' button, select Smartthings. I get this:
SmartThings will be configured to send push updates to Home Assistant at:
https://hooks.nabu.casa/...
If this is not correct, please update your configuration, restart Home Assistant, and try again.
- I put my token in the next step, click submit and get this error:
SmartThings could not validate the webhook URL. Please ensure the webhook URL is reachable from the internet and try again.
This is what I get in the logs:
homeassistant | 2022-07-14 17:19:11 ERROR (MainThread) [homeassistant.components.mqtt.climate] Could not parse temperature from
homeassistant | 2022-07-14 17:20:35 ERROR (MainThread) [homeassistant.components.smartthings.config_flow] API error setting up the SmartApp: {'requestId': 'EF419400-C55B-4ADA-8EDB-4FE2E529A6FF', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'TargetNon200Error', 'target': 'https://hooks.nabu.casa/...', 'message': 'Target did not respond with a 200 status. Upstream status code=503', 'details': []}]}}
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/src/homeassistant/homeassistant/components/smartthings/config_flow.py", line 124, in async_step_pat
homeassistant | app, client = await create_app(self.hass, self.api)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 146, in create_app
homeassistant | app, client = await api.create_app(app)
homeassistant | File "/usr/local/lib/python3.10/site-packages/pysmartthings/smartthings.py", line 110, in create_app
homeassistant | entity = await self._service.create_app(app.to_data())
homeassistant | File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 171, in create_app
homeassistant | return await self.post(API_APPS, data)
homeassistant | File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 395, in post
homeassistant | return await self.request("post", self._api_base + resource, data=data)
homeassistant | File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 368, in request
homeassistant | raise APIResponseError(
homeassistant | pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "EF419400-C55B-4ADA-8EDB-4FE2E529A6FF", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "TargetNon200Error", "target": "https://hooks.nabu.casa/...", "message": "Target did not respond with a 200 status. Upstream status code=503", "details": []}]}}
If I open the webhook URL in the browser I'm getting {"statusCode":503,"message":"Unavailable"}
too.
It looks like the problem is rather with the webhook itself than with the integration, but that's just my best guess.
What version of Home Assistant Core has the issue?
2022.7.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Smartthings
Link to integration documentation on our website
https://www.home-assistant.io/integrations/smartthings/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
smartthings documentation smartthings source (message by IssueLinks)
Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (smartthings
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Similar issue after upgrading to 2022.7.x
Have had my SmartThings integration running for a few years with no issue.
EDIT: I had to create a new token on the SmartThings side and reconfigured the integration. Seems to be working now.

I am having the same issue as domeq above with Home Assistant 2022.7.5, Supervisor 2022.07.0, Operating System 8.2.
Looks like the same issue as https://github.com/home-assistant/core/issues/73973 (reported on 2022.6.7)
I wouldn't say it's the same issue as it's a completely different setup and even the response code from the webhook is different.
My problem is that a webhook generated by the Smarthings integration and living under https://hooks.nabu.casa/
returns 503 (unlike any other, already existing webhook which all return {}
and 400 response code when I do a normal GET request). The problem lies either in the Smarthings integration that handles the webhook call or the Nabu Casa webhooks setup. Either way, I've already tried everything on my end - no fix yet :(
I'm having this exact same issue and I can't figure it out.
I'm having this exact same issue and I can't figure it out.
What version of TLS are you using? 1.3 is not supported.
I don't know where Id find that information.
Same problem here.....
Same problem here...
I contacted Nabu Casa support and while the problem was not on their side, they gave me a tip that fixed the integration.
What you need to do is go to your main configuration directory and to .storage
directory in it and remove a smartthings
file. Then restart Home Assistant and re-create the integration.
I've deleted the file. and it still give me the same "could not validate webhook" error. If I use DuckDNS it works. If I reconfigure to use Cloudflared I get the error.