AppDaemon runs on Pythnn versions 3.7, 3.8 and 3.9. Installation is either by pip3 or Docker. There is also an officialhass.io build.
For a long time I've been using Ubuntu with Docker for my HomeAssistant setup, but when trying to get that working on my Pi 4 I realized that my regular 'install docker, install portainer and grab hassio' did not work. I could easily just grab the HassOS-image for RPi 4, but I want an OS.
- This tells docker where to store all of the persistent data for a container, which is Home Assistant in our case. It’s this line which keeps the Home Assistant log from being written to the MicroSD card and written to the SSD instead. Second, if you’re running a Pi 3, change the image name to say raspberry pi 3, rather than raspberry pi 4.
- Launching Visual Studio Code. Your codespace will open once ready. There was a problem preparing your codespace, please try again.
- Using Docker on Raspberry Pi 4. In this section, we will show you how to use Docker on your Raspberry Pi 4. If you have never used Docker, this section should help you get started. To run a Docker container, you need a Docker image on which the Docker container will be based.
Note: Windows and Raspbian users should check the environment-specific section at the end of this doc for additional information.
Install and Run using Docker¶
Follow the instructions in the Docker Tutorial
Install Using pip3¶
AppDaemon you will need to install the package:
Do not install this in the same Python virtual environment as Home Assistant. If you do that, then Home Assistant will stop working.
Install Using hass.io¶
The official hass.io addon for AppDaemon is maintained by:
Assuming you have set the config up as described in the tutorial forDocker, you should see the logs output as follows:
Note that for Docker, the error and regular logs are combined.
You can run AppDaemon from the command line as follows:
If all is well, you should see something like the following:
-c is the path to the configuration directory. If not specified,AppDaemon will look for a file named
appdaemon.yaml first in
~/.homeassistant then in
/etc/appdaemon. If the directory is notspecified and it is not found in either location, AppDaemon will raisean exception. In addition, AppDaemon expects to find a dir named
apps immediately subordinate to the config directory.
-d and -p are used by the init file to start the process as a daemon andare not required if running from the command line.
-D can be used to increase the debug level for internal AppDaemonoperations as well as apps using the logging function.
The -s, -i, -t and -e options are for the Time Travel feature and shouldonly be used for testing. They are described in more detail in the APIdocumentation.
Starting At Reboot¶
AppDaemon at reboot, you can set it up to run as a
systemdservice as follows.
Add Systemd Service (firstname.lastname@example.org)¶
First, create a new file using vi:
Add the following, making sure to use the correct full path for yourconfig directory. Also, make sure you edit the
User to a valid userto run AppDaemon, usually the same user as you are running HomeAssistant with is a good choice.
The above should work for hasbian, but if your
homeassistant service isnamed something different you may need to change the
After= lines toreflect the actual name.
Activate Systemd Service¶
Now AppDaemon should be up and running and good to go.
To update AppDaemon after new code has been released, just run thefollowing command to update your copy:
If you are using docker, refer to the steps in the tutorial.
AppDaemon Versioning Strategy¶
AppDaemon uses a simple 3 point versioning strategy of the form x.y.z
- x = Major Version Number
- y = Minor Version Number
- z = Point Version Number
Major versions will be released when very significant changes have been made to the platform, orsizeable new functionality has been added.
Hassio Docker Raspberry Pi 4 Manual
Minor versions will be released when incremental new features have been added, or breaking changes have occured
Point releases will typically contain bugfixes, and package upgrades
Users should be able to expect point release upgrades to be seamless, but should check release notes for breaking changes andnew functionality for minor or major releases.
AppDaemon runs under windows and has been tested with the official 3.8.1release of python. However, there are a couple of caveats:
--daemonizeoption is not supported owing tolimitations in the Windows implementation of Python.
- Some internal diagnostics are disabled. This is not user-visible butmay hamper troubleshooting of internal issues if any crop up
AppDaemon can be installed exactly as per the instructions for everyother version using pip3.
Windows Under the Linux Subsystem¶
Hassio Docker Raspberry Pi 4 Specs
Windows 10 now supports a full Linux bash environment that is capable ofrunning Python. This is essentially an Ubuntu distribution and worksextremely well. It is possible to run AppDaemon in the same wayas for Linux distributions, and none of the above Windows Caveats applyto this version. This is the recommended way to run AppDaemon in aWindows 10 and later environment.
Some users have reported a requirement to install a couple of packagesprior to installing AppDaemon with the pip3 method:
Raspberry Pi Docker¶
Install Hassio Docker Raspberry Pi 4
Since the official Docker image isn’t compatible with Raspberry Pi, you will need to build your own docker imagefrom the downloaded repository.
Hassio Docker Raspberry Pi 4 Download
You can then build and run the docker image locally as follows:
For more information on running AppDaemon under Docker, see the Docker Tutorial. The key difference is thatyou will be running a locally built instance of AppDaemon rather than one from Docker Hub, so for run commands,make sure to specify “appdaemon:latest” as the image, as above, rather than “acockburn/appdaemon:latest” as the tutorial states.
Hassio Docker Raspberry Pi 4 Software
At the time of writing, @torkildr is maintaining a linked Raspberry Pi image here: