For anyone else using AppDaemon and docker-compose, the current docker-compose looks like this:
# docker-compose.yaml
version: '3.8'
services:
appdaemon:
container_name: appdaemon
image: acockburn/appdaemon:latest
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/homeassistant/config/appdaemon:/conf # Set which local directory will contain all your app daemon configuration
ports:
- "${PORT_APP_DAEMON}:${PORT_APP_DAEMON}"
environment:
- TZ=${TZ}
- HA_URL=http://${HA_IP}:${PORT_HA}
- HA_TOKEN=${HA_APPDAEMON_KEY}
- DASH_URL=http://${HA_IP}:${PORT_APP_DAEMON}
depends_on:
- homeassistant
labels:
autoheal: "true"
# this section is completely optional
healthcheck:
test: curl -fSs http://127.0.0.1:${PORT_APP_DAEMON} || exit 1
start_period: 90s
timeout: 10s
interval: 5s
retries: 3
All the following variables live in a .env file:
-
PORT_APP_DAEMON→ default:5050 -
TZ→ example:Europe/Berlin -
HA_IP→ IP address to your Home Assistant instance -
PORT_HA→ default:8123 -
HA_APPDAEMON_KEY→ generate a Long Lived Access Token in Home Assistant
And then, you need to edit (as mentioned by @DobriyS) the /opt/homeassistant/config/appdaemon/appdaemon.yaml file to make sure the Long Lived Access Token is added there too as well as the Home Assistant IP address:
# appdaemon.yaml
appdaemon:
time_zone: CET
latitude: 51.725
longitude: 14.3434
elevation: 0
time_zone: Europe/Berlin
plugins:
HASS:
type: hass
ha_url: <HA_IP>:<PORT_HA>
token: <HA_APPDAEMON_KEY>
cert_verify: True
http:
url: <HOST_IP>:<PORT_APP_DAEMON>
admin:
api:
hadashboard: