Running HomeAssistant on CE

Don’t bother. At least you gave some pointers.

it would be really nice if you could figure out how to do it again. For example, on another device and then he made instructions. I’ve been trying to do this for a long time and never succeeded.

1 Like

Hi @Borec1 have you seen this?

I might try it soon, as I would like a way to have a supervised homeassistant in CE from scratch, just in case my emmc dies.
But first I’ll try to make a backup from my working install and recover it into a fresh new CE 19.X install.

1 Like

A post was split to a new topic: CoreELEC in QEMU

A post was merged into an existing topic: CoreELEC in QEMU

@Borec1 I also discovered a few days back that you can install docker-compose using pip, which can be installed from entware packages. This makes a lot easier to install many docker related apps.

Would be great if you shared the steps

Which steps? To install full hassio or to get docker-compose working?
As I commented in a previous post, I don’t have the steps to install hassio, I posted a couple of tips on how I did rsync it from an Armbian box. But I managed to make a full backup with a script (including a few docker containers), and yesterday I recovered it to a fresh install and it worked perfect.

#!/bin/sh
time tar cfvz /storage/backup/CoreElec19-HA-SSL-docker.tgz \
--exclude='storage/.kodi/userdata/Thumbnails/*' \
--exclude='storage/.kodi/userdata/addon_data/plugin.video.alfa/downloads/*' \
--exclude='storage/Album_Fotos/*' \
--exclude='storage/piwigo/gallery/galleries/Album_Fotos/*' \
--exclude='storage/photoprism/storage/cache/thumbnails/*' \
/storage/.cache \
/storage/.config \
/storage/.kodi \
/storage/.ssh \
/storage/.opt \
/storage/piwigo \
/storage/photoprism \
/storage/hassio
exit 0

And to install docker-compose you need to install entware and then

opkg update 
opkg install python3-pip
pip3 install docker-compose

It’s pretty straightforward.

1 Like

Yeah, I meant mainly the hassio part.

I could guess it with the thread topic. :slight_smile:
What I can do, knowing that a full backup can be recovered successfully, is to clean my test system where I recovered my backup, delete all non hassio related containers, delete installed integrations, devices, entities, automations and configs, change ip settings and passwords, make another full backup, upload it somewhere and link it here.
But it will take some time, as at the moment I don’t have another CE box, just my home live server with the EMMC loaded and HA taking care of a few devices. I will fix my H96 Max X3 when I get a new DC connector from Aliexpress, it’s on its way but it estimates nearly a couple of months to get here.

Anyway, I guess docker composer should make full hassio instalation easier.
Have you tried this?

I guess it should work, it seems to me a much cleaner method, and less work for me if it works.

2 Likes

Sorry to be totally confused here. I have seen commands like docker run, docker exec to install a docker. I am totally clueless what I need to do with an install.sh file. Where does it go? Do I need to save it somewhere and bash execute it?

It should work with

sh install.sh

I saved the install.sh file in userdata
when I issue sh install.sh it says

sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[Error] Please set machine for aarch64

anyone have any suggestions please? sorry for the bump. with the shortage of rpi devices this is almost the only thing I’m betting on!

I managed to move 1 step ahead and I get

sh install.sh --machine arm
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
[Info] Run Hass.io
[Info] Install cli 'ha'

But when I run docker ps -a there are no containers listed

The image also shows as unused. Cant figure the problem.

below is the log

Coreelec kernel: Detected VIPT I-cache on CPU1
Sep 11 20:29:44 Coreelec kernel: CPU1: Booted secondary processor [411fd050]
Sep 11 20:29:45 Coreelec systemd[1]: hassio-supervisor.service: Scheduled restart job, restart counter is at 15.
Sep 11 20:29:45 Coreelec systemd[1]: Stopped Hass.io supervisor.
Sep 11 20:29:45 Coreelec systemd[1]: Starting Hass.io supervisor...
Sep 11 20:29:45 Coreelec systemd[10363]: hassio-supervisor.service: Executable /usr/bin/docker missing, skipping: No such file or directory
Sep 11 20:29:45 Coreelec systemd[1]: Started Hass.io supervisor.
Sep 11 20:29:45 Coreelec hassio-supervisor[10365]: /storage/.opt/sbin/hassio-supervisor: line 7: jq: command not found
Sep 11 20:29:45 Coreelec systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=127/n/a
Sep 11 20:29:45 Coreelec systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.
Sep 11 20:29:45 Coreelec kernel: CPU1: shutdown
Sep 11 20:29:45 Coreelec kernel: psci: CPU1 killed (polled 0 ms)

