Running HomeAssistant on CE

Everything seems to be working as expected now. Thanks for giving it your time. The last problem is that if I restart the box, I lose all the settings and have to create an account again.

I usually reboot through the terminal with the reboot command. Maybe that will be the mistake. I can still try from the Kodi menu later. If it makes a difference.

I wasn’t saying it can’t be done of course just you need stability in smart home stuff. If you’re movie crashes the box and now you can’t control the lights while she’s punching you in the arm for saying it’s all cool give me 5, well you know, don’t need that. Stable media player, stable smart system and stable backup server.

This is just my opinion you probably have it all backed up and can just blink and it’ll be up again. Does home assistant do a redundant backup to switch to if main goes down? That would be good.

The other reason I say this is we all end up with spare boxes, people who don’t tinker don’t end up here. So as these boxes cost nothing to run there’s always a good use for it. Thayre amazing really and you guys fixing problems are amazing too.

I did some basic basic at school and a bit of c+ in late 90s but no idea what’s going on now. I’m good with that, debugging was annoying, only learned it for the break out boxes for some advanced solid state physics stuff.

Anyway keep doing what you do.

1 Like

Maybe the issue is that docker is tool old? But I can’t install 22.06.0 beta0 version.

The current minimum supported version of Docker is: 20.10.17.

I installed docker 22.06.0 beta0 from your script but no change. I also noticed that it only sees the disk as 2Gb. At the same time, I have a 60GB disk. Maybe it just uses some temporary directory that is lost on reboot.

Now I see: Data is saved under /media/MEDIA/HomeAssistant? And /media got lost after reboot!

Need to overwrite the path somewhere.

Yes, like this

bash install-supervised-hass-on-coreelec.bash -d /storage/HomeAssistant

Cool. It works now. But another problem. When HA starts I lose the sound on the TV. Don’t know what could be causing it?

I think there is one audio component in ha. Maybe should be disabled?

But in my case local sound on TV still works.

I think bluetooth can do it, HA automatically read some Bluetooth devices, for example thermometers. And if the CE doesn’t switch the audio device to bluetooth. If I set a different audio output in Kodi then it works for a while until I switch the TV channel. After removing docker it works fine again.

I’ll try it tomorrow with bluetooth off.

So I’m right. Bluetooth really does it. Deactivating it fixed it. Activating Bluetooth on the box and restarting again caused the sound error. So bluetooth cannot be used if there is a supported device in range that will automatically connect to HA. Like my thermometer.

Well, now it happened too. It just took longer.

These work perfect on my S905X3 unit.

I am trying to install on my S912 box too. But when I issue

bash install-supervised-hass-on-coreelec.bash -d /storage/HomeAssistant

I get the error, machine qmeuarm 64 not detected or something. Not that it matters, but would have been great to use my old box for this purpose too.

Thanks a lot @vpeter !!

1 Like

Which image you are using on S912? Maybe you don’t have real bash there?

What you get by command

ls -l /bin/bash

When i issue ls -l /bin/bash
I get

lrwxrwxrwx 1 root root 7 Mar 15 2021 /bin/bash → busybox

Btw another issue on the 905X3 box when I try to install HACS, the command as per the Home Assistant guide is to issue from the terminal …

wget -O - https://get.hacs.xyz | bash -

But I get the error saying cannot find the HomeAssistant directory. What should I do?

For bash try installing it in entware

opkg install bash

No idea for HACS. I only followed old instructions in this and other thread to get it running.
Maybe path should be set manually to /storage/HomeAssistant in script from get.hacs.xyz.

Installed bash but still get some errors.

Trying to install on another 905X3 but the HA web UI gets stuck on “preparing” and never moves ahead :frowning:

My first successful install was on the emmc of a 905X3. Is it possible to make a full backup of that emmc to write on the 2nd box?

All subsequent attempts to install, I get stuck at this screen endlessly :frowning:

Below is what the output of the status command is

CoreELEC:~/downloads # systemctl status hassio-supervisor.service -l --no-pager
● hassio-supervisor.service - Hass.io supervisor
     Loaded: loaded (/storage/.config/system.d/hassio-supervisor.service; enabled; preset: disabled)
     Active: active (running) since Wed 2023-03-15 12:41:30 UTC; 2min 59s ago
    Process: 7893 ExecStartPre=/storage/.docker/bin/docker stop hassio_supervisor (code=exited, status=0/SUCCESS)
   Main PID: 7900 (bash)
      Tasks: 11 (limit: 3726)
     Memory: 8.7M
     CGroup: /system.slice/hassio-supervisor.service
             ├─7900 bash /storage/.opt/sbin/hassio-supervisor
             └─7921 docker start --attach hassio_supervisor

