Home Assistant as one of several services

Hi there,

I am planning to install home assistant on my Raspberry Pi 4 (4GB). Besides home assistant more services should be running on the same device:

  • home assistant (especially for homematic IP)
  • pi hole (DNS blocker)
  • homebridge (HomeKit)
  • awtrix server (like LaMetric time)
  • NodeRED

I hope, running these on this RPi4 should be no problem.

At the moment my idea is to flash Raspbian Buster to a SD card, then updating it. Afterwards I would install one service after another. I really do not know how to use The VM-like Docker, if using docker would be a better idea. But, I think, Docker uses more resources and is more complex to maintain besides my job.

What would you prefer?

Docker is actually less complex than you think. You keep your base/host OS clean, and run all your services in Docker containers. It uses no more resources than running the services directly on the OS, since docker containers are NOT VMs.

Docker is the perfect answer for this.

1 Like

Okay, is there a tutorial for beginners on how to install and manage containers in docker on a Raspberry Pi 4? Hass.io is based on images before Raspberry 4, isn‘t it?
I would download the container for hass.io and running it on the RPi 4. Then I have to use containers for every service? Or is there still the possibility for running the other services without docker on the same device?

At the moment I really do not understand the advantage of running containers compared to running all services on the same device without docker.

Easier maintenance.

I have two instances of Home Assistant. One machine has Home Assistant installed as a venv (python virtual environment) the other machine has it installed as a docker container. Upgrading the venv version isn’t difficult but requires far more steps than the docker version (which makes upgrading trivial).

I can even have multiple versions of Home Assistant (each one in a separate container) and simple switch between them. That’s handy if you discover the latest version causes you problems and you want to revert to the previous one. This is a trivial procedure with docker.

FWIW, I’m using docker-compose which uses a YAML configuration file to control the operation of all docker containers.

Forget that it’s a Pi. It runs Linux. Docker is easily manageable via tools like Portainer.

Hassio is running in docker no matter how you look at it, or what it is running on.

Hassio is a bit different. You don’t run hassio like you do other images. Hassio actually consists of 2 docker containers (a supervisor and a home assistant image). If you want to run hassio on docker (not the sdcard HassOS image), you need to use the script or know how to configure your system like the script does.

you don’t HAVE to, but it makes things easier for sure.

Of course. It’s just a Linux box. Docker is basically just an app running on the device. You can run whatever apps you like alongside it.

Quite simply put, SEGREGATION OF DEPENDENCIES. It is MUCH MUCH easier to manage docker than it is the individual apps.

Think about all those apps, and how they each have their OWN method of installation, and upgrade paths. They each have their own dependencies. What happens when one of those apps switches to a different version of a library (say 2.0), that another app relies on version 1.7? What happens when an update/upgrade gets screwed up, and you have to reload your system? You now have to go back and install all those apps again. How long will that take you? With Docker, you save your files out, reload the machine and Docker, put the files back, and with a single command, all your services are running again.

Thanks for your replies… so, now I would install Raspbian Buster latest version on my RPi 4(!) and install docker on top of it - that´s how I understood it.

I was looking for an official home assistant docker container - marked as “official image” - but did not find it.

All I want at the moment is to run Home Assistant with the HASS-Panel. It does no matter if the HA-version is not compatible with RPi4 right now, because the underlying Raspbian Buster controls all those hardware stuff ?

You’re confusing HassOS with Home Assistant. Home assistant is the application…

Okay, 2 days ago I installed HA to a Rapsbian Buster manually. But, the hass panel (?) was missing for installing plugins etc easily.

I formatted and flashed a new Buster Lite. Now I wanted to install docker, but it tells me:

[email protected]:~ $ sudo curl -fsSL https://test.docker.com -o test-docker.sh
[email protected]:~ $ sudo sh test-docker.sh
# Executing docker install script, commit: 2f4ae48
+ sh -c apt-get update -qq >/dev/null
E: Das Depot »https://download.docker.com/linux/raspbian 10 Release« enthält keine Release-Datei.

It is not this easy to install docker (CE) to a Raspbian Buster using a script, I think.

Currently I am trying to solve this problem - did not succeed yet.

Later I am planning to install HA on a Docker container, but don´t know how to install it together with the HASS panel.

You’re confusing things here.

Hassio is hassio. If you are running the normal home assistant docker container, you are not running hassio, and you will not have a hassio menu or add-ons. These are different methods of running Home Assistant.

If you want the HASSIO panel, you have to install HASSIO. HASS is often used as a shortened version of HOME ASSISTANT which is the application. HASSIO is ONE METHOD of running Home Assistant. The terminology is very important to understand and differentiate.

I understand, now.

So, you told me Docker is able to run applications. Does Docker offer the ability to run HASSIO ? Or, is it possible to run Home Assistant (not HaSSIO) in a Docker container AND installing the HASSIO panel? I want to get the panel.

And, I was not able to install Docker on Raspbian Buster (see error message above).

You can do a generic Linux install of Hass.io once you have installed Docker. The Hass.io IMAGES on here also contain the HassOS but you can just do a generic install of Hass.io and get the side panel. So install Debian/Ubuntu Buster and then install Buster and then the Hass.io requirements and then run the script.

But, I tried to describe: I did not find a way to install Docker under Raspbian Buster.

Raspbian Buster has to be the base OS for RPi4 - in my case.

There are workarounds.

If you want hassio panel, you have to install hassio. You can’t install home assistant and add hassio panel to it. Install hassio.

The installation page literally walks you through it.

Any particular reason to run homebridge? HA’s HomeKit integration really does everything for me. Your setup looks pretty much like mine: I have HA, Pi hole, mosquito (MQTT broker), zigbee2mqtt. All in docker and all managed by docker-compose. Really super easy to manage.

I need homebridge for bridging my Homematic devices into HomeKit…
I do not know if the HA´s homematic IP plugin is able to bridge these devices into homekit.

Besides Homematic, homebridge also bridges netatmo, Dyson and tradfri (controlled by a Philips hue bridge) into HomeKit.

Seems as I’m missing something :slight_smile: homematic, dyson, Phillips hue etc can be “natively” integrated into Home Assistant, then there is “native” HomeKit component that does exactly what homebridge does - exposes Home Assistant known devices into HomeKit which allows them to be controlled from Apple devices. You might not even need homebridge after all (that should simplify your configuration). But again, I might be missing something.

Sounds very great… so, all I need is a solution for installing Docker on Raspbian Buster and installing HassOS… great news.

Is there a way to exclude devices from HomeKit?

I am planning to use a HA hue plugin. Perhaps, HA would integrate this into HomeKit despite it already is offered by the HomeKit-ready hue bridge.

No. HassOS is a different operating system. You don’t install HassOS on top of Raspbian.

Follow the link I already provided you…read…and implement the fix to install docker-ce, then install the prerequisites, then run the hassio install script.