Smartthings Integration Issues

Hey All,

I’m having some trouble setting up my smartthings integration with home assistant. I’m installing it on my unraid server (6.7.2) and I’ve successfully installed the home assistant docker. I’ve configured my Phillips Hue bridge at this point. My next step is getting the rest of my devices into HA with my Smartthings hub.

I’ve followed the instructions here - https://www.home-assistant.io/components/smartthings/

I have my token, I’ve got an SSL certificate on my domain @ homeassistant.jonharris.tech, and I believe I’ve added the information to my configuration file properly.

A few things with the SSL - I wasn’t able to do the regular port forward to make the lets encrypt docker work as Cox blocks port 80 inbound traffic which was causing me an issue with that. I followed the tutorial here - https://www.youtube.com/watch?v=AS0HydTEuA4 - to work around that.

Going to https://www.digicert.com/help/ it says I’m unable to connect to my site. Going to https://www.sslshopper.com/ssl-checker.html shows the SSL certificate. So this could be my issue possibly? In which case I’ll check with the Lets Encrypt guys if someone here doesn’t know the answer.

Secondly - here is a copy of my config file. The moment I uncomment the SSL info in the http section HA no longer opens and causes errors in the log file which I’ll also post below. I’ve verified that the files are actually on the server in those directories. I’ve also chmod 755 the live and archive folders as that seemed to be an issue on other people that have the error in my log.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  ssl_certificate: /etc/letsencrypt/live/jonharris.tech/fullchain.pem
  ssl_key: /etc/letsencrypt/live/jonharris.tech/privkey.pem
  base_url: homeassistant.jonharris.tech

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml


Here is the log for when I open HA. Specifically the error that I believe is causing me issues.

2019-07-11 20:25:08 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/etc/letsencrypt/live/jonharris.tech/fullchain.pem'

not a file for dictionary value @ data['http']['ssl_key']. Got '/etc/letsencrypt/live/jonharris.tech/privkey.pem'. (See /config/configuration.yaml, line 6). Please check the docs at https://home-assistant.io/components/http/

Entire log:

2019-07-11 20:25:07 INFO (SyncWorker_0) [homeassistant.loader] Loaded default_config from homeassistant.components.default_config
2019-07-11 20:25:07 INFO (SyncWorker_6) [homeassistant.loader] Loaded http from homeassistant.components.http
2019-07-11 20:25:07 INFO (SyncWorker_6) [homeassistant.loader] Loaded automation from homeassistant.components.automation
2019-07-11 20:25:07 INFO (SyncWorker_8) [homeassistant.loader] Loaded tts from homeassistant.components.tts
2019-07-11 20:25:07 INFO (SyncWorker_9) [homeassistant.loader] Loaded script from homeassistant.components.script
2019-07-11 20:25:07 INFO (SyncWorker_10) [homeassistant.loader] Loaded group from homeassistant.components.group
2019-07-11 20:25:07 INFO (SyncWorker_11) [homeassistant.loader] Loaded hue from homeassistant.components.hue
2019-07-11 20:25:07 INFO (SyncWorker_9) [homeassistant.loader] Loaded met from homeassistant.components.met
2019-07-11 20:25:07 INFO (SyncWorker_13) [homeassistant.loader] Loaded homeassistant from homeassistant.components.homeassistant
2019-07-11 20:25:07 INFO (SyncWorker_13) [homeassistant.loader] Loaded persistent_notification from homeassistant.components.persistent_notification
2019-07-11 20:25:07 INFO (MainThread) [homeassistant.setup] Setting up homeassistant
2019-07-11 20:25:07 INFO (MainThread) [homeassistant.setup] Setup of domain homeassistant took 0.0 seconds.
2019-07-11 20:25:07 INFO (SyncWorker_6) [homeassistant.loader] Loaded webhook from homeassistant.components.webhook
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up persistent_notification
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain persistent_notification took 0.0 seconds.
2019-07-11 20:25:08 INFO (SyncWorker_16) [homeassistant.loader] Loaded cloud from homeassistant.components.cloud
2019-07-11 20:25:08 INFO (SyncWorker_17) [homeassistant.loader] Loaded config from homeassistant.components.config
2019-07-11 20:25:08 INFO (SyncWorker_18) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend
2019-07-11 20:25:08 INFO (SyncWorker_19) [homeassistant.loader] Loaded api from homeassistant.components.api
2019-07-11 20:25:08 INFO (SyncWorker_20) [homeassistant.loader] Loaded auth from homeassistant.components.auth
2019-07-11 20:25:08 INFO (SyncWorker_21) [homeassistant.loader] Loaded lovelace from homeassistant.components.lovelace
2019-07-11 20:25:08 INFO (SyncWorker_11) [homeassistant.loader] Loaded onboarding from homeassistant.components.onboarding
2019-07-11 20:25:08 INFO (SyncWorker_7) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log
2019-07-11 20:25:08 INFO (SyncWorker_24) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api
2019-07-11 20:25:08 INFO (SyncWorker_3) [homeassistant.loader] Loaded history from homeassistant.components.history
2019-07-11 20:25:08 INFO (SyncWorker_15) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder
2019-07-11 20:25:08 INFO (SyncWorker_6) [homeassistant.loader] Loaded logbook from homeassistant.components.logbook
2019-07-11 20:25:08 INFO (SyncWorker_28) [homeassistant.loader] Loaded map from homeassistant.components.map
2019-07-11 20:25:08 INFO (SyncWorker_2) [homeassistant.loader] Loaded mobile_app from homeassistant.components.mobile_app
2019-07-11 20:25:08 INFO (SyncWorker_30) [homeassistant.loader] Loaded person from homeassistant.components.person
2019-07-11 20:25:08 INFO (SyncWorker_18) [homeassistant.loader] Loaded ssdp from homeassistant.components.ssdp
2019-07-11 20:25:08 INFO (SyncWorker_19) [homeassistant.loader] Loaded sun from homeassistant.components.sun
2019-07-11 20:25:08 INFO (SyncWorker_33) [homeassistant.loader] Loaded system_health from homeassistant.components.system_health
2019-07-11 20:25:08 INFO (SyncWorker_10) [homeassistant.loader] Loaded updater from homeassistant.components.updater
2019-07-11 20:25:08 INFO (SyncWorker_22) [homeassistant.loader] Loaded zeroconf from homeassistant.components.zeroconf
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.bootstrap] Setting up {'system_log'}
2019-07-11 20:25:08 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/etc/letsencrypt/live/jonharris.tech/fullchain.pem'

