Home Assistant Installation on an Olimex A64 ?

Started by winfried, August 20, 2022, 11:13:36 PM

Previous topic - Next topic

winfried

Since I have a spare A64, I wanted to install Home Assistant with addons:

Since I want to use addons, I looked in the table

- https://www.home-assistant.io/installation/#compare-installation-methods

Since of recommended resources using virtual machines:
- https://www.home-assistant.io/installation/linux#create-the-virtual-machine
2GB RAM, this is also not an option.

Only the methods OS and supervised are left:

Did anybody build a Home Assistant OS - Image for Olimex A64 ?

Has any experience with "supervised" installation ?

- https://github.com/home-assistant/supervised-installer

As a Request for Comments, any hint could be helpful for a decision or a write-up.

In a first try everything worked , except one question could not be answered straight away:
choosing the supported machine:

Supported Machine types
    generic-x86-64
    odroid-c2
    odroid-n2
    odroid-xu
    qemuarm
    qemuarm-64
    qemux86
    qemux86-64
    raspberrypi
    raspberrypi2
    raspberrypi3
    raspberrypi4
    raspberrypi3-64
    raspberrypi4-64
    tinker
    khadas-vim3

Which one is the nearest match ?

mfg winfried
---- Atelier Algorythmics --- [url="http://algo.mur.at/"]http://algo.mur.at/[/url] ----

PeteW

#1
I have done it for A20-OLinuXino-MICRO. Here are step by step instructions I used. You may have to change some steps to match A64

Change hostname to homeassistant
You may have to change a20-olinuxino to a64-olinuxino
hostnamectl set-hostname homeassistant
sed -i 's/a20-olinuxino/homeassistant/g' /etc/hosts


Install mDNS
apt-get install avahi-daemon avahi-discover libnss-mdns -y
Reboot

Install pre-requisites
apt-get install jq wget curl udisks2 libglib2.0-bin network-manager apparmor dbus -y
Install Docker-CE
curl -fsSL get.docker.com | sh
Install the OS-Agent

Download linux_armv7.deb image from https://github.com/home-assistant/os-agent/releases/latest
You have to change linux_arm7 to desired image for a64
You may have to test different images to find one that works

wget https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_armv7.deb
dpkg -i os-agent_1.2.2_linux_armv7.deb

Test if OS-Agent installation was successful
gdbus introspect --system --dest io.hass.os --object-path /io/hass/os
Install the Home Assisistant Supervised Debian Package

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb

Check with top when process dockerd and python3 has done initialization (no CPU load)

Addons installation (optional)

Install Let's Encrypt addon
ha addons install core_letsencrypt
Install NginX SSL proxy
ha addons install core_nginx_proxy

winfried

Thanks very much !

Just followed your write_up for a64 and it worked.

Just a question configuring: dpkg -i homeassistant-supervised.deb

When selecting from a list of machines (see first post),
choose for Olimex A64: raspberrypi4-64
      or should I use raspberrypi3-64 ?

Anyhow did not get any error until now.

The mentioned addons seems to be useful for my server behind a firewall, have to try them.
Also installed core_mosquitto for my tasmota devices.

mfg winfried
---- Atelier Algorythmics --- [url="http://algo.mur.at/"]http://algo.mur.at/[/url] ----

PeteW

#3
Look at https://github.com/home-assistant/supervised-installer/blob/main/homeassistant-supervised/DEBIAN/postinst

The image used for HA Supervisor depends on result of command
uname -m
In our case aarch64.

Result of what you selected from dialog is stored in config file /etc/hassio.json as "machine". I don't know how it is used later in Home Assistant.

Anyway, if we compare A64-OLinuXino with Raspberry Pi, and if your A64 is with 1G of RAM it seems more appropriate to choose raspberrypi3-64.

Just my $0.02  ;)

PeteW

#4
When I looked more carefully at options in your first post... you may consider qemuarm-64 as more generic choice

winfried

Thanks for the tips,
I did not see what really is the difference, except downloading a different image.

FYI:

After two weeks with some updates running rasperrypi4-aarch64 the disk space on the A64 with 2G RAM and 8G eMMC seems to be too small, can't update anymore, run out of space. It is not the data of homeassistant sensors and cameras, it's the docker files and overlays etc... in /var/docker

Maybe an extra SD-card will do, but since of the overlays and dockers it's hard to split. I try the raspberrypi3-64 and qemuarm-64 and reinstall
Also try an older A20 with a sata-ssd and report back on progress.

mfg winfried
---- Atelier Algorythmics --- [url="http://algo.mur.at/"]http://algo.mur.at/[/url] ----

mactronica

My Home Assistant has been running for six months now. I use the docker version and filesystem is on a microsd. I haven't detected any problems. I show you some statistics:
:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            424M     0  424M   0% /dev
tmpfs            99M   28M   72M  28% /run
/dev/mmcblk2p1  7.3G  4.0G  3.1G  57% /
tmpfs           494M     0  494M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            99M     0   99M   0% /run/user/1000

:~$ free -h
               total        used        free      shared  buff/cache   available
Mem:           987Mi       595Mi        69Mi        27Mi       322Mi       290Mi
Swap:             0B          0B          0B


If could be usefull to someone this is my docker-compose.yml file:
version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /root/docker-compose-home-assistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
and this is for zigbee2mqtt using sonoff donlge:
version: '3.8'
services:
  zigbee2mqtt:
    container_name: zigbee2mqtt2
    restart: unless-stopped
    image: koenkk/zigbee2mqtt
    volumes:
      - ./zigbee2mqtt-data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - 8080:8080
    environment:
      - TZ=Europe/Rome
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0