Executable /usr/bin/docker missing

Did you install docker via Add-on ? Then you have to change that to

DOCKER_BINARY=/storage/.kodi/addons/service.system.docker/bin/docker
jq: command not found

It’s a command line program to process json, you can install it by opkg update && opkg install jq if you have entware. Otherwise see more install options here Download jq

1 Like

Thanks for your good efforts! Will try and report back :slight_smile:

jq is installed using opkg. But the error persists. Also see something to the effect that “No such container hassio_supervisor”

Btw I am using -m arm , my box is an S905X3. Hope thats the correct one.

Sep 15 15:56:42 Coreelec systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=127/n/a
Sep 15 15:56:42 Coreelec systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.
Sep 15 15:56:45 Coreelec pulseaudio[3287]: W: [pulseaudio] sap.c: sendmsg() failed: Connection refused
Sep 15 15:56:47 Coreelec systemd[1]: hassio-supervisor.service: Scheduled restart job, restart counter is at 56.
Sep 15 15:56:47 Coreelec systemd[1]: Stopped Hass.io supervisor.
Sep 15 15:56:47 Coreelec systemd[1]: Starting Hass.io supervisor...
Sep 15 15:56:47 Coreelec docker[5349]: Error response from daemon: No such container: hassio_supervisor
Sep 15 15:56:47 Coreelec systemd[1]: Started Hass.io supervisor.
Sep 15 15:56:47 Coreelec hassio-supervisor[5358]: /storage/.opt/sbin/hassio-supervisor: line 7: jq: command not found
Sep 15 15:56:47 Coreelec systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=127/n/a
Sep 15 15:56:47 Coreelec systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.
Sep 15 15:56:52 Coreelec systemd[1]: hassio-supervisor.service: Scheduled restart job, restart counter is at 57.
Sep 15 15:56:52 Coreelec systemd[1]: Stopped Hass.io supervisor.
Sep 15 15:56:52 Coreelec systemd[1]: Starting Hass.io supervisor...
Sep 15 15:56:52 Coreelec docker[5359]: Error response from daemon: No such container: hassio_supervisor
Sep 15 15:56:52 Coreelec systemd[1]: Started Hass.io supervisor.
Sep 15 15:56:52 Coreelec hassio-supervisor[5367]: /storage/.opt/sbin/hassio-supervisor: line 7: jq: command not found
Sep 15 15:56:52 Coreelec systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=127/n/a
Sep 15 15:56:52 Coreelec systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.

Probably jq is not in the path. You may need edit the systemd startup script

cat .config/system.d/hassio-supervisor.service
[Unit]
Description=Hass.io supervisor
Requires=docker.service
After=docker.service dbus.socket

[Service]
Type=simple
Restart=always
RestartSec=5s
++Environment="PATH=/opt/bin:/opt/sbin:/usr/bin:/usr/sbin"
ExecStartPre=-/opt/bin/docker stop hassio_supervisor
ExecStart=/storage/.opt/sbin/hassio-supervisor
ExecStop=-/opt/bin/docker stop hassio_supervisor

Ensure PATH contains /opt/bin .

Can you confirm which one of device do you have ?

https://version.home-assistant.io/stable.json

    "ova": "9.0",
    "rpi2": "9.0",
    "rpi3": "9.0",
    "rpi3-64": "9.0",
    "rpi4": "9.0",
    "rpi4-64": "9.0",
    "yellow": "9.0",
    "tinker": "9.0",
    "odroid-c2": "9.0",
    "odroid-c4": "9.0",
    "odroid-n2": "9.0",
    "odroid-xu4": "9.0",
    "generic-x86-64": "9.0",
    "generic-aarch64": "9.0",
    "khadas-vim3": "9.0"

If none, then maybe you can try generic-aarch64, i.e. execute the sh by

sh install.sh --machine generic-aarch64

(I’m not very sure, though)

1 Like

Do I need to add this line

Environment=“PATH=/opt/bin:/opt/sbin:/usr/bin:/usr/sbin”

to the service file? I edited and added it but it seems to get removed after running the install command.

My box is a S905X3. I tried --machine generic-aarch64 but it says “unknown machine type”. So I am executing with --machine arm