Hey all,
Recently moved from HA & Supervisor to a more purely docker environment (individual containers vs addons) and am having a little trouble with AD via docker-compose.
Reading the docs it says it needs to be cloned, edited and built from a Dockerfile for the Pi3.
Then at the bottom it says there is also a maintained RPi3 version in the Hub.
I thought that I could add this hub into a compose to have it download, build and run as a container:
https://hastebin.com/ozehamiluf.rb
This seemed to work, container was running but I received an error:
https://hastebin.com/zukelihoju.sql
So I created /home/pi/docker/config/appdaemon/appdaemon.yaml but received another error:
https://hastebin.com/awocenufij.sql
Reading the docs again it seems like AD should populate the directory automatically which then allows me to edit the config.
It feels like the container is built correctly but something else is wrong.
I’m yet to dive into the Dockerfile world yet and am just trying to keep it as simple as possible for the time being until I can get round to learning it.
Am I doing things wrong here? If it cant be done this way then Ill leave it for now.
TIA
I eventually got this up and running.
I gave up on the precompiled container through compose and looked at the Dockerfile.
The official docs were a little wrong in regards to the editing of the Dockerfile, I found a merged pr in the git regarding it. It now doesnt need editing and you can use the one directly in the repo.
version: '3'
services:
appdaemon:
container_name: appdaemon
build: ./appdaemon-rpi3
image: test/appdaemon-rpi3
environment:
- TZ=Europe/London
ports:
- 5050:5050
volumes:
- /home/pi/docker/config/homeassistant/appdaemon:/conf
restart: unless-stopped
- Initially I passed through the environmentals using the compose file (HA_URL etc) when testing but once working I removed them and used appdaemon.yaml)
- Volume was different during testing as well, went to a local, non-HA folder
git cloned to a dir, then ran docker-compose up --build
Took a while on the Pi3 (Buster) but built successfully.
docker-compse up
and it came up with errors about longitude/lattitude etc and exited. It created all the files I was expecting with no issue except permissions (sudo chown -R pi:pi
did the trick)
Filled in appdaemon.yaml
, created `secrets.yam`` and restarted.
secrets: /conf/secrets.yaml
appdaemon:
threads: 10
disable_apps: 1
longitude: !secret longitude
latitude: !secret latitude
elevation: !secret elevation
time_zone: !secret time_zone
plugins:
HASS:
type: hass
ha_url: !secret ha_url
token: !secret token
http:
url: !secret url
hadashboard:
logs:
main_log:
filename: /conf/logs/appdaemon.log
error_log:
filename: /conf/logs/error.log
access_log:
filename: /conf/logs/access.log
diag_log:
filename: /conf/logs/diag.log
(The format for the logs were wrong in the main docs but I found the correct format for them in the Dev docs)
This bit I had to guess at not knowing a lot about AD outside of the HASSIO addon and also having never used the addon…
HACS downloads to {homeassitantroot}/appdaemon/apps
so I re pointed my AD volume to point to that = /home/pi/docker/config/homeassistant/appdaemon:/conf
So far so good. I’ve only tried one plugin so far but it seems to be working fine.
If anyone can spot anything that I could be doing better or if I’ve made a total pigs-ear of it Im more than happy to hear it