Something went wrong when installing Home Assistant app on Smartthings

I had smartthings integration working properly on hass.io. Recently I ran into some issues and ended up moving my hass.io installation to docker running inside my linux box. Since then I can’t get the integration to work between smartthings and hass.

I removed the orphaned applications from smartthings and generated a new API key. When I go to HA and start the smartthings integration it correctly creates the app. When I go to smartthings classic on my phone (with wifi off) I get the “Something went wrong” Please try to install the SmartApp again. It doesn’t let me install it at all.

I turned on debugging for smartthings and these are the messages I get

2020-01-12 15:37:15 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Setup endpoint for https://<mine>.duckdns.org/api/webhook/39b8ed02fc217ea1142ae835d9a20e4e0cc7af3e974b16a8a97546b69e4e1131
2020-01-12 15:37:21 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Created SmartApp 'homeassistant.a44ef3ee-cbe2-446e-bd69-e764f31c14a9' (52539c94-0ea2-47da-a07a-835f5a2475dd)
2020-01-12 15:37:22 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Updated App Settings for SmartApp 'homeassistant.a44ef3ee-cbe2-446e-bd69-e764f31c14a9' (52539c94-0ea2-47da-a07a-835f5a2475dd)
2020-01-12 15:37:22 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Updated App OAuth for SmartApp 'homeassistant.a44ef3ee-cbe2-446e-bd69-e764f31c14a9' (52539c94-0ea2-47da-a07a-835f5a2475dd)
2020-01-12 15:38:51 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook 39b8ed02fc217ea1142ae835d9a20e4e0cc7af3e974b16a8a97546b69e4e1131
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/httpsig/sign.py", line 35, in __init__
    rsa_key = RSA.importKey(secret)
  File "/usr/local/lib/python3.7/site-packages/Crypto/PublicKey/RSA.py", line 746, in import_key
    from Crypto.IO import PEM
  File "/usr/local/lib/python3.7/site-packages/Crypto/IO/PEM.py", line 41, in <module>
    from Crypto.Cipher import DES, DES3, AES
  File "/usr/local/lib/python3.7/site-packages/Crypto/Cipher/__init__.py", line 35, in <module>
    from Crypto.Cipher._mode_siv import _create_siv_cipher
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 857, in get_code
  File "<frozen importlib._bootstrap_external>", line 525, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pysmartapp/request.py", line 65, in process
    path=app.path)
  File "/usr/local/lib/python3.7/site-packages/httpsig/verify.py", line 88, in __init__
    secret, algorithm=self.auth_dict['algorithm'])
  File "/usr/local/lib/python3.7/site-packages/httpsig/sign.py", line 39, in __init__
    raise HttpSigException("Invalid key.")
httpsig.utils.HttpSigException: Invalid key.

The above exception was the direct cause of the following exception:

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 473, 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 68, in process
    raise SignatureVerificationError from ex
pysmartapp.errors.SignatureVerificationError

my configuration.yaml looks like this

http:
  base_url: https://<mydomain>.duckdns.org/
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

I’m using duckdns and sslencrypt. I can reach my HA using “https://.duckdns.org/” as I have port forwarding moving 443 to 8123.

I also checked digicert and got all green on my certificate.

Any ideas where i’ve gone wrong?

Did you ever figure it out? I’m having a similar issue.