not a file for dictionary value @ data['http']['ssl_key']. Got '/etc/letsencrypt/live/jonharris.tech/privkey.pem'. (See /config/configuration.yaml, line 6). Please check the docs at https://home-assistant.io/components/http/
2019-07-11 20:25:08 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Invalid config.

2019-07-11 20:25:08 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_log. Setup failed for dependencies: http

2019-07-11 20:25:08 ERROR (MainThread) [homeassistant.setup] Setup failed for system_log: Could not set up all dependencies.

2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up recorder
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.8 seconds.
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up updater
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up sun
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds.
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up group
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.0 seconds.
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setting up hue
2019-07-11 20:25:08 INFO (MainThread) [homeassistant.setup] Setup of domain hue took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up met
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain met took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up ssdp
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up person
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up lovelace
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain lovelace took 0.0 seconds.
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_health. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for system_health: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of webhook. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for webhook: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: http

2019-07-11 20:25:09 INFO (SyncWorker_25) [homeassistant.loader] Loaded weather from homeassistant.components.weather
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of config. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of api. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of auth. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for auth: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tts. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not set up all dependencies.

2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up script
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of websocket_api. Setup failed for dependencies: http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not set up all dependencies.

2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up weather
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 0.0 seconds.
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of automation. Setup failed for dependencies: webhook

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for automation: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of cloud. Setup failed for dependencies: http, webhook

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: http, webhook

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.

2019-07-11 20:25:09 INFO (MainThread) [homeassistant.components.weather] Setting up weather.met
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of zeroconf. Setup failed for dependencies: api

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for zeroconf: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: auth, http

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, auth, http, onboarding, system_log, websocket_api

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.

2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain person took 0.0 seconds.
2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: automation, cloud, config, frontend, history, logbook, map, mobile_app, system_health, zeroconf

2019-07-11 20:25:09 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.

2019-07-11 20:25:09 INFO (SyncWorker_1) [homeassistant.loader] Loaded light from homeassistant.components.light
2019-07-11 20:25:09 INFO (SyncWorker_27) [homeassistant.loader] Loaded sensor from homeassistant.components.sensor
2019-07-11 20:25:09 INFO (SyncWorker_15) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up light
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up sensor
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hue
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.hue
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.0 seconds.
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.components.hue.sensor_base] Starting sensor polling loop with 5.0 second interval
2019-07-11 20:25:09 INFO (MainThread) [homeassistant.components.light] Setting up light.hue
2019-07-11 20:25:11 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 3.24s
2019-07-11 20:25:11 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2019-07-11 20:25:11 INFO (MainThread) [homeassistant.core] Timer:starting

Lastly - just in case it’s helpful here is the log of Let’s Encrypt assigning the SSL.

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
Variables set:
PUID=99
PGID=100
TZ=America/Los_Angeles
URL=jonharris.tech
SUBDOMAINS=wildcard
EXTRA_DOMAINS=
ONLY_SUBDOMAINS=true
DHLEVEL=2048
VALIDATION=dns
DNSPLUGIN=cloudflare
EMAIL=****@outlook.com
STAGING=

2048 bit DH parameters present
SUBDOMAINS entered, processing
Wildcard cert for only the subdomains of jonharris.tech will be requested
E-mail address entered: ****@outlook.com
dns validation via cloudflare plugin is selected
Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created
Saving debug log to /var/log/letsencrypt/letsencrypt.log
No match found for cert-path /config/etc/letsencrypt/live/homeassistant.jonharris.tech/fullchain.pem!
Generating new certificate
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator dns-cloudflare, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for jonharris.tech
Unsafe permissions on credentials configuration file: /config/dns-conf/cloudflare.ini
Waiting 10 seconds for DNS changes to propagate
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/jonharris.tech/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/jonharris.tech/privkey.pem
Your cert will expire on 2019-10-09. To obtain a new or tweaked
version of this certificate in the future, simply run certbot

again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

New certificate generated; starting nginx
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)

nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:

no field package.preload['resty.core']
no file './resty/core.lua'
no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core/init.lua'
no file '/usr/share/lua/5.1/resty/core.lua'
no file '/usr/share/lua/5.1/resty/core/init.lua'
no file '/usr/share/lua/common/resty/core.lua'
no file '/usr/share/lua/common/resty/core/init.lua'
no file './resty/core.so'
no file '/usr/local/lib/lua/5.1/resty/core.so'
no file '/usr/lib/lua/5.1/resty/core.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/lib/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so')
Server ready

Thanks in advance.

I think base_url should have https:// at the start. It is a url, not a domain name :slight_smile:

Thanks for the reply nickrout.

I’ve tried the following:

base_url: homeassistant.jonharris.tech
base_url: homeassistant.jonharris.tech:8123
base_url: https://homeassistant.jonharris.tech
base_url: https://homeassistant.jonharris.tech:8123

None work and all crash when the ssl_certicate and ssl_key are uncommented.