Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartthings Integration: Unable to complete SmartApp install #29303

Closed
agrieco opened this issue Dec 1, 2019 · 4 comments
Closed

Smartthings Integration: Unable to complete SmartApp install #29303

agrieco opened this issue Dec 1, 2019 · 4 comments

Comments

@agrieco
Copy link

agrieco commented Dec 1, 2019

Home Assistant release with the issue:

0.102.3

Last working Home Assistant release (if known):
none

Operating environment (Hass.io/Docker/Windows/etc.):

hassio

Integration:

Samsung Smartthings

Description of problem:
I'm using my own SSL certs and base_url and attempting to get smartthings integration working.
I've created an access token, inserted it into the integration and see the SmartApp created on the classic version of the Smartthings app. When I go to install that app, I get the 'Something went wrong. Please try to install the SmartApp again' error message on my phone and a pysmartapp.errors.SignatureVerificationError (see below) error message as the webhook is called.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

2019-12-01 14:47:22 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Created SmartApp 'homeassistant.dd542712-75fb-4dfe-a845-23e7614c3b2a
' (23d7d3f7-51cc-45ed-a291-648a7d7ddf22)
2019-12-01 14:47:22 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Updated App Settings for SmartApp 'homeassistant.dd542712-75fb-4dfe-
a845-23e7614c3b2a' (23d7d3f7-51cc-45ed-a291-648a7d7ddf22)
2019-12-01 14:47:22 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Updated App OAuth for SmartApp 'homeassistant.dd542712-75fb-4dfe-a84
5-23e7614c3b2a' (23d7d3f7-51cc-45ed-a291-648a7d7ddf22)
2019-12-01 14:47:40 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook <webhook removed for pasting>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 485, in smartapp_webhook
    result = await manager.handle_request(data, request.headers)
  File "/usr/local/lib/python3.7/site-packages/pysmartapp/smartapp.py", line 174, in handle_request
    resp = await req.process(smartapp, headers, validate_signature)
  File "/usr/local/lib/python3.7/site-packages/pysmartapp/request.py", line 70, in process
    raise SignatureVerificationError
pysmartapp.errors.SignatureVerificationError

Additional information:

@agrieco
Copy link
Author

agrieco commented Dec 1, 2019

As an update, I tried to change this to use Nubucasa for remote access vs my own (duckdns addon with a forwarded port) and it worked just fine. The app installed and worked.

One thing to note, my base_url orignally has: https://somedomain.duckdns.org:[someport]

@agrieco
Copy link
Author

agrieco commented Dec 1, 2019

Ok- after some debugging, it appears there is a bug when the base_url has a port number attached to it. When my base_url had a port associated with it, I got the original error in this bug report. I cleaned up the ST integration config and then when I changed port forwarding around to use 443 and therefore have a base_url: https://somedomain.duckdns.org/ everything works fine.

@frenck
Copy link
Member

frenck commented Dec 2, 2019

Yep, SmartThings expects it to run on a standard port.

Glad you've figured it out! 👍

@frenck frenck closed this as completed Dec 2, 2019
agrieco added a commit to agrieco/home-assistant.io that referenced this issue Dec 2, 2019
@agrieco
Copy link
Author

agrieco commented Dec 2, 2019

Yep, SmartThings expects it to run on a standard port.

Glad you've figured it out! 👍

created a PR to update documentation:
home-assistant/home-assistant.io#11349

frenck added a commit to home-assistant/home-assistant.io that referenced this issue Dec 2, 2019
* Added commentary about base_url port requirements

Update based on learnings of:
home-assistant/core#29303

* Update source/_integrations/smartthings.markdown

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants