I updated the old installation process to be valid for the most recent version of AppDaemon.
I installed AppDaemon v1.5.2 on my RaspberryPi 3 which also runs Home Assistant and tought, why not write it down along the way and share it.
PS: For AppDaemon v.2.0 please also look here for the updated systemd service config.
DISCLAIMER: This has not yet been verified by others. Use at your own risk.
Create an AppDaemon user & group
$ sudo adduser --system appdaemon
$ sudo addgroup appdaemon
Create a directory for AppDaemon
$ sudo mkdir /srv/appdaemon
$ sudo chown appdaemon:appdaemon /srv/appdaemon
Become the new user
$ sudo su -s /bin/bash appdaemon
Set up the virtualenv
$ python3 -m venv /srv/appdaemon
Activate the virtualenv
$ source /srv/appdaemon/bin/activate
Install AppDaemon
(appdaemon)$ pip install appdaemon
Copy and edit the AppDaemon config
$ mkdir ~/.appdaemon
$ mkdir ~/.appdaemon/conf
$ mkdir ~/.appdaemon/apps
$ vi ~/.appdaemon/conf/appdaemon.yaml
appdaemon.yaml
appdaemon:
threads: 10
plugins:
HASS:
type: hass
ha_url: <some_url>
token: <some_long_lived_access_token>
Check the docs for the full configuration documentation.
Add Systemd Service ([email protected])
$ sudo vi /etc/systemd/system/[email protected]
[Unit]
Description=AppDaemon
[email protected]
[email protected]
[Service]
Type=simple
User=%i
ExecStart=/srv/appdaemon/bin/appdaemon -c "/home/%i/.appdaemon/conf/"
[Install]
WantedBy=multi-user.target
Activate Systemd Service
$ sudo systemctl daemon-reload
$ sudo systemctl enable [email protected] --now
Now AppDaemon should be up and running and good to go.