Hmm, I dislike the trend for every project to have its own OS. If you want to run more than one project with its own OS you have to decide … right? So I decided to ditch that and rather run them on my own… makes life easier in most cases — just not in this.
You chose one of the advanced installation methods that is normally used by users who are already familiar with the technique of installing and maintaining python applications in a virtual environment.
Go with docker i.e. on an ubuntu OS…
Update is totally easy in such an environment.
just
docker-compose pull homeassistant
docker-compose stop homeassistant
docker-compose up -d homeassistant
is there a supervisor? I feel like my HA is missing like all the good features but maybe that‘s only a feeling.
Cmdline says I‘m on 2022.3. Website says it‘s Home Assistant 2021.3.2 … weird, right?
pip3 install --upgrade homeassistantLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: homeassistant in /srv/homeassistant/lib/python3.9/site-packages (2022.3.6)
Requirement already satisfied: jinja2==3.0.3 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (3.0.3)
Requirement already satisfied: PyJWT==2.1.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.1.0)
Requirement already satisfied: cryptography==35.0.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (35.0.0)
Requirement already satisfied: typing-extensions<5.0,>=3.10.0.2 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (4.1.1)
Requirement already satisfied: awesomeversion==22.2.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (22.2.0)
Requirement already satisfied: httpx==0.21.3 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (0.21.3)
Requirement already satisfied: atomicwrites==1.4.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (1.4.0)
Requirement already satisfied: voluptuous-serialize==2.5.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.5.0)
Requirement already satisfied: requests==2.27.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.27.1)
Requirement already satisfied: certifi>=2021.5.30 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2021.10.8)
Requirement already satisfied: pyyaml==6.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (6.0)
Requirement already satisfied: yarl==1.7.2 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (1.7.2)
Requirement already satisfied: ciso8601==2.2.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.2.0)
Requirement already satisfied: bcrypt==3.1.7 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (3.1.7)
Requirement already satisfied: python-slugify==4.0.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (4.0.1)
Requirement already satisfied: attrs==21.2.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (21.2.0)
Requirement already satisfied: astral==2.2 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.2)
Requirement already satisfied: pip<22.1,>=21.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (22.0.4)
Requirement already satisfied: aiohttp==3.8.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (3.8.1)
Requirement already satisfied: ifaddr==0.1.7 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (0.1.7)
Requirement already satisfied: async-timeout==4.0.2 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (4.0.2)
Requirement already satisfied: voluptuous==0.12.2 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (0.12.2)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /srv/homeassistant/lib/python3.9/site-packages (from aiohttp==3.8.1->homeassistant) (2.0.12)
Requirement already satisfied: frozenlist>=1.1.1 in /srv/homeassistant/lib/python3.9/site-packages (from aiohttp==3.8.1->homeassistant) (1.3.0)
Requirement already satisfied: aiosignal>=1.1.2 in /srv/homeassistant/lib/python3.9/site-packages (from aiohttp==3.8.1->homeassistant) (1.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /srv/homeassistant/lib/python3.9/site-packages (from aiohttp==3.8.1->homeassistant) (5.1.0)
Requirement already satisfied: pytz in /srv/homeassistant/lib/python3.9/site-packages (from astral==2.2->homeassistant) (2021.1)
Requirement already satisfied: six>=1.4.1 in /srv/homeassistant/lib/python3.9/site-packages (from bcrypt==3.1.7->homeassistant) (1.15.0)
Requirement already satisfied: cffi>=1.1 in /srv/homeassistant/lib/python3.9/site-packages (from bcrypt==3.1.7->homeassistant) (1.14.5)
Requirement already satisfied: sniffio in /srv/homeassistant/lib/python3.9/site-packages (from httpx==0.21.3->homeassistant) (1.2.0)
Requirement already satisfied: httpcore<0.15.0,>=0.14.0 in /srv/homeassistant/lib/python3.9/site-packages (from httpx==0.21.3->homeassistant) (0.14.7)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in /srv/homeassistant/lib/python3.9/site-packages (from httpx==0.21.3->homeassistant) (1.4.0)
Requirement already satisfied: MarkupSafe>=2.0 in /srv/homeassistant/lib/python3.9/site-packages (from jinja2==3.0.3->homeassistant) (2.1.1)
Requirement already satisfied: text-unidecode>=1.3 in /srv/homeassistant/lib/python3.9/site-packages (from python-slugify==4.0.1->homeassistant) (1.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /srv/homeassistant/lib/python3.9/site-packages (from requests==2.27.1->homeassistant) (1.26.3)
Requirement already satisfied: idna<4,>=2.5 in /srv/homeassistant/lib/python3.9/site-packages (from requests==2.27.1->homeassistant) (2.10)
Requirement already satisfied: pycparser in /srv/homeassistant/lib/python3.9/site-packages (from cffi>=1.1->bcrypt==3.1.7->homeassistant) (2.20)
Requirement already satisfied: anyio==3.* in /srv/homeassistant/lib/python3.9/site-packages (from httpcore<0.15.0,>=0.14.0->httpx==0.21.3->homeassistant) (3.5.0)
Requirement already satisfied: h11<0.13,>=0.11 in /srv/homeassistant/lib/python3.9/site-packages (from httpcore<0.15.0,>=0.14.0->httpx==0.21.3->homeassistant) (0.12.0)
You can run HA Supervised on your own OS but it’s usually not recommended because there are potential pitfalls (unsupported or unhealthy system that prevents you from ever updating).
if you want to run your own OS then the only real viable option (aside from what you already have) is to run HA Container. But again you won’t have the Supervisor.
I run HA Container (with no Supervisor) and I don’t feel I’m missing anything at all. I still have my own OS and I just handle all of the HA stuff myself. And updates in Docker are a breeze.
hmm… my screenshot says I‘m running container as well? Container = docker? …edit… oh last line… says docker yes … so basically I‘m running HA twice! Great!! Haha… oh jeez… can‘t get more confusing at this point.
not so easy as it reads
sudo docker-compose pull homeassistant
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
well, yes it does. So you already have my recommended way of running HA.
yes.
I also recommend you run an app (in Docker) called Portainer.
it simplifies a lot of the maintenance you need to do.
But Docker by itself is sufficient.
Portainer? Aha…? Sounds good! I will do my research!
New to docker? - Basic knowledge of docker and docker compose is useful.
You need a docker-compose.yaml
-file with some definitions. Can share mine, but as I wrote - some minimal knowledge…
version: '3.8'
services:
##################################################
# Homeassistant
##################################################
homeassistant:
container_name: homeassistant
image: homeassistant/raspberrypi4-homeassistant:stable
depends_on:
- HA-mariadb
deploy:
resources:
limits:
memory: 2048M
volumes:
- /home/hajo/docker-volumes/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
expose:
- "8123"
ports:
- "8123:8123"
restart: unless-stopped
network_mode: host
##################################################
# Homeassistant - Datenbank
##################################################
HA-mariadb:
image: mariadb
container_name: HA-mariadb
restart: unless-stopped
volumes:
- /home/hajo/docker-volumes/homeassistant-mariadb:/var/lib/mysql
#- /tmp/mariadb:/var/lib/mysql
environment:
TZ: Europe/Berlin
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_DATABASE: ${MYSQL_DATABASE}
ports:
- 3306:3306
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$MYSQL_ROOT_PASSWORD || exit 1
interval: 30s
timeout: 5s
retries: 5
The docker-compose
command needs to be run from the dir, where the docker-compose.yaml
is stored…
haha… yeah… I thought venv were quite complicated (to remember how to get in there)… since I‘m running HA in docker I guess I only need to find / remember the correct folder hidden somewhere with that file? (/srv/homeassistant I suppose? But I have no clue what to do with your compose.yaml… 100 things I wouldn‘t know … mariadb password?! no clue, man!)
I have to say… I want to switch back to venv - way easier!
ah… /docker/ is the path for my yaml … good to have a better memory called bash_history
Okay… I ran all those three commands successfully! But now no webGUI anymore … hmm … do I have to do anything else?
docker-compose logs --tail 100 -f homeassistant
Attaching to home-assistant
home-assistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
home-assistant | [s6-init] ensuring user provided files have correct perms...exited 0.
home-assistant | [fix-attrs.d] applying ownership & permissions fixes...
home-assistant | [fix-attrs.d] done.
home-assistant | [cont-init.d] executing container initialization scripts...
home-assistant | [cont-init.d] done.
home-assistant | [services.d] starting services
home-assistant | [services.d] done.
home-assistant | Fatal Python error: init_interp_main: can't initialize time
home-assistant | Python runtime state: core initialized
home-assistant | PermissionError: [Errno 1] Operation not permitted
home-assistant |
home-assistant | Current thread 0x76f09020 (most recent call first):
home-assistant | <no Python frame>
home-assistant | [finish] process exit code 1
home-assistant | [cont-finish.d] executing container finish scripts...
home-assistant | [cont-finish.d] done.
home-assistant | [s6-finish] waiting for services.
home-assistant | [s6-finish] sending all processes the TERM signal.
home-assistant | [s6-finish] sending all processes the KILL signal and exiting.
home-assistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
home-assistant | [s6-init] ensuring user provided files have correct perms...exited 0.
home-assistant | [fix-attrs.d] applying ownership & permissions fixes...
home-assistant | [fix-attrs.d] done.
home-assistant | [cont-init.d] executing container initialization scripts...
home-assistant | [cont-init.d] done.
home-assistant | [services.d] starting services
home-assistant | [services.d] done.
home-assistant | Fatal Python error: init_interp_main: can't initialize time
home-assistant | Python runtime state: core initialized
home-assistant | PermissionError: [Errno 1] Operation not permitted
home-assistant |
home-assistant | Current thread 0x76f0b020 (most recent call first):
home-assistant | <no Python frame>
home-assistant | [finish] process exit code 1
home-assistant | [cont-finish.d] executing container finish scripts...
home-assistant | [cont-finish.d] done.
home-assistant | [s6-finish] waiting for services.
home-assistant | [s6-finish] sending all processes the TERM signal.
home-assistant | [s6-finish] sending all processes the KILL signal and exiting.
home-assistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
home-assistant | [s6-init] ensuring user provided files have correct perms...exited 0.
home-assistant | [fix-attrs.d] applying ownership & permissions fixes...
home-assistant | [fix-attrs.d] done.
home-assistant | [cont-init.d] executing container initialization scripts...
home-assistant | [cont-init.d] done.
home-assistant | [services.d] starting services
home-assistant | [services.d] done.
home-assistant | Fatal Python error: init_interp_main: can't initialize time
home-assistant | Python runtime state: core initialized
home-assistant | PermissionError: [Errno 1] Operation not permitted
home-assistant |
home-assistant | Current thread 0x76f22020 (most recent call first):
home-assistant | <no Python frame>
home-assistant | [finish] process exit code 1
home-assistant | [cont-finish.d] executing container finish scripts...
home-assistant | [cont-finish.d] done.
home-assistant | [s6-finish] waiting for services.
home-assistant | [s6-finish] sending all processes the TERM signal.
home-assistant | [s6-finish] sending all processes the KILL signal and exiting.
home-assistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
home-assistant | [s6-init] ensuring user provided files have correct perms...exited 0.
home-assistant | [fix-attrs.d] applying ownership & permissions fixes...
home-assistant | [fix-attrs.d] done.
home-assistant | [cont-init.d] executing container initialization scripts...
home-assistant | [cont-init.d] done.
home-assistant | [services.d] starting services
home-assistant | [services.d] done.
home-assistant | Fatal Python error: init_interp_main: can't initialize time
home-assistant | Python runtime state: core initialized
home-assistant | PermissionError: [Errno 1] Operation not permitted
home-assistant |
home-assistant | Current thread 0x76f88020 (most recent call first):
home-assistant | <no Python frame>
home-assistant | [finish] process exit code 1
home-assistant | [cont-finish.d] executing container finish scripts...
home-assistant | [cont-finish.d] done.
home-assistant | [s6-finish] waiting for services.
home-assistant | [s6-finish] sending all processes the TERM signal.
home-assistant | [s6-finish] sending all processes the KILL signal and exiting.
home-assistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
home-assistant | [s6-init] ensuring user provided files have correct perms...exited 0.
home-assistant | [fix-attrs.d] applying ownership & permissions fixes...
home-assistant | [fix-attrs.d] done.
home-assistant | [cont-init.d] executing container initialization scripts...
home-assistant | [cont-init.d] done.
home-assistant | [services.d] starting services
home-assistant | [services.d] done.
home-assistant | Fatal Python error: init_interp_main: can't initialize time
home-assistant | Python runtime state: core initialized
home-assistant | PermissionError: [Errno 1] Operation not permitted
home-assistant |
home-assistant | Current thread 0x76fcd020 (most recent call first):
home-assistant | <no Python frame>
home-assistant | [finish] process exit code 1
home-assistant | [cont-finish.d] executing container finish scripts...
home-assistant | [cont-finish.d] done.
home-assistant | [s6-finish] waiting for services.
home-assistant | [s6-finish] sending all processes the TERM signal.
home-assistant | [s6-finish] sending all processes the KILL signal and exiting.
home-assistant exited with code 1
using docker --version
Docker version 20.10.5, build 55c4c88
…can‘t make any new postings because I‘m new to this forum.
Trying sudo apt upgrade now and hope it‘ll fix it.
Edit 2:
It now works …after updating manually this libseccomp2. What a ride!
Slow down. In the space of 2 hours you have changed install methods, updated versions, set up docker-compose. Slow down.
The docker commands to setup and update ha via docker are here
Now that is a raspberry pi page, and we don’t know your setup, but the commands are the same on any platform running Docker and using the container installation method.
Slow down, and if a problem arises, ask. Don’t go further down a rabbit hole with commands you don’t understand.
By the way this means that the config is stored in /home/hajo/docker-volumes/homesssistant
on your OS, and that is mapped into /config
in your ha container.
If you don’t understand that, it means all your configuration files are in /home/hajo/docker-volumes/homesssistant
and are edited there.
I have still no idea why my config works — I uncommented a few things but they still work. It‘s not even mentioned in the doc…
Thanks everyone for helping me so far! Actually I haven‘t switched too much — the reason for the update fail was an undocumented dependency that was out of date by the way … super confusing (libsecomp2).
The need for libseccomp is documented, although what exactly you are referring to is a mystery, because the post you pointed relates to installing docker.
Prerequisites
This guide assumes that you already have an operating system setup and a container runtime installed (like Docker).
If you are using Docker then you need to be on at least version 19.03.9, ideally an even higher version, and
libseccomp
2.42 or newer.
I believe for nubie who never used docker will be a nightmare, however once you get the hang of it Docker will bring you joy. No more setting dependency, no more OS, no more many other things. So my suggestion is to learn docker.
Better yet to start using Debian Bullseye since HA recommended. The combination between Debian + Docker will help you in the long run. Should you need UI/UX for handling Docker then you can install portainer which again something unnecessary but another joy for Docker on Linux (Windows or mac user already have their dashboard)
With Docker setup upgrade, downgrade, and adding many applications is a brezze and you will enjoy it more. Also you are in control. In my case I started from using the HA OS, move to Docker, and then move to Supervised version + with Proxmox (my current setup)
Anyway welcome and prepare to begin the wonderfull world of Home-Assistant
Actually debian bullseye has nothing to do with running container. debian bullseye is the only supported OS for running supervised, but running container doesn’t seem to have any recommendations as to OS.
Unless I missed something.