Mar 15 12:42:35 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:35 INFO (MainThread) [supervisor.host.services] Updating service information
Mar 15 12:42:35 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:35 INFO (MainThread) [supervisor.host.manager] Host information reload completed
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_FAI                                                                             LED/ContextType.DNS_SERVER
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/Conte                                                                             xtType.CORE
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.check] System checks complete
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state Cor                                                                             eState.RUNNING
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 CRITICAL (MainThread) [supervisor.jobs] The following job conditions are ignored and will ma                                                                             ke the system unstable when they occur: {<JobCondition.HEALTHY: 'healthy'>}
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.R                                                                             UNNING
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
CoreELEC:~/downloads # systemctl status hassio-supervisor.service -l --no-pager
● hassio-supervisor.service - Hass.io supervisor
     Loaded: loaded (/storage/.config/system.d/hassio-supervisor.service; enabled; preset: disabled)
     Active: active (running) since Wed 2023-03-15 12:41:30 UTC; 3min 22s ago
    Process: 7893 ExecStartPre=/storage/.docker/bin/docker stop hassio_supervisor (code=exited, status=0/SUCCESS)
   Main PID: 7900 (bash)
      Tasks: 11 (limit: 3726)
     Memory: 8.7M
     CGroup: /system.slice/hassio-supervisor.service
             ├─7900 bash /storage/.opt/sbin/hassio-supervisor
             └─7921 docker start --attach hassio_supervisor

Mar 15 12:42:35 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:35 INFO (MainThread) [supervisor.host.services] Updating service information
Mar 15 12:42:35 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:35 INFO (MainThread) [supervisor.host.manager] Host information reload completed
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_FAI                                                                             LED/ContextType.DNS_SERVER
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/Conte                                                                             xtType.CORE
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.check] System checks complete
Mar 15 12:42:41 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:41 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state Cor                                                                             eState.RUNNING
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 CRITICAL (MainThread) [supervisor.jobs] The following job conditions are ignored and will ma                                                                             ke the system unstable when they occur: {<JobCondition.HEALTHY: 'healthy'>}
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.R                                                                             UNNING
Mar 15 12:42:49 CoreELEC hassio-supervisor[7921]: 23-03-15 18:12:49 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete

The initial operation takes long time. How long did you wait?

For installing HACS

mkdir -p /storage/downloads
cd /storage/downloads
wget -O hacs.sh https://get.hacs.xyz
sed -i 's|\(declare -a paths=(\)|\1\n    "/storage/HomeAssistant/homeassistant"|' hacs.sh
bash hacs.sh
systemctl restart hassio-supervisor.service

I assume it was installed correctly?

image

Regarding copying working installation: I think the HA lives in folder /storage/HomeAssistant.
But before copying service must be stop

systemctl stop hassio-supervisor.service

Not sure if this is enough. Someone with more knowledge should confirm.

20 minutes. And nothing happened. The first time around I got to the web UI in barely 2-3 mins.

Anyway, wrt to your steps.

bash install-supervised-hass-on-coreelec.bash -d /storage/HomeAssistant

systemctl status hassio-supervisor.service -l --no-pager

# after a minute or two port should be open and web interface available
# but then still need few more minutes to get everything set up
netstat -ant | grep 8123

# to enable installing addons (don't know if this is safe or not)
# https://community.home-assistant.io/t/unhealthy-system-reported-on-arch-linux/251430/2
echo '{"ignore_conditions": ["healthy"]}' >/storage/HomeAssistant/jobs.json
systemctl restart hassio-supervisor.service

after the bash install home assistant supervised, should I wait for the web UI? Or immediately issue the netstat | grep 8123 command?

I believe the other status command is just to check the status of the docker installation and not really a part of the installation.

My other question to you was whether there is a way to clone the emmc installation as its possible to do to an installation on usb or SD.

Thanks for all your help.

True, calling install-supervised-hass-on-coreelec.bash installs HA. At then end you get a message where web interface come up.
The systemctl status command and netstat command is just to see if HA is started.
But don’t run both commands for addon installation. This must be called only after HA web interface fully come up (meaning you can log into).

I’m not sure about cloning installation. Whole HA should be stopped but I don’t know if one service stopped is enough because some parts were still running.

Sorry, false alarm. After a good 30 min HA did load. Was probably much faster because I was writing to the emmc the first time. Works a charm. Thanks!

1 Like