Http configuration not accepted

why is the following http configuration in configuration.yaml not accepted?

auth_providers:
  api_password: myAPIpassword
http:
  ssl_certificate: /home/homeassistant/dehydrated/certs/myhome.duckdns.org/fullchain.pem
  ssl_key: /home/homeassistant/dehydrated/certs/myhome.duckdns.org/privkey.pem
  base_url: myhome.duckdns.org:8123

following error in the log file :

2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.loader] Unable to find component auth_providers
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/home/homeassistant/dehydrated/cert$
not a file for dictionary value @ data['http']['ssl_key']. Got '/home/homeassistant/dehydrated/certs/tientjesstraat.duckdns.org/privkey.pem'. (See /home/homeassistant/.homeassistant/configuration.$
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Invalid config.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_log. Setup failed for dependencies: http
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for system_log: Could not set up all dependencies.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of api. Setup failed for dependencies: http
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not set up all dependencies.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of websocket_api. Setup failed for dependencies: http
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not set up all dependencies.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of auth. Setup failed for dependencies: http
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for auth: Could not set up all dependencies.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: auth, http
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, websocket_api, http, system_log, auth, onboarding
2019-04-07 11:22:17 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.loader] Unable to find component auth_providers
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for auth_providers: Component not found.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of zeroconf. Setup failed for dependencies: api
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for zeroconf: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tts. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of cloud. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of webhook. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for webhook: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of conversation. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for conversation: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of google_assistant. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for google_assistant: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of config. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_health. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for system_health: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of media_player. Setup failed for dependencies: http
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for media_player: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: http, webhook
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: cloud, config, conversation, frontend, history, logbook$
2019-04-07 11:22:18 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.

does it matter where “http:” is placed inside configuration.yaml?

It is complaining about the path to your certificate. Are you sure the file is there?

if your code is actually entered into your configuration.yaml file like then that’s why you are getting errors.

auth_providers: needs to be under the homeassistant: section.

homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        #- 127.0.0.1
        - 192.168.1.0/24
        - 172.17.0.0/24

http:
  ssl_certificate: /home/homeassistant/dehydrated/certs/xxxxxxxx.duckdns.org/fullchain.pem
  ssl_key: /home/homeassistant/dehydrated/certs/xxxxxxxxxxxx.duckdns.org/privkey.pem
  base_url: xxxxxxxxxxxx.duckdns.org:8123

you probably ought to remove your dns domain name from your post too.

1 Like

ok, found alot of errors in my configuration.yaml indeed

still get following error now :

2019-04-07 19:41:50 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: file not readable for dictionary value @ data['http']['ssl_certificate']. Got '/home/steven/dehydrated/certs/xxxxxxxx.duckdns.org/fullchain.p$

file not readable for dictionary value @ data[‘http’][‘ssl_key’]. Got ‘/home/steven/dehydrated/certs/xxxxxxxx.duckdns.org/privkey.pem’. (See /home/homeassistant/.homeassistant/configuration.yaml, line 38). Please check the docs at$
2019-04-07 19:41:50 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Invalid config.
2019-04-07 19:41:50 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_log. Setup failed for dependencies: http
2019-04-07 19:41:50 ERROR (MainThread) [homeassistant.setup] Setup failed for system_log: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of api. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of websocket_api. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of auth. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for auth: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: auth, http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, websocket_api, http, system_log, auth, onboarding
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of cloud. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of webhook. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for webhook: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tts. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_health. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for system_health: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of config. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of google_assistant. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for google_assistant: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of zeroconf. Setup failed for dependencies: api
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for zeroconf: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of conversation. Setup failed for dependencies: http
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for conversation: Could not set up all dependencies.
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2019-04-07 19:41:51 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of media_player. Setup failed for dependencies: http
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Setup failed for media_player: Could not set up all dependencies.
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: http, webhook
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: cloud, config, conversation, frontend, history, logbook, mobile_app, system_health, zeroconf
2019-04-07 19:41:52 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.

the files are definitely there because if I run the following command its shows me the file :slight_smile:

 sudo nano /home/steven/dehydrated/certs/xxxxxxxx.duckdns.org/privkey.pem 

this is the first part of my configuration.yaml :

homeassistant:

  # Name of the location where Home Assistant is running
  name: Home

  # Location required to calculate the time the sun rises and sets
  latitude: 50.85
  longitude: 3.3

  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0

  # metric for Metric, imperial for Imperial
  unit_system: metric

  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Brussels

  # Customization file
  customize: !include customize.yaml

  # authentication providers
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.0.0/24
    - type: legacy_api_password
      api_password: myAPIpassword

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

# Show the introduction message on startup.
# introduction:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  ssl_certificate: /home/steven/dehydrated/certs/xxxxxxxx.duckdns.org/fullchain.pem
  ssl_key: /home/steven/dehydrated/certs/xxxxxxxx.duckdns.org/privkey.pem
  base_url: xxxxxxxx.duckdns.org:8123

# Discover some devices automatically
discovery:

Are you doing that as the homeassistant user? Perhaps there are file or directory permission issues,

ok, it seems that it was indeed something to do with directory permissions

I moved the dehydrated/certs directory to the homeassistant direcory and changed all the directories and files in it with ‘chmod 755’

now I only get these 2 warnings :

2019-04-07 20:13:20 WARNING (MainThread) [homeassistant.components.http.auth] legacy_api_password support has been enabled.
2019-04-07 20:18:53 WARNING (Thread-8) [plexapi] BadRequest (401) unauthorized http://192.168.0.184:32400/; <html><head><script>window.location = window.location.href.match(/(^.+\/)[^\/]*$/)[1] + 'web/index.html';</script><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>

but my home assistant doesn’t show up in my browser now :frowning:

edit :

since I was trying to setup a https connection I followed the instructions on this link :slight_smile:

https://www.splitbrain.org/blog/2017-08/10-homeassistant_duckdns_letsencrypt

now I can only access my home assistant with https instead of http, so this means it works and this case is closed :smiley:

For anyone running raspbian and dev install, check your permissions on the /etc/letsencrypt/live and /etc/letsencrypt/archive olders.

Letsencrypt installed under root, and hass runs as the pi user.