I am trying to setup hadashboard using docker. I get this error:
WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
Here is the docker command (:
docker run --rm -it -p 5050:5050 \
-e HA_URL="http://ha.warllo.org" \
-e HA_KEY="xxxxxxxx" \
-e DASH_URL="http://$HOSTNAME:5050" \
acockburn/appdaemon:latest
I am able to connect via a browser to my homeassistant which is also running in docker on the same host.
Here is the command used to start ha:
docker run -d --name="home-assistant" --restart unless-stopped -v /my-docker/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
I am able to browse to my ha instance using
http://ha.warllo.org
https://ha.warllo.org
http://192.168.2.4:8123
trying to use https://192.168.2.4:8123 generates a ssl error
I have setup letscrypt by using an apache reverse proxy here is the config for that:
<VirtualHost *:80>
ServerName ha.warllo.org
ProxyPreserveHost On
ProxyRequests off
ProxyPass /api/websocket ws://192.168.2.4:8123/api/websocket
ProxyPassReverse /api/websocket ws://192.168.2.4:8123/api/websocket
ProxyPass / http://192.168.2.4:8123/
ProxyPassReverse / http://192.168.2.4:8123/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://192.168.2.4:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://192.168.2.4:8123/$1 [P,L]
</VirtualHost>
Here is the ssl reverse proxy config:
<VirtualHost *:443>
ServerName ha.warllo.org
ProxyPreserveHost On
ProxyRequests off
ProxyPass /api/websocket ws://192.168.2.4:8123/api/websocket
ProxyPassReverse /api/websocket ws://192.168.2.4:8123/api/websocket
ProxyPass / http://192.168.2.4:8123/
ProxyPassReverse / http://192.168.2.4:8123/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://192.168.2.4:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://192.168.2.4:8123/$1 [P,L]
SSLCertificateFile /etc/letsencrypt/live/ha.warllo.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ha.warllo.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
Lastly here is the HA Config:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 0
longitude: 0
# 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: UTC
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Secrets are defined in the file secrets.yaml
# api_password: !secret http_password
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
base_url: ha.warllo.org
api_password: xxxxxxx
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Enables api_key
api:
# Weather prediction
sensor:
- platform: yr
# Text to speech
tts:
- platform: google
# Cloud
cloud:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
Any help or suggestions would be greatly appreciated!